20 #ifndef _STELOBJECTMGR_HPP_
21 #define _STELOBJECTMGR_HPP_
23 #include "VecMath.hpp"
24 #include "StelModule.hpp"
25 #include "StelObject.hpp"
86 QStringList
listMatchingObjectsI18n(
const QString& objPrefix,
unsigned int maxNbItem=5,
bool useStartOfWords=
false)
const;
93 QStringList
listMatchingObjects(
const QString& objPrefix,
unsigned int maxNbItem=5,
bool useStartOfWords=
false)
const;
95 QStringList listAllModuleObjects(
const QString& moduleId,
bool inEnglish)
const;
96 QMap<QString, QString> objectModulesMap()
const;
148 QList<StelObjectModule*> objectsModule;
150 QList<StelObjectP> lastSelectedObjects;
152 bool objectPointerVisibility;
161 float searchRadiusPixel;
164 float distanceWeight;
167 #endif // _SELECTIONMGR_HPP_
bool getFlagSelectedObjectPointer(void)
Get whether a pointer is to be drawn over selected object.
StelObjectP searchByNameI18n(const QString &name) const
Find any kind of object by its translated name.
bool getWasSelected(void) const
Return whether an object was selected during last selection related event.
void selectedObjectChanged(StelModule::StelModuleSelectAction)
Indicate that the selected StelObjects has changed.
void setFlagSelectedObjectPointer(bool b)
Set whether a pointer is to be drawn over selected object.
Main class for Stellarium core processing.
void unSelect(void)
Notify that we want to unselect any object.
QStringList listMatchingObjectsI18n(const QString &objPrefix, unsigned int maxNbItem=5, bool useStartOfWords=false) const
Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name...
Specialization of StelModule which manages a collection of StelObject.
virtual void draw(StelCore *)
Execute all the drawing functions for this module.
StelObjectP searchByName(const QString &name) const
Find any kind of object by its standard program name.
QStringList listMatchingObjects(const QString &objPrefix, unsigned int maxNbItem=5, bool useStartOfWords=false) const
Find and return the list of at most maxNbItem objects auto-completing the passed object English name...
bool findAndSelectI18n(const QString &nameI18n, StelModule::StelModuleSelectAction action=StelModule::ReplaceSelection)
Find and select an object from its translated name.
const QList< StelObjectP > & getSelectedObject() const
Get the list objects which was recently selected by the user.
virtual void update(double)
Update the module with respect to the time.
void setDistanceWeight(float newDistanceWeight)
Set the weight of the distance factor when choosing the best object to select.
void registerStelObjectMgr(StelObjectModule *mgr)
Add a new StelObject manager into the list of supported modules.
Manage the selection and queries on one or more StelObjects.
virtual void init()
Initialize itself.
bool setSelectedObject(const StelObjectP obj, StelModule::StelModuleSelectAction action=StelModule::ReplaceSelection)
Notify that we want to select the given object.
bool findAndSelect(const StelCore *core, const Vec3d &pos, StelModule::StelModuleSelectAction action=StelModule::ReplaceSelection)
Find and select an object near given equatorial J2000 position.
StelModuleSelectAction
Enum used when selecting objects to define whether to add to, replace, or remove from the existing se...
A templatized 3d vector compatible with openGL.
Set the StelObject as the new list of selected ones.
void setObjectSearchRadius(float radius)
Set the radius in pixel in which objects will be searched when clicking on a point in sky...
This is the common base class for all the main components of stellarium.