Exoplanets.hpp   Exoplanets.hpp 
skipping to change at line 110 skipping to change at line 110
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// 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 exoplanets. //! @param limitFov the field of view around the position v in which to search for exoplanets.
//! @param core the StelCore to use for computations. //! @param core the StelCore to use for computations.
//! @return an list containing the exoplanets located inside the lim itFov circle around position v. //! @return an list containing the exoplanets 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;
//! 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=true) const; virtual QStringList listMatchingObjects(const QString& objPrefix, in t maxNbItem=5, bool useStartOfWords=false, bool inEnglish=true) const;
virtual QStringList listAllObjects(bool inEnglish) const; virtual QStringList listAllObjects(bool inEnglish) const;
virtual QString getName() const { return "Exoplanets"; } virtual QString getName() const { return "Exoplanets"; }
virtual QString getStelObjectType() const { return Exoplanet::EXOPLA NET_TYPE; }
//! get a exoplanet object by identifier //! get a exoplanet object by identifier
ExoplanetP getByID(const QString& id); ExoplanetP 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);
//! Set up the plugin with default values. This means clearing out the Exoplanets section in the //! Set up the plugin with default values. This means clearing out the Exoplanets 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
skipping to change at line 150 skipping to change at line 153
//! Read (or re-read) settings from the main config file. This will be called from init and also //! Read (or re-read) settings from the main config file. This will be called from init and also
//! when restoring defaults (i.e. from the configuration dialog / re store defaults button). //! when restoring defaults (i.e. from the configuration dialog / re store defaults button).
void loadConfiguration(void); void loadConfiguration(void);
//! Save the settings to the main configuration file. //! Save the settings to the main configuration file.
void saveConfiguration(void); void saveConfiguration(void);
//! get whether or not the plugin will try to update TLE data from t he internet //! get whether or not the plugin will try to update TLE data from t he 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) const {return updatesEnabled;}
//! set whether or not the plugin will try to update TLE data from t he internet //! set whether or not the plugin will try to update TLE data from t he 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;}
void setEnableAtStartup(bool b) { enableAtStartup=b; } void setEnableAtStartup(bool b) { enableAtStartup=b; }
bool getEnableAtStartup(void) { return enableAtStartup; } bool getEnableAtStartup(void) const { 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) const {return lastUpdate;}
//! get the update frequency in hours //! get the update frequency in hours
int getUpdateFrequencyHours(void) {return updateFrequencyHours;} int getUpdateFrequencyHours(void) const {return updateFrequencyHours ;}
void setUpdateFrequencyHours(int hours) {updateFrequencyHours = hour s;} void setUpdateFrequencyHours(int hours) {updateFrequencyHours = hour s;}
//! 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;}
QList<double> getExoplanetsData(int mode) QList<double> getExoplanetsData(int mode) const
{ {
switch(mode) switch(mode)
{ {
case 1: case 1:
return EPSemiAxisAll; return EPSemiAxisAll;
break; break;
case 2: case 2:
return EPMassAll; return EPMassAll;
break; break;
case 3: case 3:
return EPRadiusAll; return EPRadiusAll;
break; break;
case 4: case 4:
return EPPeriodAll; return EPPeriodAll;
break; break;
case 5: case 5:
return EPAngleDistanceAll; return EPAngleDistanceAll;
break; break;
case 6:
return EPEffectiveTempHostStarAll;
break;
case 7:
return EPYearDiscoveryAll;
break;
case 8:
return EPMetallicityHostStarAll;
break;
case 9:
return EPVMagHostStarAll;
break;
case 10:
return EPRAHostStarAll;
break;
case 11:
return EPDecHostStarAll;
break;
case 12:
return EPDistanceHostStarAll;
break;
case 13:
return EPMassHostStarAll;
break;
case 14:
return EPRadiusHostStarAll;
break;
default: default:
return EPEccentricityAll; return EPEccentricityAll;
} }
} }
signals: signals:
//! @param state the new update state. //! @param state the new update state.
void updateStateChanged(Exoplanets::UpdateState state); void updateStateChanged(Exoplanets::UpdateState state);
//! emitted after a JSON update has run. //! emitted after a JSON update has run.
skipping to change at line 214 skipping to change at line 244
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);
//! Enable/disable display of markers of exoplanetary systems //! Enable/disable display of markers of exoplanetary systems
//! @param b boolean flag //! @param b boolean flag
void setFlagShowExoplanets(bool b); void setFlagShowExoplanets(bool b);
//! Get status to display of markers of exoplanetary systems //! Get status to display of markers of exoplanetary systems
//! @return true if it's visible //! @return true if it's visible
bool getFlagShowExoplanets(void) { return flagShowExoplanets; } bool getFlagShowExoplanets(void) const { return flagShowExoplanets; }
//! Enable/disable display of designations of exoplanetary systems //! Enable/disable display of designations of exoplanetary systems
//! @param b boolean flag //! @param b boolean flag
void setFlagShowExoplanetsDesignations(bool b); void setFlagShowExoplanetsDesignations(bool b);
//! Get status to display of designations of exoplanetary systems //! Get status to display of designations of exoplanetary systems
//! @return true if it's visible //! @return true if it's visible
bool getFlagShowExoplanetsDesignations(void); bool getFlagShowExoplanetsDesignations(void) const;
//! Define whether the button toggling exoplanets should be visible //! Define whether the button toggling exoplanets should be visible
void setFlagShowExoplanetsButton(bool b); void setFlagShowExoplanetsButton(bool b);
bool getFlagShowExoplanetsButton(void) { return flagShowExoplanetsBu tton; } bool getFlagShowExoplanetsButton(void) { return flagShowExoplanetsBu tton; }
//! Get status to display of distribution of exoplanetary systems //! Get status to display of distribution of exoplanetary systems
//! @return true if distribution of exoplanetary systems is enabled //! @return true if distribution of exoplanetary systems is enabled
bool getDisplayMode(void); bool getDisplayMode(void) const;
//! Enable/disable display of distribution of exoplanetary systems //! Enable/disable display of distribution of exoplanetary systems
//! @param b //! @param b
void setDisplayMode(bool b); void setDisplayMode(bool b);
//! Get status to display of systems with exoplanets after their dis covery //! Get status to display of systems with exoplanets after their dis covery
//! @return true if markers of exoplanetary systems are visible afte r discovery of exoplanets //! @return true if markers of exoplanetary systems are visible afte r discovery of exoplanets
bool getTimelineMode(void); bool getTimelineMode(void) const;
//! Enable/disable display of systems with exoplanets after their di scovery only //! Enable/disable display of systems with exoplanets after their di scovery only
//! @param b //! @param b
void setTimelineMode(bool b); void setTimelineMode(bool b);
//! Get status to display of exoplanetary systems with the potential ly habitable exoplanets //! Get status to display of exoplanetary systems with the potential ly habitable exoplanets
//! @return true if systems with only potentially habitable exoplane ts are visible //! @return true if systems with only potentially habitable exoplane ts are visible
bool getHabitableMode(void); bool getHabitableMode(void) const;
//! Enable/disable display of exoplanetary systems with the potentia lly habitable exoplanets only //! Enable/disable display of exoplanetary systems with the potentia lly habitable exoplanets only
//! @param b //! @param b
void setHabitableMode(bool b); void setHabitableMode(bool b);
//! Get color for markers of exoplanetary systems //! Get color for markers of exoplanetary systems
//! @param h set false if you want get color of markers of potential ly habitable exoplanets //! @param h set false if you want get color of markers of potential ly habitable exoplanets
//! @return color //! @return color
Vec3f getMarkerColor(bool habitable); Vec3f getMarkerColor(bool habitable) const;
//! Set color for markers of exoplanetary systems //! Set color for markers of exoplanetary systems
//! @param c color //! @param c color
//! @param h set true if you want set color for potentially habitabl e exoplanets //! @param h set true if you want set color for potentially habitabl e exoplanets
//! @code //! @code
//! // example of usage in scripts //! // example of usage in scripts
//! Exoplanets.setMarkerColor(Vec3f(1.0,0.0,0.0), true); //! Exoplanets.setMarkerColor(Vec3f(1.0,0.0,0.0), true);
//! @endcode //! @endcode
void setMarkerColor(const Vec3f& c, bool h); void setMarkerColor(const Vec3f& c, bool h);
//! Get count of planetary systems from catalog //! Get count of planetary systems from catalog
skipping to change at line 301 skipping to change at line 331
//! 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 exoplanets. //! read the json file and create list of exoplanets.
void readJsonFile(void); void readJsonFile(void);
//! Creates a backup of the exoplanets.json file called exoplanets.j son.old //! Creates a backup of the exoplanets.json file called exoplanets.j son.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) const;
//! Get the version of catalog format from the "version of the forma t" value in the exoplanets.json file //! Get the version of catalog format from the "version of the forma t" value in the exoplanets.json file
//! @return version string, e.g. "1" //! @return version string, e.g. "1"
int getJsonFileFormatVersion(void); int getJsonFileFormatVersion(void) const;
//! Check format of the catalog of exoplanets //! Check format of the catalog of exoplanets
//! @return valid boolean, e.g. "true" //! @return valid boolean, e.g. "true"
bool checkJsonFileFormat(void); bool checkJsonFileFormat(void) const;
//! parse JSON file and load exoplanets to map //! parse JSON file and load exoplanets to map
QVariantMap loadEPMap(QString path=QString()); QVariantMap loadEPMap(QString path=QString());
//! set items for list of struct from data map //! set items for list of struct from data map
void setEPMap(const QVariantMap& map); void setEPMap(const QVariantMap& map);
//! A fake method for strings marked for translation. //! A fake method for strings marked for translation.
//! Use it instead of translations.h for N_() strings, except perhap s for //! Use it instead of translations.h for N_() strings, except perhap s for
//! keyboard action descriptions. (It's better for them to be in a s ingle //! keyboard action descriptions. (It's better for them to be in a s ingle
//! place.) //! place.)
static void translations(); static void translations();
QString jsonCatalogPath; QString jsonCatalogPath;
int PSCount; int PSCount;
int EPCountAll; int EPCountAll;
int EPCountPH; int EPCountPH;
QList<double> EPEccentricityAll, EPSemiAxisAll, EPMassAll, EPRadiusA QList<double> EPEccentricityAll, EPSemiAxisAll, EPMassAll, EPRadiusA
ll, EPPeriodAll, EPAngleDistanceAll; ll, EPPeriodAll, EPAngleDistanceAll,
EPEffectiveTempHostStarAll, EPYearDiscoveryAll, EPMeta
llicityHostStarAll, EPVMagHostStarAll,
EPRAHostStarAll, EPDecHostStarAll, EPDistanceHostStarA
ll, EPMassHostStarAll, EPRadiusHostStarAll;
StelTextureSP texPointer; StelTextureSP texPointer;
QList<ExoplanetP> ep; QList<ExoplanetP> ep;
// variables and functions for the updater // variables and functions for the updater
UpdateState updateState; UpdateState updateState;
QNetworkAccessManager* downloadMgr; QNetworkAccessManager* downloadMgr;
QString updateUrl; QString updateUrl;
QTimer* updateTimer; QTimer* updateTimer;
QTimer* messageTimer; QTimer* messageTimer;
skipping to change at line 381 skipping to change at line 413
//! 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 ExoplanetsStelPluginInterface : public QObject, public StelPluginInte rface class ExoplanetsStelPluginInterface : public QObject, public StelPluginInte rface
{ {
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 /*_EXOPLANETS_HPP_*/ #endif /*_EXOPLANETS_HPP_*/
 End of changes. 22 change blocks. 
19 lines changed or deleted 54 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/