Pulsars.hpp   Pulsars.hpp 
skipping to change at line 37 skipping to change at line 37
#include <QVariantMap> #include <QVariantMap>
#include <QDateTime> #include <QDateTime>
#include <QList> #include <QList>
#include <QSharedPointer> #include <QSharedPointer>
class QNetworkAccessManager; class QNetworkAccessManager;
class QNetworkReply; class QNetworkReply;
class QProgressBar; class QProgressBar;
class QSettings; class QSettings;
class QTimer; class QTimer;
class QPixmap;
class StelButton;
class PulsarsDialog; class PulsarsDialog;
typedef QSharedPointer<Pulsar> PulsarP; typedef QSharedPointer<Pulsar> PulsarP;
//! This is an example of a plug-in which can be dynamically loaded into st ellarium //! This is an example of a plug-in which can be dynamically loaded into st ellarium
class Pulsars : public StelObjectModule class Pulsars : public StelObjectModule
{ {
Q_OBJECT Q_OBJECT
public: public:
//! @enum UpdateState //! @enum UpdateState
skipping to change at line 127 skipping to change at line 129
//! get whether or not the plugin will try to update catalog data fr om the internet //! get whether or not the plugin will try to update catalog data fr om the internet
//! @return true if updates are set to be done, false otherwise //! @return true if updates are set to be done, false otherwise
bool getUpdatesEnabled(void) {return updatesEnabled;} bool getUpdatesEnabled(void) {return updatesEnabled;}
//! set whether or not the plugin will try to update catalog data fr om the internet //! set whether or not the plugin will try to update catalog data fr om the internet
//! @param b if true, updates will be enabled, else they will be dis abled //! @param b if true, updates will be enabled, else they will be dis abled
void setUpdatesEnabled(bool b) {updatesEnabled=b;} void setUpdatesEnabled(bool b) {updatesEnabled=b;}
bool getDisplayMode(void) {return distributionEnabled;} bool getDisplayMode(void) {return distributionEnabled;}
void setDisplayMode(bool b) {distributionEnabled=b;} void setDisplayMode(bool b) {distributionEnabled=b;}
void setEnableAtStartup(bool b) { enableAtStartup=b; }
bool getEnableAtStartup(void) { return enableAtStartup; }
//! get the date and time the TLE elements were updated //! get the date and time the TLE elements were updated
QDateTime getLastUpdate(void) {return lastUpdate;} QDateTime getLastUpdate(void) {return lastUpdate;}
//! get the update frequency in days //! get the update frequency in days
int getUpdateFrequencyDays(void) {return updateFrequencyDays;} int getUpdateFrequencyDays(void) {return updateFrequencyDays;}
void setUpdateFrequencyDays(int days) {updateFrequencyDays = days;} void setUpdateFrequencyDays(int days) {updateFrequencyDays = days;}
//! get the number of seconds till the next update //! get the number of seconds till the next update
int getSecondsToUpdate(void); int getSecondsToUpdate(void);
skipping to change at line 152 skipping to change at line 157
void updateStateChanged(Pulsars::UpdateState state); void updateStateChanged(Pulsars::UpdateState state);
//! emitted after a JSON update has run. //! emitted after a JSON update has run.
void jsonUpdateComplete(void); void jsonUpdateComplete(void);
public slots: public slots:
//! Download JSON from web recources described in the module section of the //! Download JSON from web recources described in the module section of the
//! module.ini file and update the local JSON file. //! module.ini file and update the local JSON file.
void updateJSON(void); void updateJSON(void);
void setFlagShowPulsars(bool b) { flagShowPulsars=b; }
bool getFlagShowPulsars(void) { return flagShowPulsars; }
//! Display a message. This is used for plugin-specific warnings and such //! Display a message. This is used for plugin-specific warnings and such
void displayMessage(const QString& message, const QString hexColor=" #999999"); void displayMessage(const QString& message, const QString hexColor=" #999999");
void messageTimeout(void); void messageTimeout(void);
//! Define whether the button toggling pulsars should be visible
void setFlagShowPulsarsButton(bool b);
bool getFlagShowPulsarsButton(void) { return flagShowPulsarsButton;
}
private: private:
// Font used for displaying our text // Font used for displaying our text
QFont font; QFont font;
// if existing, delete Satellites section in main config.ini, then c reate with default values // if existing, delete Satellites section in main config.ini, then c reate with default values
void restoreDefaultConfigIni(void); void restoreDefaultConfigIni(void);
// Upgrade config.ini: rename old key settings to new
void upgradeConfigIni(void);
//! replace the json file with the default from the compiled-in reso urce //! replace the json file with the default from the compiled-in reso urce
void restoreDefaultJsonFile(void); void restoreDefaultJsonFile(void);
//! read the json file and create list of Pulsars. //! read the json file and create list of Pulsars.
void readJsonFile(void); void readJsonFile(void);
//! Creates a backup of the pulsars.json file called pulsars.json.ol d //! Creates a backup of the pulsars.json file called pulsars.json.ol d
//! @param deleteOriginal if true, the original file is removed, els e not //! @param deleteOriginal if true, the original file is removed, els e not
//! @return true on OK, false on failure //! @return true on OK, false on failure
bool backupJsonFile(bool deleteOriginal=false); bool backupJsonFile(bool deleteOriginal=false);
//! Get the version from the "version" value in the pulsars.json fil e //! Get the version from the "version of the format" value in the pu lsars.json file
//! @return version string, e.g. "2" //! @return version string, e.g. "2"
int getJsonFileVersion(void); int getJsonFileFormatVersion(void);
//! parse JSON file and load pulsars to map //! parse JSON file and load pulsars to map
QVariantMap loadPSRMap(QString path=QString()); QVariantMap loadPSRMap(QString path=QString());
//! set items for list of struct from data map //! set items for list of struct from data map
void setPSRMap(const QVariantMap& map); void setPSRMap(const QVariantMap& map);
QString jsonCatalogPath; QString jsonCatalogPath;
class StelTextureNew* texPointer; class StelTextureNew* texPointer;
class StelTextureNew* markerTexture; class StelTextureNew* markerTexture;
QList<PulsarP> psr; QList<PulsarP> psr;
// variables and functions for the updater // variables and functions for the updater
UpdateState updateState; UpdateState updateState;
QNetworkAccessManager* downloadMgr; QNetworkAccessManager* downloadMgr;
QString updateUrl; QString updateUrl;
QString updateFile;
QProgressBar* progressBar;
QTimer* updateTimer; QTimer* updateTimer;
QTimer* messageTimer; QTimer* messageTimer;
QList<int> messageIDs; QList<int> messageIDs;
bool updatesEnabled; bool updatesEnabled;
QDateTime lastUpdate; QDateTime lastUpdate;
int updateFrequencyDays; int updateFrequencyDays;
bool distributionEnabled; bool distributionEnabled;
bool enableAtStartup;
QSettings* conf; QSettings* conf;
// GUI // GUI
PulsarsDialog* configDialog; PulsarsDialog* configDialog;
bool flagShowPulsars;
bool flagShowPulsarsButton;
QPixmap* OnIcon;
QPixmap* OffIcon;
QPixmap* GlowIcon;
StelButton* toolbarButton;
QProgressBar* progressBar;
private slots: private slots:
//! check to see if an update is required. This is called periodica lly by a timer //! check to see if an update is required. This is called periodica lly by a timer
//! if the last update was longer than updateFrequencyHours ago then the update is //! if the last update was longer than updateFrequencyHours ago then the update is
//! done. //! done.
void checkForUpdate(void); void checkForUpdate(void);
void updateDownloadComplete(QNetworkReply* reply); void updateDownloadComplete(QNetworkReply* reply);
}; };
 End of changes. 10 change blocks. 
4 lines changed or deleted 26 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/