21 #ifndef _STELOBJECTMGR_HPP_ 22 #define _STELOBJECTMGR_HPP_ 24 #include "VecMath.hpp" 25 #include "StelModule.hpp" 26 #include "StelObject.hpp" 87 QStringList
listMatchingObjects(
const QString& objPrefix,
unsigned int maxNbItem=5,
bool useStartOfWords=
false,
bool inEnglish=
true)
const;
89 QStringList listAllModuleObjects(
const QString& moduleId,
bool inEnglish)
const;
90 QMap<QString, QString> objectModulesMap()
const;
147 QList<StelObjectModule*> objectsModule;
149 QList<StelObjectP> lastSelectedObjects;
151 bool objectPointerVisibility;
160 float searchRadiusPixel;
163 float distanceWeight;
166 #endif // _SELECTIONMGR_HPP_ QStringList listMatchingObjects(const QString &objPrefix, unsigned int maxNbItem=5, bool useStartOfWords=false, bool inEnglish=true) const
Find and return the list of at most maxNbItem objects auto-completing the passed object name...
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.
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.
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...
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.
static QVariantMap getObjectInfo(const StelObjectP obj)
Return a QMap of data about the object (calls obj->getInfoMap()).