• 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
opsguides.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  opsguides.cpp - K Desktop Planetarium
3  -------------------
4  begin : Sun 6 Feb 2005
5  copyright : (C) 2005 by Jason Harris
6  email : jharris@30doradus.org
7  ***************************************************************************/
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #include "opsguides.h"
18 #include "ksfilereader.h"
19 #include "kstars.h"
20 #include "kstarsdata.h"
21 #include "skycomponents/skymapcomposite.h"
22 #include "Options.h"
23 
24 OpsGuides::OpsGuides( KStars *_ks )
25  : QFrame( _ks ), ksw(_ks)
26 {
27  setupUi( this );
28  connect( kcfg_ShowCNames, SIGNAL( toggled( bool ) ),
29  this, SLOT( slotToggleConstellOptions( bool ) ) );
30  connect( kcfg_ShowMilkyWay, SIGNAL( toggled( bool ) ),
31  this, SLOT( slotToggleMilkyWayOptions( bool ) ) );
32  connect( kcfg_ShowGround, SIGNAL( toggled( bool ) ),
33  this, SLOT( slotToggleOpaqueGround( bool ) ) );
34  connect( kcfg_AutoSelectGrid, SIGNAL( toggled( bool ) ),
35  this, SLOT( slotToggleAutoSelectGrid( bool ) ) );
36 
37  foreach( const QString& item, ksw->data()->skyComposite()->getCultureNames() )
38  kcfg_SkyCulture->addItem( i18nc("Sky Culture", item.toUtf8().constData() ) );
39 
40  // When setting up the widget, update the enabled status of the
41  // checkboxes depending on the options.
42  slotToggleOpaqueGround( Options::showGround() );
43  slotToggleConstellOptions( Options::showCNames() );
44  slotToggleMilkyWayOptions( Options::showMilkyWay() );
45  slotToggleAutoSelectGrid( Options::autoSelectGrid() );
46 
47 }
48 
49 OpsGuides::~OpsGuides()
50 {}
51 
52 void OpsGuides::slotToggleConstellOptions( bool state ) {
53  ConstellOptions->setEnabled( state );
54 }
55 
56 void OpsGuides::slotToggleMilkyWayOptions( bool state ) {
57  kcfg_FillMilkyWay->setEnabled( state );
58 }
59 
60 void OpsGuides::slotToggleOpaqueGround( bool state ) {
61  kcfg_ShowHorizon->setEnabled( !state );
62 }
63 
64 void OpsGuides::slotToggleAutoSelectGrid( bool state ) {
65  kcfg_ShowEquatorialGrid->setEnabled( !state );
66  kcfg_ShowHorizontalGrid->setEnabled( !state );
67 }
68 
69 #include "opsguides.moc"
Options::showMilkyWay
static bool showMilkyWay()
Get Draw Milky Way contour in the sky map?
Definition: Options.h:1892
opsguides.h
KStars
This is the main window for KStars.
Definition: kstars.h:94
Options::showGround
static bool showGround()
Get Draw opaque ground in the sky map?
Definition: Options.h:1740
Options::autoSelectGrid
static bool autoSelectGrid()
Get Draw grids according to active coordinate system?
Definition: Options.h:1683
skymapcomposite.h
Options::showCNames
static bool showCNames()
Get Draw constellation names in the sky map?
Definition: Options.h:1607
i18nc
i18nc("string from libindi, used in the config dialog","100x")
KStarsData::skyComposite
SkyMapComposite * skyComposite()
Definition: kstarsdata.h:146
SkyMapComposite::getCultureNames
QStringList getCultureNames()
Definition: skymapcomposite.cpp:589
Options.h
OpsGuides::OpsGuides
OpsGuides(KStars *_ks)
Definition: opsguides.cpp:24
ksfilereader.h
KStars::data
KStarsData * data() const
Definition: kstars.h:131
kstarsdata.h
QFrame
kstars.h
OpsGuides::~OpsGuides
~OpsGuides()
Definition: opsguides.cpp:49
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