19 #ifndef _EXOPLANETS_HPP_
20 #define _EXOPLANETS_HPP_
22 #include "StelObjectModule.hpp"
23 #include "StelObject.hpp"
24 #include "StelFader.hpp"
25 #include "Exoplanet.hpp"
27 #include <QVariantMap>
30 #include <QSharedPointer>
32 class QNetworkAccessManager;
41 typedef QSharedPointer<Exoplanet> ExoplanetP;
65 virtual void update(
double deltaTime);
100 virtual QStringList listAllObjects(
bool inEnglish)
const;
102 virtual QString getName()
const {
return "Exoplanets"; }
105 ExoplanetP
getByID(
const QString&
id);
130 bool getDisplayMode(
void) {
return distributionEnabled;}
131 void setDisplayMode(
bool b) {distributionEnabled=b;}
133 bool getTimelineMode(
void) {
return timelineEnabled;}
134 void setTimelineMode(
bool b) {timelineEnabled=b;}
136 void setEnableAtStartup(
bool b) { enableAtStartup=b; }
137 bool getEnableAtStartup(
void) {
return enableAtStartup; }
144 void setUpdateFrequencyHours(
int hours) {updateFrequencyHours = hours;}
164 void setFlagShowExoplanets(
bool b) { flagShowExoplanets=b; }
165 bool getFlagShowExoplanets(
void) {
return flagShowExoplanets; }
169 bool getFlagShowExoplanetsButton(
void) {
return flagShowExoplanetsButton; }
172 void displayMessage(
const QString& message,
const QString hexColor=
"#999999");
173 void messageTimeout(
void);
180 void restoreDefaultConfigIni(
void);
183 void upgradeConfigIni(
void);
186 void restoreDefaultJsonFile(
void);
189 void readJsonFile(
void);
194 bool backupJsonFile(
bool deleteOriginal=
false);
198 int getJsonFileFormatVersion(
void);
201 QVariantMap loadEPMap(QString path=QString());
204 void setEPMap(
const QVariantMap& map);
206 QString jsonCatalogPath;
210 QList<ExoplanetP> ep;
214 QNetworkAccessManager* downloadMgr;
217 QTimer* messageTimer;
218 QList<int> messageIDs;
220 QDateTime lastUpdate;
221 int updateFrequencyHours;
222 bool distributionEnabled;
223 bool timelineEnabled;
224 bool enableAtStartup;
230 bool flagShowExoplanets;
231 bool flagShowExoplanetsButton;
236 QProgressBar* progressBar;
242 void checkForUpdate(
void);
243 void updateDownloadComplete(QNetworkReply* reply);
250 #include "StelPluginInterface.hpp"