StelObjectMgr.hpp   StelObjectMgr.hpp 
skipping to change at line 46 skipping to change at line 46
//! Each module is then free to manage object selection as it wants. //! Each module is then free to manage object selection as it wants.
class StelObjectMgr : public StelModule class StelObjectMgr : public StelModule
{ {
public: public:
StelObjectMgr(); StelObjectMgr();
virtual ~StelObjectMgr(); virtual ~StelObjectMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
virtual void init() {;} virtual void init() {;}
virtual void draw(StelCore* core) {;} virtual void draw(StelCore*) {;}
virtual void update(double deltaTime) {;} virtual void update(double) {;}
//! Handle mouse click events.
virtual void handleMouseClicks(class QMouseEvent* event);
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
//! 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* mgr);
//! 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);
skipping to change at line 126 skipping to change at line 123
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;
//! 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;}
//! Set the weight of the distance factor when choosing the best obj
ect to select.
//! Default to 1.
void setDistanceWeight(float newDistanceWeight) {distanceWeight=newD
istanceWeight;}
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;
// 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;
// Radius in pixel in which objects will be searched when clicking o
n a point in sky.
float searchRadiusPixel;
// Weight of the distance factor when choosing the best object to se
lect.
float distanceWeight;
}; };
#endif // _SELECTIONMGR_HPP_ #endif // _SELECTIONMGR_HPP_
 End of changes. 4 change blocks. 
5 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/