Stellarium 0.14.3
OcularDialog.hpp
1 /*
2  * Copyright (C) 2009 Timothy Reaves
3  * Copyright (C) 2011 Bogdan Marinov
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _OCULARDIALOG_HPP_
21 #define _OCULARDIALOG_HPP_
22 
23 #include <QObject>
24 #include "CCD.hpp"
25 #include "Ocular.hpp"
26 #include "PropertyBasedTableModel.hpp"
27 #include "StelDialog.hpp"
28 #include "StelStyle.hpp"
29 #include "Telescope.hpp"
30 #include "Lens.hpp"
31 
32 class Ui_ocularDialogForm;
33 
34 QT_BEGIN_NAMESPACE
35 class QDataWidgetMapper;
36 class QDoubleValidator;
37 class QIntValidator;
38 class QRegExpValidator;
39 class QModelIndex;
40 class QStandardItemModel;
41 QT_END_NAMESPACE
42 
43 class Oculars;
44 
46 class OcularDialog : public StelDialog
47 {
48  Q_OBJECT
49 
50 public:
51  OcularDialog(Oculars* plugin, QList<CCD *>* ccds, QList<Ocular *>* oculars, QList<Telescope *>* telescopes, QList<Lens *>* lense);
52  virtual ~OcularDialog();
54  void styleChanged();
55  void updateStyle();
56 
57 public slots:
58  void closeWindow();
59  void deleteSelectedCCD();
60  void deleteSelectedOcular();
61  void deleteSelectedTelescope();
62  void deleteSelectedLens();
63  void insertNewCCD();
64  void insertNewOcular();
65  void insertNewTelescope();
66  void insertNewLens();
67  void moveUpSelectedSensor();
68  void moveUpSelectedOcular();
69  void moveUpSelectedTelescope();
70  void moveUpSelectedLens();
71  void moveDownSelectedSensor();
72  void moveDownSelectedOcular();
73  void moveDownSelectedTelescope();
74  void moveDownSelectedLens();
75  void retranslate();
76 
77 signals:
78  void requireSelectionChanged(bool state);
79  void scaleImageCircleChanged(bool state);
80 
81 protected:
83  virtual void createDialogContent();
84  Ui_ocularDialogForm* ui;
85 
86 private slots:
87  void keyBindingTogglePluginChanged(const QString& newString);
88  void keyBindingPopupNavigatorConfigChanged(const QString& newString);
89  void initAboutText();
90  void requireSelectionStateChanged(int state);
91  void scaleImageCircleStateChanged(int state);
92  void setLabelsDescriptionText(bool state);
93  void selectedCCDRotationAngleChanged();
94 
95 private:
96  Oculars* plugin;
97 
98  QDataWidgetMapper* ccdMapper;
99  QList<CCD *>* ccds;
100  PropertyBasedTableModel* ccdTableModel;
101  QDataWidgetMapper* ocularMapper;
102  QList<Ocular *>* oculars;
103  PropertyBasedTableModel* ocularTableModel;
104  QDataWidgetMapper* telescopeMapper;
105  QList<Telescope *>* telescopes;
106  PropertyBasedTableModel* telescopeTableModel;
107  QDataWidgetMapper* lensMapper;
108  QList<Lens *>* lense;
109  PropertyBasedTableModel* lensTableModel;
110  QRegExpValidator* validatorName;
111 };
112 
113 #endif // _OCULARDIALOG_HPP_
A local copy of StelDialog, the base class for all the GUI windows in Stellarium, included to allow t...
virtual void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.
This class provides a table model for just about any QObject.
Main class of the Oculars plug-in.
Definition: Oculars.hpp:75
void styleChanged()
Notify that the application style changed.