22 #include "StelObjectModule.hpp"
23 #include "StelObject.hpp"
26 #include <QVariantMap>
29 #include <QSharedPointer>
32 class QNetworkAccessManager;
41 typedef QSharedPointer<Quasar> QuasarP;
99 virtual QStringList listAllObjects(
bool inEnglish)
const;
100 virtual QString getName()
const {
return "Quasars"; }
103 QuasarP
getByID(
const QString&
id);
128 bool getDisplayMode(
void) {
return distributionEnabled;}
129 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 setFlagShowQuasars(
bool b) { flagShowQuasars=b; }
159 bool getFlagShowQuasars(
void) {
return flagShowQuasars; }
163 bool getFlagShowQuasarsButton(
void) {
return flagShowQuasarsButton; }
166 void displayMessage(
const QString& message,
const QString hexColor=
"#999999");
167 void messageTimeout(
void);
174 void restoreDefaultConfigIni(
void);
177 void upgradeConfigIni(
void);
180 void restoreDefaultJsonFile(
void);
183 void readJsonFile(
void);
188 bool backupJsonFile(
bool deleteOriginal=
false);
192 int getJsonFileFormatVersion(
void);
195 QVariantMap loadQSOMap(QString path=QString());
198 void setQSOMap(
const QVariantMap& map);
200 QString catalogJsonPath;
208 QNetworkAccessManager* downloadMgr;
211 QTimer* messageTimer;
212 QList<int> messageIDs;
214 QDateTime lastUpdate;
215 int updateFrequencyDays;
216 bool distributionEnabled;
217 bool enableAtStartup;
223 bool flagShowQuasars;
224 bool flagShowQuasarsButton;
229 QProgressBar* progressBar;
235 void checkForUpdate(
void);
236 void updateDownloadComplete(QNetworkReply* reply);
243 #include "StelPluginInterface.hpp"