• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • options
opssolarsystem.cpp
Go to the documentation of this file.
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  ***************************************************************************/
8 
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 
18 #include "opssolarsystem.h"
19 #include "kstars.h"
20 
21 #include <kactioncollection.h>
22 
23 OpsSolarSystem::OpsSolarSystem( KStars *_ks )
24  : QFrame( _ks ), ksw(_ks)
25 {
26  setupUi( this );
27 
28  connect( kcfg_ShowSolarSystem, SIGNAL( toggled(bool) ), SLOT( slotAllWidgets(bool) ) );
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() ) );
34 
35  kcfg_MagLimitAsteroid->setMaximum( 30.0 );
36  kcfg_MaxRadCometName->setMaximum( 100.0 );
37 
38  slotAsteroidWidgets( kcfg_ShowAsteroids->isChecked() );
39  slotCometWidgets( kcfg_ShowComets->isChecked() );
40 }
41 
42 
43 OpsSolarSystem::~OpsSolarSystem()
44 {
45 }
46 
47 void OpsSolarSystem::slotAllWidgets( bool on ) {
48  MajorBodiesBox->setEnabled( on );
49  MinorBodiesBox->setEnabled( on );
50  TrailsBox->setEnabled( on );
51 }
52 
53 void OpsSolarSystem::slotAsteroidWidgets( bool on ) {
54  kcfg_MagLimitAsteroid->setEnabled( on );
55  kcfg_ShowAsteroidNames->setEnabled( on );
56  kcfg_AsteroidLabelDensity->setEnabled( on );
57  textLabel3->setEnabled( on );
58  textLabel6->setEnabled( on );
59  LabelDensity->setEnabled( on );
60 }
61 
62 void OpsSolarSystem::slotCometWidgets( bool on ) {
63  kcfg_ShowCometNames->setEnabled( on );
64  kcfg_MaxRadCometName->setEnabled( on );
65  textLabel4->setEnabled( on );
66 }
67 
68 void OpsSolarSystem::slotSelectPlanets() {
69  bool b=true;
70  if ( QString(sender()->objectName()) == "showNonePlanets" )
71  b = false;
72 
73  kcfg_ShowSun->setChecked( b );
74  kcfg_ShowMoon->setChecked( b );
75  kcfg_ShowMercury->setChecked( b );
76  kcfg_ShowVenus->setChecked( b );
77  kcfg_ShowMars->setChecked( b );
78  kcfg_ShowJupiter->setChecked( b );
79  kcfg_ShowSaturn->setChecked( b );
80  kcfg_ShowUranus->setChecked( b );
81  kcfg_ShowNeptune->setChecked( b );
82  kcfg_ShowPluto->setChecked( b );
83 }
84 #include "opssolarsystem.moc"
opssolarsystem.h
KStars
This is the main window for KStars.
Definition: kstars.h:94
OpsSolarSystem::~OpsSolarSystem
~OpsSolarSystem()
Definition: opssolarsystem.cpp:43
OpsSolarSystem::OpsSolarSystem
OpsSolarSystem(KStars *_ks)
Definition: opssolarsystem.cpp:23
QFrame
kstars.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal