[Kstars-devel] KDE/kdeedu/kstars/kstars
Akarsh Simha
akarshsimha at gmail.com
Wed Mar 25 18:33:31 CET 2009
SVN commit 944547 by asimha:
Applying Alexey Khudyakov's patch refactoring the
east|west|north|south|zenith actions.
Thanks Alexey!
CCMAIL: kstars-devel at kde.org
M +8 -7 kstarsactions.cpp
M +0 -26 skymapevents.cpp
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #944546:944547
@@ -705,17 +705,18 @@
//Pointing
void KStars::slotPointFocus() {
-
- if ( sender() == actionCollection()->action("zenith") )
- map()->invokeKey( Qt::Key_Z );
+ // In the following cases, we set slewing=true in order to disengage tracking
+ map()->stopTracking();
+ if ( sender() == actionCollection()->action("zenith") )
+ map()->setDestinationAltAz( 90.0, map()->focus()->az()->Degrees() );
else if ( sender() == actionCollection()->action("north") )
- map()->invokeKey( Qt::Key_N );
+ map()->setDestinationAltAz( 15.0, 0.0001 );
else if ( sender() == actionCollection()->action("east") )
- map()->invokeKey( Qt::Key_E );
+ map()->setDestinationAltAz( 15.0, 90.0 );
else if ( sender() == actionCollection()->action("south") )
- map()->invokeKey( Qt::Key_S );
+ map()->setDestinationAltAz( 15.0, 180.0 );
else if ( sender() == actionCollection()->action("west") )
- map()->invokeKey( Qt::Key_W );
+ map()->setDestinationAltAz( 15.0, 270.0 );
}
void KStars::slotTrack() {
--- trunk/KDE/kdeedu/kstars/kstars/skymapevents.cpp #944546:944547
@@ -153,32 +153,6 @@
zoomOutOrMagStep( e->modifiers() );
break;
- //In the following cases, we set slewing=true in order to disengage tracking
- case Qt::Key_N: //center on north horizon
- stopTracking();
- setDestinationAltAz( 15.0, 0.0001 );
- break;
-
- case Qt::Key_E: //center on east horizon
- stopTracking();
- setDestinationAltAz( 15.0, 90.0 );
- break;
-
- case Qt::Key_S: //center on south horizon
- stopTracking();
- setDestinationAltAz( 15.0, 180.0 );
- break;
-
- case Qt::Key_W: //center on west horizon
- stopTracking();
- setDestinationAltAz( 15.0, 270.0 );
- break;
-
- case Qt::Key_Z: //center on Zenith
- stopTracking();
- setDestinationAltAz( 90.0, focus()->az()->Degrees() );
- break;
-
case Qt::Key_0: //center on Sun
setClickedObject( data->skyComposite()->planet( KSPlanetBase::SUN ) );
setClickedPoint( clickedObject() );
More information about the Kstars-devel
mailing list