moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / opssolarsystem.cpp
blob85b420c30c43e601a064c02e0ed58c6920f117d8
1 /***************************************************************************
2 opssolarsystem.cpp - K Desktop Planetarium
3 -------------------
4 begin : Sun 22 Aug 2004
5 copyright : (C) 2004 by Jason Harris
6 email : jharris@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17 #include <qcheckbox.h>
18 #include <qlabel.h>
19 #include <kpushbutton.h>
20 #include "opssolarsystem.h"
21 #include "kstars.h"
22 #include "magnitudespinbox.h"
24 OpsSolarSystem::OpsSolarSystem( QWidget *parent, const char *name, WFlags fl )
25 : OpsSolarSystemUI( parent, name, fl )
27 ksw = (KStars *)parent;
29 connect( kcfg_ShowAsteroids, SIGNAL( toggled(bool) ), SLOT( slotAsteroidWidgets(bool) ) );
30 connect( kcfg_ShowComets, SIGNAL( toggled(bool) ), SLOT( slotCometWidgets(bool) ) );
31 connect( ClearAllTrails, SIGNAL( clicked() ), ksw, SLOT( slotClearAllTrails() ) );
32 connect( showAllPlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) );
33 connect( showNonePlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) );
35 slotAsteroidWidgets( kcfg_ShowAsteroids->isChecked() );
36 slotCometWidgets( kcfg_ShowComets->isChecked() );
40 OpsSolarSystem::~OpsSolarSystem()
44 void OpsSolarSystem::slotAsteroidWidgets( bool on ) {
45 kcfg_MagLimitAsteroid->setEnabled( on );
46 kcfg_ShowAsteroidNames->setEnabled( on );
47 kcfg_MagLimitAsteroidName->setEnabled( on );
48 textLabel3->setEnabled( on );
49 textLabel5->setEnabled( on );
50 textLabel6->setEnabled( on );
53 void OpsSolarSystem::slotCometWidgets( bool on ) {
54 kcfg_ShowCometNames->setEnabled( on );
55 kcfg_MaxRadCometName->setEnabled( on );
56 textLabel4->setEnabled( on );
59 void OpsSolarSystem::slotSelectPlanets() {
60 bool b=true;
61 if ( sender()->name() == QString( "showNonePlanets" ) ) b = false;
63 kcfg_ShowSun->setChecked( b );
64 kcfg_ShowMoon->setChecked( b );
65 kcfg_ShowMercury->setChecked( b );
66 kcfg_ShowVenus->setChecked( b );
67 kcfg_ShowMars->setChecked( b );
68 kcfg_ShowJupiter->setChecked( b );
69 kcfg_ShowSaturn->setChecked( b );
70 kcfg_ShowUranus->setChecked( b );
71 kcfg_ShowNeptune->setChecked( b );
72 kcfg_ShowPluto->setChecked( b );
74 #include "opssolarsystem.moc"