NebulaMgr.hpp   NebulaMgr.hpp 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* 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 <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QFont>
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
#include "StelFader.hpp" #include "StelFader.hpp"
#include "StelTreeGrid.hpp" #include "StelSphericalIndex.hpp"
#include "StelObjectModule.hpp" #include "StelObjectModule.hpp"
#include "StelTextureTypes.hpp" #include "StelTextureTypes.hpp"
class Nebula; class Nebula;
class StelTranslator; class StelTranslator;
class StelToneReproducer; class StelToneReproducer;
class QSettings; class QSettings;
class StelPainter; class StelPainter;
typedef QSharedPointer<Nebula> NebulaP;
//! @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();
virtual ~NebulaMgr(); virtual ~NebulaMgr();
skipping to change at line 162 skipping to change at line 164
//! 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 f 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); NebulaP search(const QString& name);
//! Search the Nebulae by position
NebulaP search(const Vec3d& pos);
//! 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
//! Draw a nice animated pointer around the object //! Draw a nice animated pointer around the object
void drawPointer(const StelCore* core, const StelPainter& sPainter); void drawPointer(const StelCore* core, StelPainter& sPainter);
Nebula *searchM(unsigned int M); NebulaP searchM(unsigned int M);
Nebula *searchNGC(unsigned int NGC); NebulaP searchNGC(unsigned int NGC);
Nebula *searchIC(unsigned int IC); NebulaP searchIC(unsigned int IC);
bool loadNGC(const QString& fileName); bool loadNGC(const QString& fileName);
bool loadNGCOld(const QString& catNGC);
bool loadNGCNames(const QString& fileName); bool loadNGCNames(const QString& fileName);
std::vector<Nebula*> nebArray; // The nebulas list QList<NebulaP> nebArray; // The nebulas list
QHash<unsigned int, NebulaP> ngcIndex;
LinearFader hintsFader; LinearFader hintsFader;
LinearFader flagShow; LinearFader flagShow;
//! The internal grid for fast positional lookup //! The internal grid for fast positional lookup
StelTreeGrid nebGrid; StelSphericalIndex 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
StelTextureSP texPointer; StelTextureSP texPointer;
QFont nebulaFont; // Font used for names printing
}; };
#endif // _NEBULAMGR_HPP_ #endif // _NEBULAMGR_HPP_
 End of changes. 12 change blocks. 
11 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/