[Marble-commits] KDE/kdeedu/marble

Bernhard Beschow bbeschow at cs.tu-berlin.de
Fri Oct 1 11:36:59 CEST 2010


SVN commit 1181523 by beschow:

remove MarbleMap::goHome()

* centralizes goHome()-implementation in MarbleWidget

 M  +3 -0      docs/release_notes/APIChanges-0.11.txt  
 M  +0 -14     src/lib/MarbleMap.cpp  
 M  +0 -5      src/lib/MarbleMap.h  
 M  +1 -1      src/lib/MarbleModel.cpp  
 M  +0 -9      src/lib/MarbleWidget.cpp  


--- trunk/KDE/kdeedu/marble/docs/release_notes/APIChanges-0.11.txt #1181522:1181523
@@ -18,3 +18,6 @@
   These methods haven't been meaningful to MarbleWidget and have been commented to be removed a long time ago.
 
 * Move MarbleMap::home(...) and MarbleMap::setHome(...) to MarbleModel.
+
+* Remove MarbleMap::goHome().
+  Use MarbleMap::flyTo(home), where home is the home position.
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1181522:1181523
@@ -83,8 +83,6 @@
     m_logzoom  = 0;
     m_zoomStep = 40;
 
-    m_parent->goHome();
-
     // FloatItems
     m_showFrameRate = false;
 
@@ -878,18 +876,6 @@
     }
 }
 
-void MarbleMap::goHome()
-{
-    qreal  homeLon = 0;
-    qreal  homeLat = 0;
-    int homeZoom = 1050;
-    d->m_model->home( homeLon, homeLat, homeZoom );
-
-    centerOn( homeLon * RAD2DEG, homeLat * RAD2DEG );
-
-    zoomView( homeZoom ); // default 1050
-}
-
 QString MarbleMap::mapThemeId() const
 {
     return d->m_model->mapThemeId();
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h #1181522:1181523
@@ -580,11 +580,6 @@
     void moveDown();
 
     /**
-     * @brief Center the view on the default start point with the default zoom.
-     */
-    void goHome();
-
-    /**
      * @brief Get the ID of the current map theme
      * To ensure that a unique identifier is being used the theme does NOT 
      * get represented by its name but the by relative location of the file 
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1181522:1181523
@@ -92,7 +92,7 @@
           m_dataFacade( 0 ),
           m_pluginManager( new PluginManager( parent ) ),
           m_mapThemeManager( new MapThemeManager( parent )),
-          m_homePoint( -9.4, 54.8 ),  // Some point that tackat defined. :-)
+          m_homePoint( -9.4, 54.8, GeoDataCoordinates::Degree ),  // Some point that tackat defined. :-)
           m_homeZoom( 1050 ),
           m_mapTheme( 0 ),
           m_layerManager( 0 ),
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1181522:1181523
@@ -849,14 +849,6 @@
 
 void MarbleWidget::goHome( FlyToMode mode )
 {
-    if ( !d->m_animationsEnabled || mode == Instant )
-    {
-        d->m_map->goHome();
-
-         // not obsolete in case the zoomlevel stays unaltered
-        d->repaint();
-    }
-    else {
         qreal  homeLon = 0;
         qreal  homeLat = 0;
         int homeZoom = 0;
@@ -869,7 +861,6 @@
 
         flyTo( target, mode );
     }
-}
 
 QString MarbleWidget::mapThemeId() const
 {


More information about the Marble-commits mailing list