Stellarium  0.90.0
PulsarsDialog.hpp
1 /*
2  * Stellarium Pulsars 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 _PULSARSDIALOG_HPP_
22 #define _PULSARSDIALOG_HPP_
23 
24 #include <QObject>
25 #include "StelDialog.hpp"
26 #include "Pulsars.hpp"
27 
28 class Ui_pulsarsDialog;
29 class Pulsars;
30 class QTimer;
31 
33 class PulsarsDialog : public StelDialog
34 {
35  Q_OBJECT
36 
37 public:
38  PulsarsDialog();
39  ~PulsarsDialog();
40 
41 protected:
43  void createDialogContent();
44 
45 public slots:
46  void retranslate();
47  void refreshUpdateValues(void);
48 
49 private slots:
50  void setUpdateValues(int days);
51  void setUpdatesEnabled(int checkState);
52  void setDistributionEnabled(int checkState);
53  void setSeparateColorsFlag(int checkState);
54  void setDisplayAtStartupEnabled(int checkState);
55  void setDisplayShowPulsarsButton(int checkState);
56  void updateStateReceiver(Pulsars::UpdateState state);
57  void updateCompleteReceiver();
58  void restoreDefaults(void);
59  void saveSettings(void);
60  void updateJSON(void);
61 
62 private:
63  Ui_pulsarsDialog* ui;
64  Pulsars* psr;
65  void setAboutHtml(void);
66  void updateGuiFromSettings(void);
67  QTimer* updateTimer;
68 
69 };
70 
71 #endif // _PULSARSDIALOG_HPP_
Main class of the Pulsars plugin.
Definition: Pulsars.hpp:73
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:72
UpdateState
Used for keeping for track of the download/update status.
Definition: Pulsars.hpp:84
void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.