[Kstars-devel] kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Fri Sep 19 21:48:51 CEST 2003


CVS commit by harris: 

Jupiter Moons tool fixes:
+ Added axis labels
+ Units of X-axis now arcminutes instead of "Jupiter radii"
+ pressing Esc will close tool

CCMAIL: kstars-devel at kde.org


  M +12 -2     jmoontool.cpp   1.5


--- kdeedu/kstars/kstars/jmoontool.cpp  #1.4:1.5
@@ -69,5 +69,7 @@ JMoonTool::JMoonTool(QWidget *parent, co
         pw->setShowGrid( false );
         pw->setYAxisType0( KStarsPlotWidget::TIME );
-        pw->setLimits( -35.0, 35.0, -240.0, 240.0 );
+        pw->setLimits( -12.0, 12.0, -240.0, 240.0 );
+        pw->setXAxisLabel( i18n( "offset from Jupiter (arcmin)" ) );
+        pw->setYAxisLabel( i18n( "time since now (days)" ) );
         vlay->addLayout( glay );
         vlay->addWidget( pw );
@@ -105,6 +107,8 @@ void JMoonTool::initPlotObjects() {
                 jm.findPosition( &num, jup, ksun );
                 
+                //jm.x(i) tells the offset from Jupiter, in units of Jupiter's angular radius.
+                //multiply by 0.5*jup->angSize() to get arcminutes
                 for ( unsigned int i=0; i<4; ++i ) 
-                        orbit[i]->addPoint( new DPoint( jm.x(i), t ) );
+                        orbit[i]->addPoint( new DPoint( 0.5*jup->angSize()*jm.x(i), t ) );
                 
                 jpath->addPoint( new DPoint( 0.0, t ) );
@@ -159,4 +163,10 @@ void JMoonTool::keyPressEvent( QKeyEvent
                         break;
                 }
+                case Key_Escape:
+                {
+                        close();
+                        break;
+                }
+                
                 default: { e->ignore(); break; }
         }




More information about the Kstars-devel mailing list