~ubuntu-branches/ubuntu/precise/stellarium/precise

« back to all changes in this revision

Viewing changes to src/modules/NebulaMgr.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cédric Delfosse
  • Date: 2009-03-13 20:07:22 UTC
  • mfrom: (1.1.8 upstream) (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090313200722-l66s4zy2s3e8up0s
Tags: 0.10.2-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <QString>
25
25
#include <QStringList>
26
26
#include "StelObjectType.hpp"
27
 
#include "Fader.hpp"
28
 
#include "TreeGrid.hpp"
29
 
//#include "SimpleGrid.hpp"
 
27
#include "StelFader.hpp"
 
28
#include "StelTreeGrid.hpp"
30
29
#include "StelObjectModule.hpp"
31
 
#include "STextureTypes.hpp"
 
30
#include "StelTextureTypes.hpp"
32
31
 
33
32
class Nebula;
34
 
class Translator;
35
 
class ToneReproducer;
 
33
class StelTranslator;
 
34
class StelToneReproducer;
36
35
class QSettings;
 
36
class StelPainter;
37
37
 
38
38
//! @class NebulaMgr
39
39
//! Manage a collection of nebulae. This class is used 
71
71
        //! Called when the sky culture is updated, so that the module can respond
72
72
        //! as appropriate.  Does nothing as there are no SkyCulture specific features 
73
73
        //! in the current nebula implementation.
74
 
        virtual void updateSkyCulture();
 
74
        //! @param skyCultureDir the name of the directory containing the sky culture to use.
 
75
        virtual void updateSkyCulture(const QString& skyCultureDir);
75
76
        
76
77
        //! Sets the colors of the Nebula labels and markers according to the
77
78
        //! values in a configuration object
83
84
        ///////////////////////////////////////////////////////////////////////////
84
85
        // Methods defined in StelObjectManager class
85
86
        //! Used to get a vector of objects which are near to some position.
86
 
        //! @param v a vector representing the position in th sky around which 
87
 
        //! to search for nebulae.
88
 
        //! @param limitFov the field of view around the position v in which to
89
 
        //! search for nebulae.
90
 
        //! @param nav the Navigator object.
91
 
        //! @param prj the Projector object.
92
 
        //! @return an stl vector containing the nebulae located inside the
93
 
        //! limitFov circle around position v.
 
87
        //! @param v a vector representing the position in th sky around which to search for nebulae.
 
88
        //! @param limitFov the field of view around the position v in which to search for nebulae.
 
89
        //! @param core the StelCore to use for computations.
 
90
        //! @return an list containing the nebulae located inside the limitFov circle around position v.
94
91
        virtual QList<StelObjectP> searchAround(const Vec3d& v, double limitFov, const StelCore* core) const;
95
92
        
96
93
        //! Return the matching nebula object's pointer if exists or NULL.
106
103
        //! @param objPrefix the case insensitive first letters of the searched object
107
104
        //! @param maxNbItem the maximum number of returned object names
108
105
        //! @return a list of matching object name by order of relevance, or an empty list if nothing match
109
 
        virtual QStringList listMatchingObjectsI18n(const QString& QString, int maxNbItem=5) const;
 
106
        virtual QStringList listMatchingObjectsI18n(const QString& objPrefix, int maxNbItem=5) const;
110
107
        
111
108
        ///////////////////////////////////////////////////////////////////////////
112
109
        // Properties setters and getters
154
151
        
155
152
        //! Set the amount of nebulae hints. The real amount is also proportional with FOV.
156
153
        //! The limit is set in function of the nebulae magnitude
157
 
        //! @param a the amount between 0 and 10. 0 is no hints, 10 is maximum of hints
 
154
        //! @param f the amount between 0 and 10. 0 is no hints, 10 is maximum of hints
158
155
        void setHintsAmount(float f) {hintsAmount = f;}
159
156
        //! Get the amount of nebulae labels. The real amount is also proportional with FOV.
160
157
        //! @return the amount between 0 and 10. 0 is no hints, 10 is maximum of hints
175
172
        StelObject* search(Vec3f Pos);    // Search the Nebulae by position     
176
173
                
177
174
        //! Draw a nice animated pointer around the object
178
 
        void drawPointer(const StelCore* core);
 
175
        void drawPointer(const StelCore* core, const StelPainter& sPainter);
179
176
                
180
177
        Nebula *searchM(unsigned int M);
181
178
        Nebula *searchNGC(unsigned int NGC);
188
185
        LinearFader flagShow;
189
186
        
190
187
        //! The internal grid for fast positional lookup
191
 
        TreeGrid nebGrid;
 
188
        StelTreeGrid nebGrid;
192
189
        
193
190
        //! The amount of hints (between 0 and 10)
194
191
        float hintsAmount;
198
195
        bool displayNoTexture;                  // Define if nebulas without textures are to be displayed
199
196
        
200
197
        //! The selection pointer texture
201
 
        STextureSP texPointer;
 
198
        StelTextureSP texPointer;
202
199
};
203
200
 
204
201
#endif // _NEBULAMGR_HPP_