Stellarium 0.12.4
CustomDeltaTEquationDialog.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2013 Alexander Wolf
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
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 // AW: Methods copied largely from AddRemoveLandscapesDialog
20 
21 #ifndef _CUSTOMDELTATEQUATIONDIALOG_HPP_
22 #define _CUSTOMDELTATEQUATIONDIALOG_HPP_
23 
24 #include <QObject>
25 #include <QSettings>
26 #include "StelDialog.hpp"
27 #include "StelCore.hpp"
28 
29 class Ui_CustomDeltaTEquationDialogForm;
30 
33 {
34  Q_OBJECT
35 
36 public:
38  virtual ~CustomDeltaTEquationDialog();
39 
40 public slots:
41  void retranslate();
42  void setVisible(bool);
43 
44 protected:
46  virtual void createDialogContent();
47  Ui_CustomDeltaTEquationDialogForm *ui;
48 
49 private slots:
50  void saveSettings(void) const;
51 
52  void setNDot(const QString& v);
53  void setYear(const QString& v);
54  void setCoeffA(const QString& v);
55  void setCoeffB(const QString& v);
56  void setCoeffC(const QString& v);
57 
58 private:
59  QSettings* conf;
60  StelCore* core;
61 
62  float year;
63  float ndot;
64  Vec3f coeff;
65 
66  void setDescription(void) const;
67 
68 };
69 
70 #endif // _CUSTOMDELTATEQUATIONDIALOG_HPP_