19 #ifndef _SUPERNOVAE_HPP_
20 #define _SUPERNOVAE_HPP_
22 #include "StelObjectModule.hpp"
23 #include "StelObject.hpp"
24 #include "StelFader.hpp"
25 #include "Supernova.hpp"
27 #include <QVariantMap>
30 #include <QSharedPointer>
33 class QNetworkAccessManager;
40 typedef QSharedPointer<Supernova> SupernovaP;
114 virtual QStringList listAllObjects(
bool inEnglish)
const;
115 virtual QString getName()
const {
return "Historical Supernovae"; }
118 SupernovaP
getByID(
const QString&
id);
148 void setUpdateFrequencyDays(
int days) {updateFrequencyDays = days;}
174 void displayMessage(
const QString& message,
const QString hexColor=
"#999999");
175 void messageTimeout(
void);
182 void restoreDefaultConfigIni(
void);
185 void restoreDefaultJsonFile(
void);
188 void readJsonFile(
void);
193 bool backupJsonFile(
bool deleteOriginal=
false);
197 int getJsonFileVersion(
void);
200 QVariantMap loadSNeMap(QString path=QString());
203 void setSNeMap(
const QVariantMap& map);
208 QList<SupernovaP> snstar;
209 QHash<QString, double> snlist;
213 QNetworkAccessManager* downloadMgr;
215 QProgressBar* progressBar;
217 QTimer* messageTimer;
218 QList<int> messageIDs;
220 QDateTime lastUpdate;
221 int updateFrequencyDays;
232 void checkForUpdate(
void);
233 void updateDownloadComplete(QNetworkReply* reply);
240 #include "StelPluginInterface.hpp"