Quasars.hpp   Quasars.hpp 
skipping to change at line 72 skipping to change at line 72
//! @ingroup quasars //! @ingroup quasars
typedef QSharedPointer<Quasar> QuasarP; typedef QSharedPointer<Quasar> QuasarP;
//! @class Quasars //! @class Quasars
//! Main class of the %Quasars plugin. //! Main class of the %Quasars plugin.
//! @author Alexander Wolf //! @author Alexander Wolf
//! @ingroup quasars //! @ingroup quasars
class Quasars : public StelObjectModule class Quasars : public StelObjectModule
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool quasarsVisible READ getFlagShowQuasars WRITE setFlag Q_PROPERTY(bool quasarsVisible
ShowQuasars) READ getFlagShowQuasars
WRITE setFlagShowQuasars
NOTIFY flagQuasarsVisibilityChanged
)
public: public:
//! @enum UpdateState //! @enum UpdateState
//! Used for keeping for track of the download/update status //! Used for keeping for track of the download/update status
enum UpdateState { enum UpdateState {
Updating, //!< Update in progress Updating, //!< Update in progress
CompleteNoUpdates, //!< Update completed, there we no u pdates CompleteNoUpdates, //!< Update completed, there we no u pdates
CompleteUpdates, //!< Update completed, there were up dates CompleteUpdates, //!< Update completed, there were up dates
DownloadError, //!< Error during download phase DownloadError, //!< Error during download phase
OtherError //!< Other error OtherError //!< Other error
}; };
skipping to change at line 113 skipping to change at line 117
virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const; virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const;
//! Return the matching satellite object's pointer if exists or NULL . //! Return the matching satellite object's pointer if exists or NULL .
//! @param nameI18n The case in-sensistive satellite name //! @param nameI18n The case in-sensistive satellite name
virtual StelObjectP searchByNameI18n(const QString& nameI18n) const; virtual StelObjectP searchByNameI18n(const QString& nameI18n) const;
//! Return the matching satellite if exists or NULL. //! Return the matching satellite if exists or NULL.
//! @param name The case in-sensistive standard program name //! @param name The case in-sensistive standard program name
virtual StelObjectP searchByName(const QString& name) const; virtual StelObjectP searchByName(const QString& name) const;
//! Find and return the list of at most maxNbItem objects auto-compl eting the passed object I18n name. //! Find and return the list of at most maxNbItem objects auto-compl eting the passed object name.
//! @param objPrefix the case insensitive first letters of the searc hed object //! @param objPrefix the case insensitive first letters of the searc hed object
//! @param maxNbItem the maximum number of returned object names //! @param maxNbItem the maximum number of returned object names
//! @param useStartOfWords the autofill mode for returned objects na mes //! @param useStartOfWords the autofill mode for returned objects na mes
//! @return a list of matching object name by order of relevance, or an empty list if nothing match //! @return a list of matching object name by order of relevance, or an empty list if nothing match
virtual QStringList listMatchingObjectsI18n(const QString& objPrefix virtual QStringList listMatchingObjects(const QString& objPrefix, in
, int maxNbItem=5, bool useStartOfWords=false) const; t maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const;
//! Find and return the list of at most maxNbItem objects auto-compl
eting the passed object English name.
//! @param objPrefix the case insensitive first letters of the searc
hed object
//! @param maxNbItem the maximum number of returned object names
//! @param useStartOfWords the autofill mode for returned objects na
mes
//! @return a list of matching object name by order of relevance, or
an empty list if nothing match
virtual QStringList listMatchingObjects(const QString& objPrefix, in
t maxNbItem=5, bool useStartOfWords=false) const;
virtual QStringList listAllObjects(bool inEnglish) const; virtual QStringList listAllObjects(bool inEnglish) const;
virtual QStringList listAllObjectsByType(const QString& objType, boo l inEnglish) const { Q_UNUSED(objType) Q_UNUSED(inEnglish) return QStringLi st(); }
virtual QString getName() const { return "Quasars"; } virtual QString getName() const { return "Quasars"; }
//! get a Quasar object by identifier //! get a Quasar object by identifier
QuasarP getByID(const QString& id); QuasarP getByID(const QString& id);
//! Implement this to tell the main Stellarium GUI that there is a G UI element to configure this //! Implement this to tell the main Stellarium GUI that there is a G UI element to configure this
//! plugin. //! plugin.
virtual bool configureGui(bool show=true); virtual bool configureGui(bool show=true);
skipping to change at line 158 skipping to change at line 154
//! Save the settings to the main configuration file. //! Save the settings to the main configuration file.
void saveSettingsToConfig(void); void saveSettingsToConfig(void);
//! 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);
void setDisplayMode(bool b);
QString getMarkerColor(void);
void setMarkerColor(QString c);
void setEnableAtStartup(bool b) { enableAtStartup=b; } void setEnableAtStartup(bool b) { enableAtStartup=b; }
bool getEnableAtStartup(void) { return enableAtStartup; } 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);
//! Get the current updateState //! Get the current updateState
UpdateState getUpdateState(void) {return updateState;} UpdateState getUpdateState(void) {return updateState;}
//! Get count of quasars from catalog
int getCountQuasars(void) {return QsrCount;}
signals: signals:
//! @param state the new update state. //! @param state the new update state.
void updateStateChanged(Quasars::UpdateState state); void updateStateChanged(Quasars::UpdateState state);
//! emitted after a JSON update has run. //! emitted after a JSON update has run.
void jsonUpdateComplete(void); void jsonUpdateComplete(void);
void flagQuasarsVisibilityChanged(bool b);
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 setFlagShowQuasars(bool b) { flagShowQuasars=b; } //! Enable/disable display of markers of quasars
//! @param b boolean flag
void setFlagShowQuasars(bool b);
//! Get status to display of markers of quasars
//! @return true if it's visible
bool getFlagShowQuasars(void) { return flagShowQuasars; } bool getFlagShowQuasars(void) { return flagShowQuasars; }
//! Define whether the button toggling quasars should be visible //! Define whether the button toggling quasars should be visible
void setFlagShowQuasarsButton(bool b); void setFlagShowQuasarsButton(bool b);
bool getFlagShowQuasarsButton(void) { return flagShowQuasarsButton; } bool getFlagShowQuasarsButton(void) { return flagShowQuasarsButton; }
//! Display a message. This is used for plugin-specific warnings and //! Get count of quasars from catalog
such //! @return count of quasars
void displayMessage(const QString& message, const QString hexColor=" int getCountQuasars(void) {return QsrCount;}
#999999");
void messageTimeout(void); //! Get status to display of distribution of pulsars
//! @return true if distribution of pulsars is enabled
bool getDisplayMode(void);
//! Enable/disable display of distribution of pulsars
//! @param b (set true for display quasars as markers)
void setDisplayMode(bool b);
//! Get color for quasars markers
//! @return color
Vec3f getMarkerColor(void);
//! Set color for quasars markers
//! @param c color
//! @code
//! // example of usage in scripts
//! Quasars.setMarkerColor(Vec3f(1.0,0.0,0.0));
//! @endcode
void setMarkerColor(const Vec3f& c);
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 // Upgrade config.ini: rename old key settings to new
void upgradeConfigIni(void); void upgradeConfigIni(void);
skipping to change at line 277 skipping to change at line 290
StelButton* toolbarButton; StelButton* toolbarButton;
class StelProgressController* progressBar; class StelProgressController* 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);
//! Display a message. This is used for plugin-specific warnings and
such
void displayMessage(const QString& message, const QString hexColor="
#999999");
void messageTimeout(void);
void reloadCatalog(void);
}; };
#include <QObject> #include <QObject>
#include "StelPluginInterface.hpp" #include "StelPluginInterface.hpp"
//! This class is used by Qt to manage a plug-in interface //! This class is used by Qt to manage a plug-in interface
class QuasarsStelPluginInterface : public QObject, public StelPluginInterfa ce class QuasarsStelPluginInterface : public QObject, public StelPluginInterfa ce
{ {
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID StelPluginInterface_iid) Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
 End of changes. 10 change blocks. 
31 lines changed or deleted 43 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/