kstars
opssolarsystem.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <qcheckbox.h>
00018 #include <qlabel.h>
00019 #include <kpushbutton.h>
00020 #include "opssolarsystem.h"
00021 #include "kstars.h"
00022 #include "magnitudespinbox.h"
00023
00024 OpsSolarSystem::OpsSolarSystem( QWidget *parent, const char *name, WFlags fl )
00025 : OpsSolarSystemUI( parent, name, fl )
00026 {
00027 ksw = (KStars *)parent;
00028
00029 connect( kcfg_ShowAsteroids, SIGNAL( toggled(bool) ), SLOT( slotAsteroidWidgets(bool) ) );
00030 connect( kcfg_ShowComets, SIGNAL( toggled(bool) ), SLOT( slotCometWidgets(bool) ) );
00031 connect( ClearAllTrails, SIGNAL( clicked() ), ksw, SLOT( slotClearAllTrails() ) );
00032 connect( showAllPlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) );
00033 connect( showNonePlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) );
00034
00035 slotAsteroidWidgets( kcfg_ShowAsteroids->isChecked() );
00036 slotCometWidgets( kcfg_ShowComets->isChecked() );
00037 }
00038
00039
00040 OpsSolarSystem::~OpsSolarSystem()
00041 {
00042 }
00043
00044 void OpsSolarSystem::slotAsteroidWidgets( bool on ) {
00045 kcfg_MagLimitAsteroid->setEnabled( on );
00046 kcfg_ShowAsteroidNames->setEnabled( on );
00047 kcfg_MagLimitAsteroidName->setEnabled( on );
00048 textLabel3->setEnabled( on );
00049 textLabel5->setEnabled( on );
00050 textLabel6->setEnabled( on );
00051 }
00052
00053 void OpsSolarSystem::slotCometWidgets( bool on ) {
00054 kcfg_ShowCometNames->setEnabled( on );
00055 kcfg_MaxRadCometName->setEnabled( on );
00056 textLabel4->setEnabled( on );
00057 }
00058
00059 void OpsSolarSystem::slotSelectPlanets() {
00060 bool b=true;
00061 if ( sender()->name() == QString( "showNonePlanets" ) ) b = false;
00062
00063 kcfg_ShowSun->setChecked( b );
00064 kcfg_ShowMoon->setChecked( b );
00065 kcfg_ShowMercury->setChecked( b );
00066 kcfg_ShowVenus->setChecked( b );
00067 kcfg_ShowMars->setChecked( b );
00068 kcfg_ShowJupiter->setChecked( b );
00069 kcfg_ShowSaturn->setChecked( b );
00070 kcfg_ShowUranus->setChecked( b );
00071 kcfg_ShowNeptune->setChecked( b );
00072 kcfg_ShowPluto->setChecked( b );
00073 }
00074 #include "opssolarsystem.moc"