[Kstars-devel] kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Sun Feb 6 21:53:04 CET 2005


CVS commit by harris: 

Make the "Show All"/"Show None" buttons in the Solar System tab of the 
Config window work.

CCMAIL: kstars-devel at kde.org
CCMAIL: edward.greve at gmail.com


  M +17 -0     opssolarsystem.cpp   1.2
  M +1 -0      opssolarsystem.h   1.2


--- kdeedu/kstars/kstars/opssolarsystem.cpp  #1.1:1.2
@@ -30,4 +30,6 @@ OpsSolarSystem::OpsSolarSystem( QWidget 
         connect( kcfg_ShowComets, SIGNAL( toggled(bool) ), SLOT( slotCometWidgets(bool) ) );
         connect( ClearAllTrails, SIGNAL( clicked() ), ksw, SLOT( slotClearAllTrails() ) );
+        connect( showAllPlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) );
+        connect( showNonePlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) );
 
         slotAsteroidWidgets( kcfg_ShowAsteroids->isChecked() );
@@ -55,3 +57,18 @@ void OpsSolarSystem::slotCometWidgets( b
 }
 
+void OpsSolarSystem::slotSelectPlanets() {
+        bool b=true;
+        if ( sender()->name() == QString( "showNonePlanets" ) ) b = false;
+        
+        kcfg_ShowSun->setChecked( b );
+        kcfg_ShowMoon->setChecked( b );
+        kcfg_ShowMercury->setChecked( b );
+        kcfg_ShowVenus->setChecked( b );
+        kcfg_ShowMars->setChecked( b );
+        kcfg_ShowJupiter->setChecked( b );
+        kcfg_ShowSaturn->setChecked( b );
+        kcfg_ShowUranus->setChecked( b );
+        kcfg_ShowNeptune->setChecked( b );
+        kcfg_ShowPluto->setChecked( b );
+}
 #include "opssolarsystem.moc"

--- kdeedu/kstars/kstars/opssolarsystem.h  #1.1:1.2
@@ -41,4 +41,5 @@ private slots:
         void slotAsteroidWidgets(bool on);
         void slotCometWidgets(bool on);
+        void slotSelectPlanets();
 
 private:




More information about the Kstars-devel mailing list