Stellarium 0.15.2
SlewDialog.hpp
1 /*
2  * Stellarium Telescope Control Plug-in
3  *
4  * Copyright (C) 2010 Bogdan Marinov (this file)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
19 */
20 
21 #ifndef _SLEWDIALOG_HPP_
22 #define _SLEWDIALOG_HPP_
23 
24 #include <QObject>
25 #include <QHash>
26 #include <QString>
27 #include <QDir>
28 
29 #include "StoredPointsDialog.hpp"
30 
31 #include "StelStyle.hpp"
32 #include "StelDialog.hpp"
33 #include "StelFileMgr.hpp"
34 
35 class Ui_slewDialog;
36 class TelescopeControl;
37 class StoredPointsDialog;
38 
39 class SlewDialog : public StelDialog
40 {
41  Q_OBJECT
42 public:
43  SlewDialog();
44  virtual ~SlewDialog();
45 
46 public slots:
47  void retranslate();
48 
49 protected:
51  virtual void createDialogContent();
52  Ui_slewDialog* ui;
53 
54 private slots:
56  void showConfiguration();
57 
59  void slew();
60 
61  void addTelescope(int slot, QString name);
62  void removeTelescope(int slot);
63 
68  void setFormatHMS(bool set);
73  void setFormatDMS(bool set);
79  void setFormatDecimal(bool set);
81  void getCurrentObjectInfo();
83  void getCenterInfo();
84 
86  void editStoredPoints();
87  void addStoredPointToComboBox(int number, QString name, double radiansRA, double radiansDec);
88  void removeStoredPointFromComboBox(int number);
89  void clearStoredPointsFromComboBox();
91  void getStoredPointInfo();
92 
93 private:
94  TelescopeControl * telescopeManager;
95  StoredPointsDialog * storedPointsDialog;
96  QHash<QString, int> connectedSlotsByName;
97  QVariantMap storedPointsDescriptions;
98 
99  void updateTelescopeList();
100  void updateTelescopeControls();
101 
102  void updateStoredPointsList();
103 
104  void savePointsToFile();
105  void loadPointsFromFile();
106 };
107 
108 #endif // _SLEWDIALOG_
virtual void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:72
This class manages the controlling of one or more telescopes by one instance of the stellarium progra...