Stellarium 0.14.3
TimeZoneConfigurationWindow.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_WINDOW_HPP_
21 #define _TIME_ZONE_CONFIGURATION_WINDOW_HPP_
22 
23 #include "StelDialog.hpp"
24 
25 #include <QString>
26 #include <QDoubleSpinBox>
27 
28 class Ui_timeZoneConfigurationWindowForm;
31 
34 {
35  Q_OBJECT
36 
37 public:
40 
45  static double readTzOffsetString(const QString& string);
46 
49  static void readTzTimeString(const QString& string, int& hour, int& minutes, int& seconds);
50 
55  static QString getTzOffsetStringFrom(QDoubleSpinBox * spinBox);
56 
57 public slots:
58  void retranslate();
59 
60 protected:
61  void createDialogContent();
62 
63 private:
64  Ui_timeZoneConfigurationWindowForm * ui;
65  DefineTimeZoneWindow * defineTimeZoneWindow;
66  TimeZoneConfiguration * timeZoneConfiguration;
67 
68  void updateAboutText();
69 
70 private slots:
71  void saveTimeZoneSettings();
72  void openDefineTimeZoneWindow();
73  void closeDefineTimeZoneWindow(bool);
74  void timeZoneDefined(QString timeZoneDefinition);
75 
76  void setTimeFormat(bool);
77  void setDateFormat(bool);
78  void updateDisplayFormatSwitches();
79 };
80 
81 
82 #endif //_TIME_ZONE_CONFIGURATION_WINDOW_HPP_
A local copy of StelDialog, the base class for all the GUI windows in Stellarium, included to allow t...
Main window of the Time Zone configuration plug-in.
static void readTzTimeString(const QString &string, int &hour, int &minutes, int &seconds)
Parses a time string in the format hh[:mm[:ss]] to separate values.
static QString getTzOffsetStringFrom(QDoubleSpinBox *spinBox)
Converts a decimal fraction of hours to a string containing a signed offset in the format used in the...
static double readTzOffsetString(const QString &string)
Parses an offset string in the format [+|-]hh[:mm[:ss]].