• 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
  • printing
pwizfovconfig.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  pwizfovconfig.cpp - K Desktop Planetarium
3  -------------------
4  begin : Sun Aug 14 2011
5  copyright : (C) 2011 by Rafał Kułaga
6  email : rl.kulaga@gmail.com
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 "pwizfovconfig.h"
19 
20 PWizFovConfigUI::PWizFovConfigUI(QWidget *parent) : QFrame(parent)
21 {
22  setupUi(this);
23  setupWidgets();
24 
25  connect(addLegendBox, SIGNAL(toggled(bool)), this, SLOT(slotUpdateLegendFields(bool)));
26 }
27 
28 Legend::LEGEND_TYPE PWizFovConfigUI::getLegendType()
29 {
30  switch(typeCombo->currentIndex())
31  {
32  case 0: // Scale with magnitudes chart
33  {
34  return Legend::LT_SCALE_MAGNITUDES;
35  }
36 
37  case 1: // Only scale
38  {
39  return Legend::LT_SCALE_ONLY;
40  }
41 
42  case 2: // Only magnitudes chart
43  {
44  return Legend::LT_MAGNITUDES_ONLY;
45  }
46 
47  default:
48  {
49  return Legend::LT_FULL;
50  }
51  }
52 }
53 
54 void PWizFovConfigUI::slotUpdateLegendFields(bool enabled)
55 {
56  useAlphaBlendBox->setEnabled(enabled);
57  typeCombo->setEnabled(enabled);
58  orientationCombo->setEnabled(enabled);
59  positionCombo->setEnabled(enabled);
60 }
61 
62 void PWizFovConfigUI::setupWidgets()
63 {
64  QStringList types;
65  types << i18n("Scale with magnitudes chart") << i18n("Only scale") << i18n("Only magnitudes chart");
66  typeCombo->addItems(types);
67 
68  orientationCombo->addItem(i18n("Horizontal"));
69  orientationCombo->addItem(i18n("Vertical"));
70 
71  QStringList positions;
72  positions << i18n("Upper left corner") << i18n("Upper right corner") << i18n("Lower left corner")
73  << i18n("Lower right corner");
74  positionCombo->addItems(positions);
75 
76  useAlphaBlendBox->setEnabled(false);
77  typeCombo->setEnabled(false);
78  orientationCombo->setEnabled(false);
79  positionCombo->setEnabled(false);
80 }
81 
82 
PWizFovConfigUI::PWizFovConfigUI
PWizFovConfigUI(QWidget *parent=0)
Constructor.
Definition: pwizfovconfig.cpp:20
Legend::LT_FULL
Definition: legend.h:54
QWidget
PWizFovConfigUI::getLegendType
Legend::LEGEND_TYPE getLegendType()
Get selected legend type.
Definition: pwizfovconfig.cpp:28
Legend::LEGEND_TYPE
LEGEND_TYPE
Legend type enumeration.
Definition: legend.h:52
pwizfovconfig.h
Legend::LT_SCALE_MAGNITUDES
Definition: legend.h:55
Legend::LT_MAGNITUDES_ONLY
Definition: legend.h:57
Legend::LT_SCALE_ONLY
Definition: legend.h:56
QFrame
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