Stellarium 0.14.3
TimeZoneConfiguration.hpp
1 /*
2  * Time zone configuration plug-in for Stellarium
3  *
4  * Copyright (C) 2010 Bogdan Marinov
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, see <http://www.gnu.org/licenses/>.
18  */
19 
20  #ifndef _TIME_ZONE_CONFIGURATION_HPP_
21  #define _TIME_ZONE_CONFIGURATION_HPP_
22 
23 #include "StelGui.hpp"
24 #include "StelModule.hpp"
25 
26 #include <QString>
27 
29 
31 {
32  Q_OBJECT
33 
34 public:
37 
38  virtual void init();
39  virtual void deinit();
40  virtual void update(double deltaTime);
41  //virtual void draw(StelCore *core);
42  virtual double getCallOrder(StelModuleActionName actionName) const;
43  virtual bool configureGui(bool show);
44 
53  void setTimeZone(QString timeZoneString);
54 
58  QString readTimeZone();
59 
61  void saveDisplayFormats();
62 
63 private:
64  TimeZoneConfigurationWindow * mainWindow;
65 };
66 
67 
68 #include <QObject>
69 #include "StelPluginInterface.hpp"
70 
73 {
74  Q_OBJECT
75  Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
76  Q_INTERFACES(StelPluginInterface)
77 public:
78  virtual StelModule* getStelModule() const;
79  virtual StelPluginInfo getPluginInfo() const;
80 };
81 
82  #endif //_TIME_ZONE_CONFIGURATION_HPP_
virtual StelPluginInfo getPluginInfo() const =0
This class is used by Qt to manage a plug-in interface.
virtual class StelModule * getStelModule() const =0
QString readTimeZone()
Reads the time zone field in Stellarium's configuration file.
Main window of the Time Zone configuration plug-in.
void setTimeZone(QString timeZoneString)
Sets the time zone field in Stellarium's configuration file.
void saveDisplayFormats()
Saves the formats used to display date and time in the bottom bar.