[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Tue Oct 5 20:34:21 CEST 2010
SVN commit 1182824 by beschow:
Remove {north,south}PolePosition methods. They were just used in one place.
M +0 -19 MarbleMap.cpp
M +0 -21 MarbleMap.h
M +0 -15 MarbleWidget.cpp
M +0 -19 MarbleWidget.h
M +6 -2 MarbleWidgetInputHandler.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1182823:1182824
@@ -764,25 +764,6 @@
}
-int MarbleMap::northPoleY()
-{
- return northPolePosition().y();
-}
-
-QPoint MarbleMap::northPolePosition() const
-{
- qreal x, y;
- screenCoordinates( 0.0, 90.0, x, y );
- return QPoint( (int) x, (int) y );
-}
-
-QPoint MarbleMap::southPolePosition() const
-{
- qreal x, y;
- screenCoordinates( 0.0, -90.0, x, y );
- return QPoint( (int) x, (int) y );
-}
-
bool MarbleMap::screenCoordinates( qreal lon, qreal lat,
qreal& x, qreal& y ) const
{
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h #1182823:1182824
@@ -201,27 +201,6 @@
qreal& x, qreal& y ) const;
/**
- * @brief Get the Y coordinate of the North Pole.
- * @return the pixel address of the geographical north pole relative to the center of the widget.
- * This method is deprecated because it returns an unintuitive result.
- * Use @see northPolePosition()
- * or @see southPolePosition()
- */
- MARBLE_DEPRECATED(int northPoleY());
-
- /**
- * @brief Get the pixel position of the North Pole.
- * @return The pixel position of the geographical north pole.
- */
- QPoint northPolePosition() const;
-
- /**
- * @brief Get the pixel position of the South Pole.
- * @return The pixel position of the geographical south pole.
- */
- QPoint southPolePosition() const;
-
- /**
* @brief Get the earth coordinates corresponding to a pixel in the map.
* @param x the x coordinate of the pixel
* @param y the y coordinate of the pixel
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1182823:1182824
@@ -696,21 +696,6 @@
d->m_inputhandler->setPositionSignalConnected( false );
}
-int MarbleWidget::northPoleY()
-{
- return northPolePosition().y();
-}
-
-QPoint MarbleWidget::northPolePosition()
-{
- return d->m_map->northPolePosition();
-}
-
-QPoint MarbleWidget::southPolePosition()
-{
- return d->m_map->southPolePosition();
-}
-
bool MarbleWidget::screenCoordinates( qreal lon, qreal lat,
qreal& x, qreal& y )
{
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h #1182823:1182824
@@ -266,25 +266,6 @@
qreal& x, qreal& y );
/**
- * @brief Get the Y coordinate of the North Pole.
- * @return the pixel address of the geographical north pole relative to the center of the widget.
- * This method is deprecated because it returns an unintuitive result.
- */
- MARBLE_DEPRECATED(int northPoleY());
-
- /**
- * @brief Get the pixel position of the North Pole.
- * @return The pixel position of the geographical north pole.
- */
- QPoint northPolePosition();
-
- /**
- * @brief Get the pixel position of the South Pole.
- * @return The pixel position of the geographical south pole.
- */
- QPoint southPolePosition();
-
- /**
* @brief Get the earth coordinates corresponding to a pixel in the widget.
* @param x the x coordinate of the pixel
* @param y the y coordinate of the pixel
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidgetInputHandler.cpp #1182823:1182824
@@ -520,12 +520,16 @@
if ( MarbleWidgetInputHandler::d->m_widget->projection() == Spherical ) {
if ( d->m_leftPressedLat >= 0 ) {
// The visible pole is the north pole
- if ( event->y() < MarbleWidgetInputHandler::d->m_widget->northPolePosition().y() )
+ qreal northPoleX, northPoleY;
+ MarbleWidgetInputHandler::d->m_widget->screenCoordinates( 0.0, 90.0, northPoleX, northPoleY );
+ if ( event->y() < northPoleY )
d->m_leftPressedDirection = -1;
}
else {
// The visible pole is the south pole
- if ( event->y() > MarbleWidgetInputHandler::d->m_widget->southPolePosition().y() )
+ qreal southPoleX, southPoleY;
+ MarbleWidgetInputHandler::d->m_widget->screenCoordinates( 0.0, -90.0, southPoleX, southPoleY );
+ if ( event->y() > southPoleY )
d->m_leftPressedDirection = -1;
}
}
More information about the Marble-commits
mailing list