Novae.hpp   Novae.hpp 
skipping to change at line 101 skipping to change at line 101
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in StelObjectManager class // Methods defined in StelObjectManager class
//! Used to get a list of objects which are near to some position. //! Used to get a list of objects which are near to some position.
//! @param v a vector representing the position in th sky around whi ch to search for nebulae. //! @param v a vector representing the position in th sky around whi ch to search for nebulae.
//! @param limitFov the field of view around the position v in which to search for satellites. //! @param limitFov the field of view around the position v in which to search for satellites.
//! @param core the StelCore to use for computations. //! @param core the StelCore to use for computations.
//! @return an list containing the satellites located inside the lim itFov circle around position v. //! @return an list containing the satellites located inside the lim itFov circle around position v.
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 Q_NU LLPTR.
//! @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 Q_NULLPTR.
//! @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;
virtual StelObjectP searchByID(const QString &id) const
{
return qSharedPointerCast<StelObject>(getByID(id));
}
//! Find and return the list of at most maxNbItem objects auto-compl eting the passed object 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 listMatchingObjects(const QString& objPrefix, in t maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const; virtual QStringList listMatchingObjects(const QString& objPrefix, in t maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const;
virtual QStringList listAllObjects(bool inEnglish) const; virtual QStringList listAllObjects(bool inEnglish) const;
virtual QString getName() const { return "Bright Novae"; } virtual QString getName() const { return "Bright Novae"; }
virtual QString getStelObjectType() const { return Nova::NOVA_TYPE; }
//! get a nova object by identifier //! get a nova object by identifier
NovaP getByID(const QString& id); NovaP getByID(const QString& id) const;
//! 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);
//! Set up the plugin with default values. This means clearing out the Pulsars section in the //! Set up the plugin with default values. This means clearing out the Pulsars section in the
//! main config.ini (if one already exists), and populating it with default values. It also //! main config.ini (if one already exists), and populating it with default values. It also
//! creates the default novae.json file from the resource embedded i n the plugin lib/dll file. //! creates the default novae.json file from the resource embedded i n the plugin lib/dll file.
void restoreDefaults(void); void restoreDefaults(void);
skipping to change at line 145 skipping to change at line 151
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;}
//! Get the date and time the novae were updated //! Get the date and time the novae were updated
QDateTime getLastUpdate(void) {return lastUpdate;} QDateTime getLastUpdate(void) const {return lastUpdate;}
//! Get the update frequency in days //! Get the update frequency in days
int getUpdateFrequencyDays(void) {return updateFrequencyDays;} int getUpdateFrequencyDays(void) const {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) const {return updateState;}
//! Get list of novae //! Get list of novae
QString getNovaeList(); QString getNovaeList();
//! Get lower limit of brightness for displayed novae //! Get lower limit of brightness for displayed novae
float getLowerLimitBrightness(); float getLowerLimitBrightness();
//! Get count of novae from catalog //! Get count of novae from catalog
int getCountNovae(void) {return NovaCnt;} int getCountNovae(void) const {return NovaCnt;}
signals: signals:
//! @param state the new update state. //! @param state the new update state.
void updateStateChanged(Novae::UpdateState state); void updateStateChanged(Novae::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:
// FIXME: Add functions for scripting support // FIXME: Add functions for scripting support
//! 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);
//! 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) const;
void reloadCatalog(void); void reloadCatalog(void);
private: private:
// Font used for displaying our text // Font used for displaying our text
QFont font; QFont font;
// if existing, delete Novae section in main config.ini, then create with default values // if existing, delete Novae section in main config.ini, then create with default values
void restoreDefaultConfigIni(void); void restoreDefaultConfigIni(void);
skipping to change at line 206 skipping to change at line 212
//! Read the JSON file and create list of novae. //! Read the JSON file and create list of novae.
void readJsonFile(void); void readJsonFile(void);
//! Creates a backup of the novae.json file called novae.json.old //! Creates a backup of the novae.json file called novae.json.old
//! @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 novae.json file //! Get the version from the "version" value in the novae.json file
//! @return version string, e.g. "1" //! @return version string, e.g. "1"
int getJsonFileVersion(void); int getJsonFileVersion(void) const;
//! Check format of the catalog of novae //! Check format of the catalog of novae
//! @return valid boolean, e.g. "true" //! @return valid boolean, e.g. "true"
bool checkJsonFileFormat(void); bool checkJsonFileFormat(void) const;
//! Parse JSON file and load novae to map //! Parse JSON file and load novae to map
QVariantMap loadNovaeMap(QString path=QString()); QVariantMap loadNovaeMap(QString path=QString());
//! Set items for list of struct from data map //! Set items for list of struct from data map
void setNovaeMap(const QVariantMap& map); void setNovaeMap(const QVariantMap& map);
QString novaeJsonPath; QString novaeJsonPath;
int NovaCnt; int NovaCnt;
skipping to change at line 264 skipping to change at line 270
//! 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 NovaeStelPluginInterface : public QObject, public StelPluginInterface class NovaeStelPluginInterface : public QObject, public StelPluginInterface
{ {
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID StelPluginInterface_iid) Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
Q_INTERFACES(StelPluginInterface) Q_INTERFACES(StelPluginInterface)
public: public:
virtual StelModule* getStelModule() const; virtual StelModule* getStelModule() const;
virtual StelPluginInfo getPluginInfo() const; virtual StelPluginInfo getPluginInfo() const;
virtual QObjectList getExtensionList() const { return QObjectList(); }
}; };
#endif /*_NOVAE_HPP_*/ #endif /*_NOVAE_HPP_*/
 End of changes. 13 change blocks. 
10 lines changed or deleted 17 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/