Stellarium 0.15.2
ExoplanetsDialog.hpp
1 /*
2  * Stellarium Exoplanets Plug-in GUI
3  *
4  * Copyright (C) 2012 Alexander Wolf
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 _EXOPLANETSDIALOG_HPP_
22 #define _EXOPLANETSDIALOG_HPP_
23 
24 #include <QObject>
25 #include "StelDialog.hpp"
26 #include "Exoplanets.hpp"
27 
28 class Ui_exoplanetsDialog;
29 class QTimer;
30 class Exoplanets;
31 
35 {
36  Q_OBJECT
37 
38 public:
41 
42 protected:
44  void createDialogContent();
45 
46 public slots:
47  void retranslate();
48  void refreshUpdateValues(void);
49 
50 private slots:
51  void setUpdateValues(int hours);
52  void setUpdatesEnabled(int checkState);
53  void setDistributionEnabled(int checkState);
54  void setTimelineEnabled(int checkState);
55  void setHabitableEnabled(int checkState);
56  void setDisplayAtStartupEnabled(int checkState);
57  void setDisplayShowExoplanetsButton(int checkState);
58  void setDisplayShowExoplanetsDesignations(int checkState);
59  void updateStateReceiver(Exoplanets::UpdateState state);
60  void updateCompleteReceiver();
61  void restoreDefaults(void);
62  void saveSettings(void);
63  void updateJSON(void);
64  void drawDiagram(void);
65  void populateDiagramsList();
66 
67 private:
68  Ui_exoplanetsDialog* ui;
69  Exoplanets* ep;
70  void setAboutHtml(void);
71  void setInfoHtml(void);
72  void setWebsitesHtml(void);
73  void updateGuiFromSettings(void);
74  QTimer* updateTimer;
75 
76  typedef QPair<QString, int> axisPair;
77 };
78 
79 #endif // _EXOPLANETSDIALOG_HPP_
UpdateState
Used for keeping for track of the download/update status.
Definition: Exoplanets.hpp:81
void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:72
Main class of the Exoplanets plugin.
Definition: Exoplanets.hpp:70
Main window of the Exoplanets plugin.