Stellarium 0.14.3
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();
85  void editStoredPoints();
87  void addStoredPointToComboBox(int number,
88  QString name,
89  double radiansRA,
90  double radiansDec);
92  void removeStoredPointFromComboBox(int number);
94  void getStoredPointInfo();
95  //
96 
97 private:
98  //
99  TelescopeControl * telescopeManager;
100  StoredPointsDialog * storedPointsDialog;
101  QHash<QString, int> connectedSlotsByName;
102  QVariantMap storedPointsDescriptions;
103 
104  void updateTelescopeList();
105  void updateTelescopeControls();
106  //
107  void updateStoredPointsList();
108  //
109  void savePointsToFile();
110  void loadPointsFromFile();
111 };
112 
113 #endif // _SLEWDIALOG_
virtual void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.
A local copy of StelDialog, the base class for all the GUI windows in Stellarium, included to allow t...
This class manages the controlling of one or more telescopes by one instance of the stellarium progra...