22 #include "StelObjectModule.hpp"
23 #include "StelObject.hpp"
24 #include "StelFader.hpp"
27 #include <QVariantMap>
30 #include <QSharedPointer>
32 class QNetworkAccessManager;
42 typedef QSharedPointer<Pulsar> PulsarP;
98 virtual QStringList listAllObjects(
bool inEnglish)
const;
99 virtual QString getName()
const {
return "Pulsars"; }
102 PulsarP
getByID(
const QString&
id);
127 bool getDisplayMode(
void) {
return distributionEnabled;}
128 void setDisplayMode(
bool b) {distributionEnabled=b;}
130 void setEnableAtStartup(
bool b) { enableAtStartup=b; }
131 bool getEnableAtStartup(
void) {
return enableAtStartup; }
138 void setUpdateFrequencyDays(
int days) {updateFrequencyDays = days;}
158 void setFlagShowPulsars(
bool b) { flagShowPulsars=b; }
159 bool getFlagShowPulsars(
void) {
return flagShowPulsars; }
162 void displayMessage(
const QString& message,
const QString hexColor=
"#999999");
163 void messageTimeout(
void);
167 bool getFlagShowPulsarsButton(
void) {
return flagShowPulsarsButton; }
175 void restoreDefaultConfigIni(
void);
178 void upgradeConfigIni(
void);
181 void restoreDefaultJsonFile(
void);
184 void readJsonFile(
void);
189 bool backupJsonFile(
bool deleteOriginal=
false);
193 int getJsonFileFormatVersion(
void);
196 QVariantMap loadPSRMap(QString path=QString());
199 void setPSRMap(
const QVariantMap& map);
201 QString jsonCatalogPath;
209 QNetworkAccessManager* downloadMgr;
212 QTimer* messageTimer;
213 QList<int> messageIDs;
215 QDateTime lastUpdate;
216 int updateFrequencyDays;
217 bool distributionEnabled;
218 bool enableAtStartup;
224 bool flagShowPulsars;
225 bool flagShowPulsarsButton;
230 QProgressBar* progressBar;
237 void checkForUpdate(
void);
238 void updateDownloadComplete(QNetworkReply* reply);
245 #include "StelPluginInterface.hpp"