• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

opssolarsystem.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           opssolarsystem.cpp  -  K Desktop Planetarium
00003                              -------------------
00004     begin                : Sun 22 Aug 2004
00005     copyright            : (C) 2004 by Jason Harris
00006     email                : jharris@30doradus.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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"

kstars

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

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal