[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars
From:       Alexey Khudyakov <alexey.skladnoy () gmail ! com>
Date:       2011-03-13 20:18:49
Message-ID: 20110313201849.BB8F0AC8C9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1224715 by khudyakov:

Change signature of setDestination

 M  +3 -3      kstarsdata.cpp  
 M  +1 -1      kstarsdcop.cpp  
 M  +2 -2      kstarsinit.cpp  
 M  +2 -1      main.cpp  
 M  +6 -8      skymap.cpp  
 M  +1 -1      skymap.h  
 M  +4 -4      skymapevents.cpp  
 M  +1 -1      tools/wutdialog.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/kstarsdata.cpp #1224714:1224715
@@ -879,14 +879,14 @@
                 if ( az >= 0.0 ) {
                     map->setFocusAltAz( dms(90.0), map->focus()->az() );
                     map->focus()->HorizontalToEquatorial( &LST, geo()->lat() );
-                    map->setDestination( map->focus() );
+                    map->setDestination( *map->focus() );
                     cmdCount++;
                 }
 
                 if ( arg == "z" || arg == "zenith" ) {
                     map->setFocusAltAz( dms(90.0), map->focus()->az() );
                     map->focus()->HorizontalToEquatorial( &LST, geo()->lat() );
-                    map->setDestination( map->focus() );
+                    map->setDestination( *map->focus() );
                     cmdCount++;
                 }
 
@@ -898,7 +898,7 @@
                 if ( target ) { 
                     map->setFocus( target );
                     map->focus()->EquatorialToHorizontal( &LST, geo()->lat() );
-                    map->setDestination( map->focus() );
+                    map->setDestination( *map->focus() );
                     cmdCount++;
                 }
 
--- trunk/KDE/kdeedu/kstars/kstars/kstarsdcop.cpp #1224714:1224715
@@ -61,7 +61,7 @@
 
 void KStars::setRaDec( double ra, double dec ) {
     SkyPoint p( ra, dec );
-    map()->setDestination( &p );
+    map()->setDestination( p );
 }
 
 void KStars::setAltAz( double alt, double az ) {
--- trunk/KDE/kdeedu/kstars/kstars/kstarsinit.cpp #1224714:1224715
@@ -625,7 +625,7 @@
         map()->setFocusPoint( &pFocus );
     }
     data()->setSnapNextFocus();
-    map()->setDestination( map()->focusPoint() );
+    map()->setDestination( *map()->focusPoint() );
     map()->setFocus( map()->destination() );
 
     map()->showFocusCoords();
@@ -647,7 +647,7 @@
             DefaultFocus.setAz( 180.0 );
             DefaultFocus.setAlt( 45.0 );
             DefaultFocus.HorizontalToEquatorial( data()->lst(), data()->geo()->lat() );
-            map()->setDestination( &DefaultFocus );
+            map()->setDestination( DefaultFocus );
         }
     }
 
--- trunk/KDE/kdeedu/kstars/kstars/main.cpp #1224714:1224715
@@ -145,7 +145,8 @@
         dat->setFullTimeUpdate();
         dat->updateTime(dat->geo(), map );
 
-        map->setDestination( new SkyPoint( Options::focusRA(), Options::focusDec() ) );
+        SkyPoint dest( Options::focusRA(), Options::focusDec() );
+        map->setDestination( dest );
         map->destination()->EquatorialToHorizontal( dat->lst(), dat->geo()->lat() );
         map->setFocus( map->destination() );
         map->focus()->EquatorialToHorizontal( dat->lst(), dat->geo()->lat() );
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #1224714:1224715
@@ -422,7 +422,7 @@
     if ( Options::useAltAz() ) {
         setDestinationAltAz( focusPoint()->altRefracted(), focusPoint()->az() );
     } else {
-        setDestination( focusPoint() );
+        setDestination( *focusPoint() );
     }
 
     focusPoint()->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
@@ -735,10 +735,8 @@
     forceUpdate(); //need a total update, or slewing with the arrow keys doesn't work.
 }
 
-void SkyMap::setDestination( SkyPoint *p ) {
-    Destination = *p;
-    destination()->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
-    emit destinationChanged();
+void SkyMap::setDestination( const SkyPoint& p ) {
+    setDestination( p.ra(), p.dec() );
 }
 
 void SkyMap::setDestination( const dms &ra, const dms &dec ) {
@@ -768,12 +766,12 @@
             //Tracking any object in Alt/Az mode requires focus updates
             setFocusAltAz( focusObject()->altRefracted(), focusObject()->az() );
             focus()->HorizontalToEquatorial( data->lst(), data->geo()->lat() );
-            setDestination( focus() );
+            setDestination( *focus() );
         } else {
             //Tracking in equatorial coords
             setFocus( focusObject() );
             focus()->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
-            setDestination( focus() );
+            setDestination( *focus() );
         }
 
     //Tracking on empty sky
@@ -782,7 +780,7 @@
             //Tracking on empty sky in Alt/Az mode
             setFocus( focusPoint() );
             focus()->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
-            setDestination( focus() );
+            setDestination( *focus() );
         }
 
     // Not tracking and not slewing, let sky drift by
--- trunk/KDE/kdeedu/kstars/kstars/skymap.h #1224714:1224715
@@ -169,7 +169,7 @@
     	*repainting the sky at each step (if Options::useAnimatedSlewing()==true).
     	*@param f a pointer to the SkyPoint the map should slew to
     	*/
-    void setDestination( SkyPoint *f );
+    void setDestination( const SkyPoint& f );
 
     /**@short sets the destination point of the skymap, using ra/dec coordinates.
     	*
--- trunk/KDE/kdeedu/kstars/kstars/skymapevents.cpp #1224714:1224715
@@ -358,7 +358,7 @@
     if ( arrowKeyPressed ) {
         stopTracking();
         if ( scrollCount > 10 ) {
-            setDestination( focus() );
+            setDestination( *focus() );
             scrollCount = 0;
         }
     }
@@ -402,7 +402,7 @@
         if ( Options::useAltAz() )
             setDestinationAltAz( focus()->alt(), focus()->az() );
         else
-            setDestination( focus() );
+            setDestination( *focus() );
 
         showFocusCoords();
         forceUpdate();  // Need a full update to draw faint objects that are not drawn while slewing.
@@ -523,7 +523,7 @@
         stopTracking();
         SkyPoint newcenter = projector()->fromScreen( ZoomRect.center(), data->lst(), data->geo()->lat() );
         setFocus( &newcenter );
-        setDestination( &newcenter );
+        setDestination( newcenter );
 
         //Zoom in on center of Zoom Circle, by a factor equal to the ratio
         //of the sky pixmap's width to the Zoom Circle's diameter
@@ -541,7 +541,7 @@
             if ( Options::useAltAz() )
                 setDestinationAltAz( focus()->alt(), focus()->az() );
             else
-                setDestination( focus() );
+                setDestination( *focus() );
         }
         forceUpdate();	// is needed because after moving the sky not all stars are shown
     }
--- trunk/KDE/kdeedu/kstars/kstars/tools/wutdialog.cpp #1224714:1224715
@@ -442,7 +442,7 @@
     if (o != 0) {
         kstars->map()->setFocusPoint( o );
         kstars->map()->setFocusObject( o );
-        kstars->map()->setDestination( kstars->map()->focusPoint() );
+        kstars->map()->setDestination( *kstars->map()->focusPoint() );
     }
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic