[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Thu Aug 19 15:58:03 CEST 2010
SVN commit 1165504 by beschow:
const'ify
M +5 -5 MarbleMap.cpp
M +5 -5 MarbleMap.h
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1165503:1165504
@@ -417,7 +417,7 @@
return d->m_model->placemarkSelectionModel();
}
-qreal MarbleMap::moveStep()
+qreal MarbleMap::moveStep() const
{
if ( radius() < sqrt( (qreal)(width() * width() + height() * height()) ) )
return 180.0 * 0.1;
@@ -842,14 +842,14 @@
return northPolePosition().y();
}
-QPoint MarbleMap::northPolePosition()
+QPoint MarbleMap::northPolePosition() const
{
qreal x, y;
screenCoordinates( 0.0, 90.0, x, y );
return QPoint( (int) x, (int) y );
}
-QPoint MarbleMap::southPolePosition()
+QPoint MarbleMap::southPolePosition() const
{
qreal x, y;
screenCoordinates( 0.0, -90.0, x, y );
@@ -857,7 +857,7 @@
}
bool MarbleMap::screenCoordinates( qreal lon, qreal lat,
- qreal& x, qreal& y )
+ qreal& x, qreal& y ) const
{
return d->m_viewParams.currentProjection()
->screenCoordinates( lon * DEG2RAD, lat * DEG2RAD,
@@ -867,7 +867,7 @@
bool MarbleMap::geoCoordinates( int x, int y,
qreal& lon, qreal& lat,
- GeoDataCoordinates::Unit unit )
+ GeoDataCoordinates::Unit unit ) const
{
return d->m_viewParams.currentProjection()
->geoCoordinates( x, y, d->m_viewParams.viewport(),
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h #1165503:1165504
@@ -197,7 +197,7 @@
* @c false if the geographical coordinates are not visible on the screen
*/
bool screenCoordinates( qreal lon, qreal lat,
- qreal& x, qreal& y );
+ qreal& x, qreal& y ) const;
/**
* @brief Get the Y coordinate of the North Pole.
@@ -212,13 +212,13 @@
* @brief Get the pixel position of the North Pole.
* @return The pixel position of the geographical north pole.
*/
- QPoint northPolePosition();
+ QPoint northPolePosition() const;
/**
* @brief Get the pixel position of the South Pole.
* @return The pixel position of the geographical south pole.
*/
- QPoint southPolePosition();
+ QPoint southPolePosition() const;
/**
* @brief Get the earth coordinates corresponding to a pixel in the map.
@@ -231,7 +231,7 @@
*/
bool geoCoordinates( int x, int y,
qreal& lon, qreal& lat,
- GeoDataCoordinates::Unit = GeoDataCoordinates::Degree );
+ GeoDataCoordinates::Unit = GeoDataCoordinates::Degree ) const;
/**
* @brief Return the longitude of the center point.
@@ -259,7 +259,7 @@
* @brief Return how much the map will move if one of the move slots are called.
* @return The move step.
*/
- qreal moveStep();
+ qreal moveStep() const;
/**
* @brief Add a GeoDataPlacemark file to the model.
More information about the Marble-commits
mailing list