StarMgr.hpp   StarMgr.hpp 
skipping to change at line 27 skipping to change at line 27
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STARMGR_HPP_ #ifndef _STARMGR_HPP_
#define _STARMGR_HPP_ #define _STARMGR_HPP_
#include <QFont> #include <QFont>
#include <QVariantMap> #include <QVariantMap>
#include "StelFader.hpp" #include "StelFader.hpp"
#include "StelObjectModule.hpp" #include "StelObjectModule.hpp"
#include "StelTextureTypes.hpp"
#include "StelProjectorType.hpp" #include "StelProjectorType.hpp"
class StelObject; class StelObject;
class StelToneReproducer; class StelToneReproducer;
class StelProjector; class StelProjector;
class StelPainter;
class QSettings; class QSettings;
namespace BigStarCatalogExtension { namespace BigStarCatalogExtension {
class ZoneArray; class ZoneArray;
class HipIndexStruct; struct HipIndexStruct;
} }
static const int RCMAG_TABLE_SIZE = 4096;
//! @class StarMgr //! @class StarMgr
//! Stores the star catalogue data. //! Stores the star catalogue data.
//! Used to render the stars themselves, as well as determine the color tab le //! Used to render the stars themselves, as well as determine the color tab le
//! and render the labels of those stars with names for a given SkyCulture. //! and render the labels of those stars with names for a given SkyCulture.
//! //!
//! The celestial sphere is split into zones, which correspond to the //! The celestial sphere is split into zones, which correspond to the
//! triangular faces of a geodesic sphere. The number of zones (faces) //! triangular faces of a geodesic sphere. The number of zones (faces)
//! depends on the level of sub-division of this sphere. The lowest //! depends on the level of sub-division of this sphere. The lowest
//! level, 0, is an icosahedron (20 faces), subsequent levels, L, //! level, 0, is an icosahedron (20 faces), subsequent levels, L,
//! of sub-division give the number of zones, n as: //! of sub-division give the number of zones, n as:
skipping to change at line 84 skipping to change at line 84
//! Initialize the StarMgr. //! Initialize the StarMgr.
//! - Loads the star catalogue data into memory //! - Loads the star catalogue data into memory
//! - Sets up the star color table //! - Sets up the star color table
//! - Loads the star texture //! - Loads the star texture
//! - Loads the star font (for labels on named stars) //! - Loads the star font (for labels on named stars)
//! - Loads the texture of the sar selection indicator //! - Loads the texture of the sar selection indicator
//! - Lets various display flags from the ini parser object //! - Lets various display flags from the ini parser object
virtual void init(); virtual void init();
//! Draw the stars and the star selection indicator if necessary. //! Draw the stars and the star selection indicator if necessary.
virtual void draw(StelCore* core); virtual void draw(StelCore* core, class StelRenderer* renderer);
//! Update any time-dependent features. //! Update any time-dependent features.
//! Includes fading in and out stars and labels when they are turned on and off. //! Includes fading in and out stars and labels when they are turned on and off.
virtual void update(double deltaTime) {labelsFader.update((int)(delt aTime*1000)); starsFader.update((int)(deltaTime*1000));} virtual void update(double deltaTime) {labelsFader.update((int)(delt aTime*1000)); starsFader.update((int)(deltaTime*1000));}
//! Used to determine the order in which the various StelModules are drawn. //! Used to determine the order in which the various StelModules are drawn.
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in StelObjectManager class // Methods defined in StelObjectManager class
skipping to change at line 112 skipping to change at line 112
//! Return the matching star if exists or NULL //! Return the matching star if exists or NULL
//! @param name The case in-sensistive standard program planet name //! @param name The case in-sensistive standard program planet 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& objPrefix , int maxNbItem=5) const; virtual QStringList listMatchingObjectsI18n(const QString& objPrefix , int maxNbItem=5) const;
// empty, as there's too much stars for displaying at once
virtual QStringList listAllObjects(bool inEnglish) const { Q_UNUSED(
inEnglish) return QStringList(); }
virtual QString getName() const { return "Stars"; }
public slots: public slots:
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods callable from script and GUI // Methods callable from script and GUI
//! Set the color used to label bright stars. //! Set the color used to label bright stars.
void setLabelColor(const Vec3f& c) {labelColor = c;} void setLabelColor(const Vec3f& c) {labelColor = c;}
//! Get the current color used to label bright stars. //! Get the current color used to label bright stars.
Vec3f getLabelColor(void) const {return labelColor;} Vec3f getLabelColor(void) const {return labelColor;}
//! Set display flag for Stars. //! Set display flag for Stars.
skipping to change at line 207 skipping to change at line 210
void loadSciNames(const QString& sciNameFile); void loadSciNames(const QString& sciNameFile);
//! Gets the maximum search level. //! Gets the maximum search level.
// TODO: add a non-lame description - what is the purpose of the max search level? // TODO: add a non-lame description - what is the purpose of the max search level?
int getMaxSearchLevel() const; int getMaxSearchLevel() const;
//! Load all the stars from the files. //! Load all the stars from the files.
void loadData(QVariantMap starsConfigFile); void loadData(QVariantMap starsConfigFile);
//! Draw a nice animated pointer around the object. //! Draw a nice animated pointer around the object.
void drawPointer(StelPainter& sPainter, const StelCore* core); void drawPointer(class StelRenderer* renderer, StelProjectorP projec tor, const StelCore* core);
LinearFader labelsFader; LinearFader labelsFader;
LinearFader starsFader; LinearFader starsFader;
bool flagStarName; bool flagStarName;
float labelsAmount; float labelsAmount;
bool gravityLabel; bool gravityLabel;
int maxGeodesicGridLevel; int maxGeodesicGridLevel;
int lastMaxSearchLevel; int lastMaxSearchLevel;
skipping to change at line 247 skipping to change at line 250
static QHash<int, QString> commonNamesMapI18n; static QHash<int, QString> commonNamesMapI18n;
static QMap<QString, int> commonNamesIndexI18n; static QMap<QString, int> commonNamesIndexI18n;
static QHash<int, QString> sciNamesMapI18n; static QHash<int, QString> sciNamesMapI18n;
static QMap<QString, int> sciNamesIndexI18n; static QMap<QString, int> sciNamesIndexI18n;
QFont starFont; QFont starFont;
static bool flagSciNames; static bool flagSciNames;
Vec3f labelColor; Vec3f labelColor;
StelTextureSP texPointer; // The selection pointer tex ture class StelTextureNew* texPointer; // The selection poi nter texture
class StelObjectMgr* objectMgr; class StelObjectMgr* objectMgr;
QString starConfigFileFullPath; QString starConfigFileFullPath;
QVariantMap starSettings; QVariantMap starSettings;
QVariantList catalogsDescription; QVariantList catalogsDescription;
}; };
#endif // _STARMGR_HPP_ #endif // _STARMGR_HPP_
 End of changes. 8 change blocks. 
6 lines changed or deleted 10 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/