diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch) | |
tree | d3bb9f5d25a2dc09ca81adecf39621d871534297 /kstars/kstars/opssolarsystem.cpp | |
download | tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstars/kstars/opssolarsystem.cpp')
-rw-r--r-- | kstars/kstars/opssolarsystem.cpp | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/kstars/kstars/opssolarsystem.cpp b/kstars/kstars/opssolarsystem.cpp new file mode 100644 index 00000000..85b420c3 --- /dev/null +++ b/kstars/kstars/opssolarsystem.cpp @@ -0,0 +1,74 @@ +/*************************************************************************** + opssolarsystem.cpp - K Desktop Planetarium + ------------------- + begin : Sun 22 Aug 2004 + copyright : (C) 2004 by Jason Harris + email : jharris@30doradus.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include <qcheckbox.h> +#include <qlabel.h> +#include <kpushbutton.h> +#include "opssolarsystem.h" +#include "kstars.h" +#include "magnitudespinbox.h" + +OpsSolarSystem::OpsSolarSystem( QWidget *parent, const char *name, WFlags fl ) + : OpsSolarSystemUI( parent, name, fl ) +{ + ksw = (KStars *)parent; + + connect( kcfg_ShowAsteroids, SIGNAL( toggled(bool) ), SLOT( slotAsteroidWidgets(bool) ) ); + 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() ); + slotCometWidgets( kcfg_ShowComets->isChecked() ); +} + + +OpsSolarSystem::~OpsSolarSystem() +{ +} + +void OpsSolarSystem::slotAsteroidWidgets( bool on ) { + kcfg_MagLimitAsteroid->setEnabled( on ); + kcfg_ShowAsteroidNames->setEnabled( on ); + kcfg_MagLimitAsteroidName->setEnabled( on ); + textLabel3->setEnabled( on ); + textLabel5->setEnabled( on ); + textLabel6->setEnabled( on ); +} + +void OpsSolarSystem::slotCometWidgets( bool on ) { + kcfg_ShowCometNames->setEnabled( on ); + kcfg_MaxRadCometName->setEnabled( on ); + textLabel4->setEnabled( on ); +} + +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" |