Stellarium 0.14.3
FOV.hpp
1 /*
2  * FOV plug-in for Stellarium
3  *
4  * Copyright (C) 2014 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, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef _FOV_HPP_
21 #define _FOV_HPP_
22 
23 #include "StelGui.hpp"
24 #include "StelModule.hpp"
25 
26 #include <QString>
27 
28 class FOVWindow;
29 
43 class FOV : public StelModule
48 {
49  Q_OBJECT
50 
51 public:
52  FOV();
53  ~FOV();
54 
55  virtual void init();
56  virtual void deinit();
57  virtual void update(double deltaTime);
58  //virtual void draw(StelCore *core);
59  virtual double getCallOrder(StelModuleActionName actionName) const;
60  virtual bool configureGui(bool show);
61 
64  void restoreDefaults(void);
65 
68  void readSettingsFromConfig(void);
69 
71  void saveSettingsToConfig(void);
72 
73  void setQuickFOV(const double value, const int item);
74  double getQuickFOV(const int item) const;
75 
76 public slots:
77  void setFOV();
78 
79 private:
80  // if existing, delete Satellites section in main config.ini, then create with default values
81  void restoreDefaultConfigIni(void);
82 
83  QList<double> FOVitem, FOVdefault;
84 
85  FOVWindow* mainWindow;
86  QSettings* conf;
87 };
88 
89 
90 #include <QObject>
91 #include "StelPluginInterface.hpp"
92 
94 class FOVStelPluginInterface : public QObject, public StelPluginInterface
95 {
96  Q_OBJECT
97  Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
98  Q_INTERFACES(StelPluginInterface)
99 public:
100  virtual StelModule* getStelModule() const;
101  virtual StelPluginInfo getPluginInfo() const;
102 };
103 
104 #endif /* _FOV_HPP_ */
void readSettingsFromConfig(void)
Read (or re-read) settings from the main config file.
void restoreDefaults(void)
Set up the plugin with default values.
Main window of the FOV plug-in.
Definition: FOVWindow.hpp:33
Main class of the Field of View plugin.
Definition: FOV.hpp:47
This class is used by Qt to manage a plug-in interface.
Definition: FOV.hpp:94
virtual StelPluginInfo getPluginInfo() const =0
void saveSettingsToConfig(void)
Save the settings to the main configuration file.
virtual class StelModule * getStelModule() const =0