Stellarium 0.12.3
TextUserInterface.hpp
1 /*
2  * Copyright (C) 2009 Matthew Gates
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17  */
18 
19 #ifndef TEXTUSERINTERFACE_HPP_
20 #define _TEXTUSERINTERFACE_HPP_ 1
21 
22 #include "StelModule.hpp"
23 #include "DummyDialog.hpp"
24 
25 #include <QObject>
26 #include <QString>
27 #include <QFont>
28 
29 class TuiNode;
30 
33 {
34  Q_OBJECT
35 public:
37  virtual ~TextUserInterface();
38 
40  // Methods defined in the StelModule class
41  virtual void init();
42  virtual void update(double) {;}
43  virtual void draw(StelCore* core, class StelRenderer* renderer);
44  virtual double getCallOrder(StelModuleActionName actionName) const;
45  virtual void handleKeys(class QKeyEvent* event);
46 
48  // Methods specific to TextUserInterface
50  void loadConfiguration(void);
51 
52 public slots:
54  void setTuiMenuActive(bool tActive) { tuiActive = tActive;}
56  void setTuiDateTime(bool tDateTime) { tuiDateTime = tDateTime; }
58  void setTuiObjInfo(bool tObjInfo) { tuiObjInfo = tObjInfo; }
60  void setTuiGravityUi(bool tGravityUi) { tuiGravityUi = tGravityUi; }
61 
62 private slots:
63  void setHomePlanet(QString planetName);
64  void setAltitude(int altitude);
65  void setLatitude(double latitude);
66  void setLongitude(double longitude);
67  void setStartupDateMode(QString mode);
68  void setDateFormat(QString format);
69  void setTimeFormat(QString format);
70  void setSkyCulture(QString i18);
71  void setAppLanguage(QString lang);
72  void saveDefaultSettings(void);
73  void shutDown(void);
74  void setBortleScale(int bortle);
75 
76 private:
77  DummyDialog dummyDialog;
78  QFont font;
79  bool tuiActive;
80  bool tuiDateTime;
81  bool tuiObjInfo;
82  bool tuiGravityUi;
83  TuiNode* currentNode;
84 
85  double getLatitude(void);
86  double getLongitude(void);
87 };
88 
89 
90 #include "fixx11h.h"
91 #include <QObject>
92 #include "StelPluginInterface.hpp"
93 
96 {
97  Q_OBJECT
98  Q_INTERFACES(StelPluginInterface)
99 public:
100  virtual StelModule* getStelModule() const;
101  virtual StelPluginInfo getPluginInfo() const;
102 };
103 
104 #endif /*_TEXTUSERINTERFACE_HPP_*/