StelObjectMgr.hpp   StelObjectMgr.hpp 
skipping to change at line 53 skipping to change at line 53
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
virtual void init() {;} virtual void init() {;}
virtual void draw(StelCore*) {;} virtual void draw(StelCore*) {;}
virtual void update(double) {;} virtual void update(double) {;}
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
//! Add a new StelObject manager into the list of supported modules. //! Add a new StelObject manager into the list of supported modules.
//! Registered modules can have selected objects //! Registered modules can have selected objects
void registerStelObjectMgr(StelObjectModule* mgr); void registerStelObjectMgr(StelObjectModule* m);
//! Find and select an object near given equatorial J2000 position. //! Find and select an object near given equatorial J2000 position.
//! @param core the StelCore instance to use for computations //! @param core the StelCore instance to use for computations
//! @param pos the direction vector around which to search in equato rial J2000 //! @param pos the direction vector around which to search in equato rial J2000
//! @param action define whether to add to, replace, or remove from the existing selection //! @param action define whether to add to, replace, or remove from the existing selection
//! @return true if a object was found at position (this does not ne cessarily means it is selected) //! @return true if a object was found at position (this does not ne cessarily means it is selected)
bool findAndSelect(const StelCore* core, const Vec3d& pos, StelModul e::StelModuleSelectAction action=StelModule::ReplaceSelection); bool findAndSelect(const StelCore* core, const Vec3d& pos, StelModul e::StelModuleSelectAction action=StelModule::ReplaceSelection);
//! Find and select an object near given screen position. //! Find and select an object near given screen position.
//! @param core the StelCore instance to use for computations //! @param core the StelCore instance to use for computations
skipping to change at line 110 skipping to change at line 110
//! @param action action define whether to add to, replace, or remov e from the existing selection //! @param action action define whether to add to, replace, or remov e from the existing selection
//! @return true if at least 1 object was sucessfully selected //! @return true if at least 1 object was sucessfully selected
bool setSelectedObject(const StelObjectP obj, StelModule::StelModule SelectAction action=StelModule::ReplaceSelection); bool setSelectedObject(const StelObjectP obj, StelModule::StelModule SelectAction action=StelModule::ReplaceSelection);
//! Notify that we want to select the given objects. //! Notify that we want to select the given objects.
//! @param objs a vector of objects to select //! @param objs a vector of objects to select
//! @param action define whether to add to, replace, or remove from the existing selection //! @param action define whether to add to, replace, or remove from the existing selection
//! @return true if at least 1 object was sucessfully selected //! @return true if at least 1 object was sucessfully selected
bool setSelectedObject(const QList<StelObjectP>& objs, StelModule::S telModuleSelectAction action=StelModule::ReplaceSelection); bool setSelectedObject(const QList<StelObjectP>& objs, StelModule::S telModuleSelectAction action=StelModule::ReplaceSelection);
//! Get the list objects which was recently selected by the user. //! Get the list of objects which was recently selected by the user.
const QList<StelObjectP>& getSelectedObject() const {return lastSele ctedObjects;} const QList<StelObjectP>& getSelectedObject() const {return lastSele ctedObjects;}
//! Return the list objects of type "withType" which was recently se lected by the user. //! Return the list objects of type "withType" which was recently se lected by the user.
//! @param type return only objects of the given type //! @param type return only objects of the given type
QList<StelObjectP> getSelectedObject(const QString& type); QList<StelObjectP> getSelectedObject(const QString& type);
//! Set whether a pointer is to be drawn over selected object. //! Set whether a pointer is to be drawn over selected object.
void setFlagSelectedObjectPointer(bool b) {objectPointerVisibility=b ;} void setFlagSelectedObjectPointer(bool b) {objectPointerVisibility=b ;}
//! Get whether a pointer is to be drawn over selected object. //! Get whether a pointer is to be drawn over selected object.
bool getFlagSelectedObjectPointer(void) {return objectPointerVisibil ity;} bool getFlagSelectedObjectPointer(void) {return objectPointerVisibil ity;}
//! Find any kind of object by its translated name. //! Find any kind of object by its translated name.
StelObjectP searchByNameI18n(const QString &name) const; StelObjectP searchByNameI18n(const QString &name) const;
//! Find any kind of object by its standard program name. //! Find any kind of object by its standard program name.
StelObjectP searchByName(const QString &name) const; StelObjectP searchByName(const QString &name) const;
//! Find an object of the given type and ID
//! @param type the type of the object as given by StelObject::getTy
pe()
//! @param id the ID of the object as given by StelObject::getID()
//! @return an null/invalid pointer when nothing is found, the given
object otherwise.
//! @note
//! a StelObject may be found by multiple IDs (different catalog num
bers, etc),
//! so StelObject::getID() of the returned object may not be the sam
e as the query parameter \p id.
StelObjectP searchByID(const QString& type, const QString& id) const
;
//! Set the radius in pixel in which objects will be searched when c licking on a point in sky. //! Set the radius in pixel in which objects will be searched when c licking on a point in sky.
void setObjectSearchRadius(float radius) {searchRadiusPixel=radius;} void setObjectSearchRadius(float radius) {searchRadiusPixel=radius;}
//! Set the weight of the distance factor when choosing the best obj ect to select. //! Set the weight of the distance factor when choosing the best obj ect to select.
//! Default to 1. //! Default to 1.
void setDistanceWeight(float newDistanceWeight) {distanceWeight=newD istanceWeight;} void setDistanceWeight(float newDistanceWeight) {distanceWeight=newD istanceWeight;}
//! Return a QMap of data about the object (calls obj->getInfoMap()) . //! Return a QMap of data about the object (calls obj->getInfoMap()) .
//! If obj is valid, add an element ["found", true]. //! If obj is valid, add an element ["found", true].
//! If obj is NULL, returns a 1-element map [["found", false]] //! If obj is Q_NULLPTR, returns a 1-element map [["found", false]]
static QVariantMap getObjectInfo(const StelObjectP obj); static QVariantMap getObjectInfo(const StelObjectP obj);
signals: signals:
//! Indicate that the selected StelObjects has changed. //! Indicate that the selected StelObjects has changed.
//! @param action define if the user requested that the objects are added to the selection or just replace it //! @param action define if the user requested that the objects are added to the selection or just replace it
void selectedObjectChanged(StelModule::StelModuleSelectAction); void selectedObjectChanged(StelModule::StelModuleSelectAction);
private: private:
// The list of StelObjectModule that are referenced in Stellarium // The list of StelObjectModule that are referenced in Stellarium
QList<StelObjectModule*> objectsModule; QList<StelObjectModule*> objectsModule;
QMap<QString, StelObjectModule*> typeToModuleMap;
QMap<QString, QString> objModulesMap;
// The last selected object in stellarium // The last selected object in stellarium
QList<StelObjectP> lastSelectedObjects; QList<StelObjectP> lastSelectedObjects;
// Should selected object pointer be drawn // Should selected object pointer be drawn
bool objectPointerVisibility; bool objectPointerVisibility;
//! Find in a "clever" way an object from its equatorial position. //! Find in a "clever" way an object from its equatorial position.
StelObjectP cleverFind(const StelCore* core, const Vec3d& pos) const ; StelObjectP cleverFind(const StelCore* core, const Vec3d& pos) const ;
//! Find in a "clever" way an object from its screen position. //! Find in a "clever" way an object from its screen position.
StelObjectP cleverFind(const StelCore* core, int x, int y) const; StelObjectP cleverFind(const StelCore* core, int x, int y) const;
 End of changes. 5 change blocks. 
3 lines changed or deleted 20 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/