22 #include "StelObjectModule.hpp" 23 #include "StelObject.hpp" 27 #include <QVariantMap> 30 #include <QSharedPointer> 34 class QNetworkAccessManager;
62 typedef QSharedPointer<Quasar> QuasarP;
72 Q_PROPERTY(
bool quasarsVisible
75 NOTIFY flagQuasarsVisibilityChanged
122 virtual QStringList
listMatchingObjects(
const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=
false,
bool inEnglish=
false)
const;
126 virtual QString getName()
const {
return "Quasars"; }
129 QuasarP
getByID(
const QString&
id);
154 void setEnableAtStartup(
bool b) { enableAtStartup=b; }
155 bool getEnableAtStartup(
void) {
return enableAtStartup; }
162 void setUpdateFrequencyDays(
int days) {updateFrequencyDays = days;}
177 void flagQuasarsVisibilityChanged(
bool b);
193 bool getFlagShowQuasarsButton(
void) {
return flagShowQuasarsButton; }
222 void restoreDefaultConfigIni(
void);
225 void upgradeConfigIni(
void);
228 void restoreDefaultJsonFile(
void);
231 void readJsonFile(
void);
236 bool backupJsonFile(
bool deleteOriginal=
false);
240 int getJsonFileFormatVersion(
void);
244 bool checkJsonFileFormat(
void);
247 QVariantMap loadQSOMap(QString path=QString());
250 void setQSOMap(
const QVariantMap& map);
252 QString catalogJsonPath;
261 QNetworkAccessManager* downloadMgr;
264 QTimer* messageTimer;
265 QList<int> messageIDs;
267 QDateTime lastUpdate;
268 int updateFrequencyDays;
269 bool enableAtStartup;
275 bool flagShowQuasars;
276 bool flagShowQuasarsButton;
287 void checkForUpdate(
void);
288 void updateDownloadComplete(QNetworkReply* reply);
291 void displayMessage(
const QString& message,
const QString hexColor=
"#999999");
292 void messageTimeout(
void);
294 void reloadCatalog(
void);
300 #include "StelPluginInterface.hpp" 306 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
void readSettingsFromConfig(void)
Read (or re-read) settings from the main config file.
Vec3f getMarkerColor(void)
Get color for quasars markers.
UpdateState
Used for keeping for track of the download/update status.
void setFlagShowQuasarsButton(bool b)
Define whether the button toggling quasars should be visible.
virtual void draw(StelCore *core)
Execute all the drawing functions for this module.
QuasarP getByID(const QString &id)
get a Quasar object by identifier
int getCountQuasars(void)
Get count of quasars from catalog.
Define the interface to implement when creating a plugin.
virtual double getCallOrder(StelModuleActionName actionName) const
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.
virtual bool configureGui(bool show=true)
Implement this to tell the main Stellarium GUI that there is a GUI element to configure this plugin...
void jsonUpdateComplete(void)
emitted after a JSON update has run.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Return the matching satellite object's pointer if exists or NULL.
virtual QStringList listMatchingObjects(const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const
Find and return the list of at most maxNbItem objects auto-completing the passed object name...
void setUpdatesEnabled(bool b)
set whether or not the plugin will try to update catalog data from the internet
virtual StelObjectP searchByName(const QString &name) const
Return the matching satellite if exists or NULL.
Update completed, there we no updates.
Define the StelTextureSP type.
int getSecondsToUpdate(void)
get the number of seconds till the next update
Main class for Stellarium core processing.
void saveSettingsToConfig(void)
Save the settings to the main configuration file.
Specialization of StelModule which manages a collection of StelObject.
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Used to get a list of objects which are near to some position.
void restoreDefaults(void)
Set up the plugin with default values.
bool getDisplayMode(void)
Get status to display of distribution of pulsars.
Update completed, there were updates.
virtual QStringList listAllObjects(bool inEnglish) const
List all StelObjects.
bool getFlagShowQuasars(void)
Get status to display of markers of quasars.
Provides functions for performing openGL drawing operations.
void updateStateChanged(Quasars::UpdateState state)
Main class of the Quasars plugin.
virtual void update(double)
Update the module with respect to the time.
bool getUpdatesEnabled(void)
get whether or not the plugin will try to update catalog data from the internet
UpdateState getUpdateState(void)
Get the current updateState.
virtual void init()
Initialize itself.
void setFlagShowQuasars(bool b)
Enable/disable display of markers of quasars.
StelModuleActionName
Define the possible action for which an order is defined.
Maintain the state of a progress bar.
virtual void deinit()
Called before the module will be delete, and before the openGL context is suppressed.
void updateJSON(void)
Download JSON from web recources described in the module section of the module.ini file and update th...
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
Error during download phase.
void setDisplayMode(bool b)
Enable/disable display of distribution of pulsars.
This is the common base class for all the main components of stellarium.
QDateTime getLastUpdate(void)
get the date and time the TLE elements were updated
void setMarkerColor(const Vec3f &c)
Set color for quasars markers.
int getUpdateFrequencyDays(void)
get the update frequency in days
Contains information about a Stellarium plugin.