Stellarium 0.12.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 "StelStyle.hpp"
28 
29 #include "StelDialog.hpp"
30 
31 #include "StelObjectMgr.hpp"
32 
33 class Ui_slewDialog;
34 class TelescopeControl;
35 
36 class SlewDialog : public StelDialog
37 {
38  Q_OBJECT
39 public:
40  SlewDialog();
41  virtual ~SlewDialog();
42 
43 public slots:
44  void retranslate();
45 
46 protected:
48  virtual void createDialogContent();
49  Ui_slewDialog* ui;
50 
51 private slots:
53  void showConfiguration();
54 
56  void slew();
57 
58  void addTelescope(int slot, QString name);
59  void removeTelescope(int slot);
60 
65  void setFormatHMS(bool set);
70  void setFormatDMS(bool set);
76  void setFormatDecimal(bool set);
78  void getCurrentObjectInfo();
79 
80 private:
81  TelescopeControl * telescopeManager;
82 
83  QHash<QString, int> connectedSlotsByName;
84 
85  void updateTelescopeList();
86  void updateTelescopeControls();
87 };
88 
89 #endif // _SLEWDIALOG_