Stellarium  0.90.0
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();
53 
54 public slots:
55  void closeWindow();
56  void deleteSelectedCCD();
57  void deleteSelectedOcular();
58  void deleteSelectedTelescope();
59  void deleteSelectedLens();
60  void insertNewCCD();
61  void insertNewOcular();
62  void insertNewTelescope();
63  void insertNewLens();
64  void moveUpSelectedSensor();
65  void moveUpSelectedOcular();
66  void moveUpSelectedTelescope();
67  void moveUpSelectedLens();
68  void moveDownSelectedSensor();
69  void moveDownSelectedOcular();
70  void moveDownSelectedTelescope();
71  void moveDownSelectedLens();
72  void retranslate();
73 
74 signals:
75  void requireSelectionChanged(bool state);
76  void scaleImageCircleChanged(bool state);
77 
78 protected:
80  virtual void createDialogContent();
81  Ui_ocularDialogForm* ui;
82 
83 private slots:
84  void initAboutText();
85  void requireSelectionStateChanged(int state);
86  void scaleImageCircleStateChanged(int state);
87  void setLabelsDescriptionText(bool state);
88  void selectedCCDRotationAngleChanged();
89 
90 private:
91  Oculars* plugin;
92 
93  QDataWidgetMapper* ccdMapper;
94  QList<CCD *>* ccds;
95  PropertyBasedTableModel* ccdTableModel;
96  QDataWidgetMapper* ocularMapper;
97  QList<Ocular *>* oculars;
98  PropertyBasedTableModel* ocularTableModel;
99  QDataWidgetMapper* telescopeMapper;
100  QList<Telescope *>* telescopes;
101  PropertyBasedTableModel* telescopeTableModel;
102  QDataWidgetMapper* lensMapper;
103  QList<Lens *>* lense;
104  PropertyBasedTableModel* lensTableModel;
105  QRegExpValidator* validatorName;
106 };
107 
108 #endif // _OCULARDIALOG_HPP_
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:72
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