~petr-kubanek/stellarium/stellarium

« back to all changes in this revision

Viewing changes to src/core/StelObjectMgr.hpp

  • Committer: Georg Zotti
  • Date: 2017-05-16 11:21:44 UTC
  • mfrom: (8454.1.100 SoCiS2016)
  • Revision ID: georg.zotti@univie.ac.at-20170516112144-mckvrgf8acksrghd
Merge-in SoCiS2016: Irregular solar system objects, RemoteSync plugin, Scenery3D improvements. Big merge, and raises Qt requirement to Qt5.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        ///////////////////////////////////////////////////////////////////////////
51
51
        //! Add a new StelObject manager into the list of supported modules.
52
52
        //! Registered modules can have selected objects
53
 
        void registerStelObjectMgr(StelObjectModule* mgr);
 
53
        void registerStelObjectMgr(StelObjectModule* m);
54
54
 
55
55
        //! Find and select an object near given equatorial J2000 position.
56
56
        //! @param core the StelCore instance to use for computations
107
107
        //! @return true if at least 1 object was sucessfully selected
108
108
        bool setSelectedObject(const QList<StelObjectP>& objs, StelModule::StelModuleSelectAction action=StelModule::ReplaceSelection);
109
109
 
110
 
        //! Get the list objects which was recently selected by the user.
 
110
        //! Get the list of objects which was recently selected by the user.
111
111
        const QList<StelObjectP>& getSelectedObject() const {return lastSelectedObjects;}
112
112
 
113
113
        //! Return the list objects of type "withType" which was recently selected by the user.
125
125
        //! Find any kind of object by its standard program name.
126
126
        StelObjectP searchByName(const QString &name) const;
127
127
 
 
128
        //! Find an object of the given type and ID
 
129
        //! @param type the type of the object as given by StelObject::getType()
 
130
        //! @param id the ID of the object as given by StelObject::getID()
 
131
        //! @return an null/invalid pointer when nothing is found, the given object otherwise.
 
132
        //! @note
 
133
        //! a StelObject may be found by multiple IDs (different catalog numbers, etc),
 
134
        //! so StelObject::getID() of the returned object may not be the same as the query parameter \p id.
 
135
        StelObjectP searchByID(const QString& type, const QString& id) const;
 
136
 
128
137
        //! Set the radius in pixel in which objects will be searched when clicking on a point in sky.
129
138
        void setObjectSearchRadius(float radius) {searchRadiusPixel=radius;}
130
139
 
145
154
private:
146
155
        // The list of StelObjectModule that are referenced in Stellarium
147
156
        QList<StelObjectModule*> objectsModule;
 
157
        QMap<QString, StelObjectModule*> typeToModuleMap;
 
158
        QMap<QString, QString> objModulesMap;
 
159
 
148
160
        // The last selected object in stellarium
149
161
        QList<StelObjectP> lastSelectedObjects;
150
162
        // Should selected object pointer be drawn