[Kstars-devel] KDE/kdeedu/kstars/kstars
Alexey Khudyakov
alexey.skladnoy at gmail.com
Wed Jun 30 00:04:42 CEST 2010
SVN commit 1144427 by khudyakov:
Remove functions SkyMap::setFocus{,AlzAz} in the same way
CCMAIL: kstars-devel at kde.org
M +3 -4 kstarsactions.cpp
M +2 -2 kstarsdata.cpp
M +8 -18 skymap.cpp
M +0 -20 skymap.h
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #1144426:1144427
@@ -826,8 +826,8 @@
if ( map()->focusObject() ) //simply update focus to focusObject's position
map()->setFocus( map()->focusObject() );
else { //need to recompute focus for unrefracted position
- map()->setFocusAltAz( SkyPoint::unrefract( map()->focus()->alt() ).Degrees(),
- map()->focus()->az().Degrees() );
+ map()->setFocusAltAz( SkyPoint::unrefract( map()->focus()->alt() ),
+ map()->focus()->az() );
map()->focus()->HorizontalToEquatorial( data()->lst(), data()->geo()->lat() );
}
}
@@ -835,8 +835,7 @@
} else {
Options::setUseAltAz( true );
if ( Options::useRefraction() ) {
- map()->setFocusAltAz( map()->focus()->altRefracted().Degrees(),
- map()->focus()->az().Degrees() );
+ map()->setFocusAltAz( map()->focus()->altRefracted(), map()->focus()->az() );
}
actionCollection()->action("coordsys")->setText( i18n("Horizontal &Coordinates") );
}
--- trunk/KDE/kdeedu/kstars/kstars/kstarsdata.cpp #1144426:1144427
@@ -871,14 +871,14 @@
if ( arg == "w" || arg == "west" ) az = 270.0;
if ( arg == "nw" || arg == "northwest" ) az = 335.0;
if ( az >= 0.0 ) {
- map->setFocusAltAz( 90.0, map->focus()->az().Degrees() );
+ map->setFocusAltAz( dms(90.0), map->focus()->az() );
map->focus()->HorizontalToEquatorial( &LST, geo()->lat() );
map->setDestination( map->focus() );
cmdCount++;
}
if ( arg == "z" || arg == "zenith" ) {
- map->setFocusAltAz( 90.0, map->focus()->az().Degrees() );
+ map->setFocusAltAz( dms(90.0), map->focus()->az() );
map->focus()->HorizontalToEquatorial( &LST, geo()->lat() );
map->setDestination( map->focus() );
cmdCount++;
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #1144426:1144427
@@ -663,34 +663,25 @@
}
void SkyMap::setFocus( SkyPoint *p ) {
- setFocus( p->ra().Hours(), p->dec().Degrees() );
+ setFocus( p->ra(), p->dec() );
}
void SkyMap::setFocus( const dms &ra, const dms &dec ) {
- setFocus( ra.Hours(), dec.Degrees() );
-}
+ Options::setFocusRA( ra.Hours() );
+ Options::setFocusDec( dec.Degrees() );
-void SkyMap::setFocus( double ra, double dec ) {
- Focus.set( ra, dec );
- Options::setFocusRA( ra );
- Options::setFocusDec( dec );
-
+ focus()->set( ra, dec );
focus()->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
}
void SkyMap::setFocusAltAz( const dms &alt, const dms &az) {
- setFocusAltAz( alt.Degrees(), az.Degrees() );
-}
-
-void SkyMap::setFocusAltAz(double alt, double az) {
+ Options::setFocusRA( focus()->ra().Hours() );
+ Options::setFocusDec( focus()->dec().Degrees() );
focus()->setAlt(alt);
focus()->setAz(az);
focus()->HorizontalToEquatorial( data->lst(), data->geo()->lat() );
- Options::setFocusRA( focus()->ra().Hours() );
- Options::setFocusDec( focus()->dec().Degrees() );
slewing = false;
-
forceUpdate(); //need a total update, or slewing with the arrow keys doesn't work.
}
@@ -725,8 +716,7 @@
if ( Options::isTracking() && focusObject() != NULL ) {
if ( Options::useAltAz() ) {
//Tracking any object in Alt/Az mode requires focus updates
- double dAlt = focusObject()->altRefracted().Degrees();
- setFocusAltAz( dAlt, focusObject()->az().Degrees() );
+ setFocusAltAz( focusObject()->altRefracted(), focusObject()->az() );
focus()->HorizontalToEquatorial( data->lst(), data->geo()->lat() );
setDestination( focus() );
} else {
@@ -834,7 +824,7 @@
//Either useAnimatedSlewing==false, or we have slewed, and are within one step of destination
//set focus=destination.
if ( Options::useAltAz() ) {
- setFocusAltAz( destination()->alt().Degrees(), destination()->az().Degrees() );
+ setFocusAltAz( destination()->alt(), destination()->az() );
focus()->HorizontalToEquatorial( data->lst(), data->geo()->lat() );
} else {
setFocus( destination() );
--- trunk/KDE/kdeedu/kstars/kstars/skymap.h #1144426:1144427
@@ -136,32 +136,12 @@
*/
void setFocus( const dms &ra, const dms &dec );
- /**@short sets the focus point of the sky map, using ra/dec coordinates
- *
- *@note This function behaves essentially like the above function.
- *It differs only in the data types of its arguments.
- *
- *@param ra the new right ascension
- *@param dec the new declination
- */
- void setFocus(double ra, double dec);
-
/**@short sets the focus point of the sky map, using its alt/az coordinates
*@param alt the new altitude
*@param az the new azimuth
*/
void setFocusAltAz( const dms &alt, const dms & az);
- /**@short sets the central focus point of the sky map, using alt/az coordinates
- *
- *@note This function behaves essentially like the above function.
- *It differs only in the data types of its arguments.
- *
- *@param alt the new altitude
- *@param az the new azimuth
- */
- void setFocusAltAz(double alt, double az);
-
/**@short sets the destination point of the sky map.
*@note setDestination() emits the destinationChanged() SIGNAL,
*which triggers the SLOT function SkyMap::slewFocus(). This
More information about the Kstars-devel
mailing list