NebulaMgr.hpp   NebulaMgr.hpp 
skipping to change at line 27 skipping to change at line 27
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef _NEBULAMGR_HPP_ #ifndef _NEBULAMGR_HPP_
#define _NEBULAMGR_HPP_ #define _NEBULAMGR_HPP_
#include <vector> #include <vector>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
#include "Fader.hpp" #include "StelFader.hpp"
#include "TreeGrid.hpp" #include "StelTreeGrid.hpp"
//#include "SimpleGrid.hpp"
#include "StelObjectModule.hpp" #include "StelObjectModule.hpp"
#include "STextureTypes.hpp" #include "StelTextureTypes.hpp"
class Nebula; class Nebula;
class Translator; class StelTranslator;
class ToneReproducer; class StelToneReproducer;
class QSettings; class QSettings;
class StelPainter;
//! @class NebulaMgr //! @class NebulaMgr
//! Manage a collection of nebulae. This class is used //! Manage a collection of nebulae. This class is used
//! to display the NGC catalog with information, and textures for some of t hem. //! to display the NGC catalog with information, and textures for some of t hem.
class NebulaMgr : public StelObjectModule class NebulaMgr : public StelObjectModule
{ {
Q_OBJECT Q_OBJECT
public: public:
NebulaMgr(); NebulaMgr();
skipping to change at line 86 skipping to change at line 86
//! Sets the colors of the Nebula labels and markers according to th e //! Sets the colors of the Nebula labels and markers according to th e
//! values in a configuration object //! values in a configuration object
virtual void setStelStyle(const StelStyle& style); virtual void setStelStyle(const StelStyle& style);
//! Determines the order in which the various modules are drawn. //! Determines the order in which the various modules are drawn.
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in StelObjectManager class // Methods defined in StelObjectManager class
//! Used to get a vector of objects which are near to some position. //! Used to get a vector of objects which are near to some position.
//! @param v a vector representing the position in th sky around whi //! @param v a vector representing the position in th sky around whi
ch ch to search for nebulae.
//! to search for nebulae. //! @param limitFov the field of view around the position v in which
//! @param limitFov the field of view around the position v in which to search for nebulae.
to //! @param core the StelCore to use for computations.
//! search for nebulae. //! @return an list containing the nebulae located inside the limitF
//! @param nav the Navigator object. ov circle around position v.
//! @param prj the Projector object.
//! @return an stl vector containing the nebulae located inside the
//! limitFov circle around position v.
virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const; virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const;
//! Return the matching nebula object's pointer if exists or NULL. //! Return the matching nebula object's pointer if exists or NULL.
//! @param nameI18n The case in-sensistive nebula name or NGC M cata log name : format can //! @param nameI18n The case in-sensistive nebula name or NGC M cata log name : format can
//! be M31, M 31, NGC31, NGC 31 //! be M31, M 31, NGC31, NGC 31
virtual StelObjectP searchByNameI18n(const QString& nameI18n) const; virtual StelObjectP searchByNameI18n(const QString& nameI18n) const;
//! Return the matching nebula if exists or NULL. //! Return the matching nebula if exists or NULL.
//! @param name The case in-sensistive standard program name //! @param name The case in-sensistive standard program name
virtual StelObjectP searchByName(const QString& name) const; virtual StelObjectP searchByName(const QString& name) const;
//! Find and return the list of at most maxNbItem objects auto-compl eting the passed object I18n name. //! Find and return the list of at most maxNbItem objects auto-compl eting the passed object I18n name.
//! @param objPrefix the case insensitive first letters of the searc hed object //! @param objPrefix the case insensitive first letters of the searc hed object
//! @param maxNbItem the maximum number of returned object names //! @param maxNbItem the maximum number of returned object names
//! @return a list of matching object name by order of relevance, or an empty list if nothing match //! @return a list of matching object name by order of relevance, or an empty list if nothing match
virtual QStringList listMatchingObjectsI18n(const QString& QString, int maxNbItem=5) const; virtual QStringList listMatchingObjectsI18n(const QString& objPrefix , int maxNbItem=5) const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Properties setters and getters // Properties setters and getters
public slots: public slots:
//! Set the color used to draw the nebula circles. //! Set the color used to draw the nebula circles.
void setCirclesColor(const Vec3f& c); void setCirclesColor(const Vec3f& c);
//! Get current value of the nebula circle color. //! Get current value of the nebula circle color.
const Vec3f& getCirclesColor(void) const; const Vec3f& getCirclesColor(void) const;
//! Set Nebulae Hints circle scale. //! Set Nebulae Hints circle scale.
skipping to change at line 157 skipping to change at line 153
//! Set the amount of nebulae labels. The real amount is also propor tional with FOV. //! Set the amount of nebulae labels. The real amount is also propor tional with FOV.
//! The limit is set in function of the nebulae magnitude //! The limit is set in function of the nebulae magnitude
//! @param a the amount between 0 and 10. 0 is no labels, 10 is maxi mum of labels //! @param a the amount between 0 and 10. 0 is no labels, 10 is maxi mum of labels
void setLabelsAmount(float a) {labelsAmount=a;} void setLabelsAmount(float a) {labelsAmount=a;}
//! Get the amount of nebulae labels. The real amount is also propor tional with FOV. //! Get the amount of nebulae labels. The real amount is also propor tional with FOV.
//! @return the amount between 0 and 10. 0 is no labels, 10 is maxim um of labels //! @return the amount between 0 and 10. 0 is no labels, 10 is maxim um of labels
float getLabelsAmount(void) const {return labelsAmount;} float getLabelsAmount(void) const {return labelsAmount;}
//! Set the amount of nebulae hints. The real amount is also proport ional with FOV. //! Set the amount of nebulae hints. The real amount is also proport ional with FOV.
//! The limit is set in function of the nebulae magnitude //! The limit is set in function of the nebulae magnitude
//! @param a the amount between 0 and 10. 0 is no hints, 10 is maxim um of hints //! @param f the amount between 0 and 10. 0 is no hints, 10 is maxim um of hints
void setHintsAmount(float f) {hintsAmount = f;} void setHintsAmount(float f) {hintsAmount = f;}
//! Get the amount of nebulae labels. The real amount is also propor tional with FOV. //! Get the amount of nebulae labels. The real amount is also propor tional with FOV.
//! @return the amount between 0 and 10. 0 is no hints, 10 is maximu m of hints //! @return the amount between 0 and 10. 0 is no hints, 10 is maximu m of hints
float getHintsAmount(void) const {return hintsAmount;} float getHintsAmount(void) const {return hintsAmount;}
private: private:
//! Search for a nebula object by name. e.g. M83, NGC 1123, IC 1234. //! Search for a nebula object by name. e.g. M83, NGC 1123, IC 1234.
StelObject* search(const QString& name); StelObject* search(const QString& name);
//! Load a set of nebula images. //! Load a set of nebula images.
//! Each sub-directory of the INSTALLDIR/nebulae directory contains a set of //! Each sub-directory of the INSTALLDIR/nebulae directory contains a set of
//! nebula textures. The sub-directory is the setName. Each set ha s its //! nebula textures. The sub-directory is the setName. Each set ha s its
//! own nebula_textures.fab file and corresponding image files. //! own nebula_textures.fab file and corresponding image files.
//! This function loads a set of textures. //! This function loads a set of textures.
//! @param setName a string which corresponds to the directory where the set resides //! @param setName a string which corresponds to the directory where the set resides
void loadNebulaSet(const QString& setName); void loadNebulaSet(const QString& setName);
StelObject* search(Vec3f Pos); // Search the Nebulae by position StelObject* search(Vec3f Pos); // Search the Nebulae by position
//! Draw a nice animated pointer around the object //! Draw a nice animated pointer around the object
void drawPointer(const StelCore* core); void drawPointer(const StelCore* core, const StelPainter& sPainter);
Nebula *searchM(unsigned int M); Nebula *searchM(unsigned int M);
Nebula *searchNGC(unsigned int NGC); Nebula *searchNGC(unsigned int NGC);
Nebula *searchIC(unsigned int IC); Nebula *searchIC(unsigned int IC);
bool loadNGC(const QString& fileName); bool loadNGC(const QString& fileName);
bool loadNGCNames(const QString& fileName); bool loadNGCNames(const QString& fileName);
std::vector<Nebula*> nebArray; // The nebulas list std::vector<Nebula*> nebArray; // The nebulas list
LinearFader hintsFader; LinearFader hintsFader;
LinearFader flagShow; LinearFader flagShow;
//! The internal grid for fast positional lookup //! The internal grid for fast positional lookup
TreeGrid nebGrid; StelTreeGrid nebGrid;
//! The amount of hints (between 0 and 10) //! The amount of hints (between 0 and 10)
float hintsAmount; float hintsAmount;
//! The amount of labels (between 0 and 10) //! The amount of labels (between 0 and 10)
float labelsAmount; float labelsAmount;
bool displayNoTexture; // Define if nebulas without textures are to be displayed bool displayNoTexture; // Define if nebulas without textures are to be displayed
//! The selection pointer texture //! The selection pointer texture
STextureSP texPointer; StelTextureSP texPointer;
}; };
#endif // _NEBULAMGR_HPP_ #endif // _NEBULAMGR_HPP_
 End of changes. 10 change blocks. 
21 lines changed or deleted 18 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/