ConstellationMgr.hpp   ConstellationMgr.hpp 
skipping to change at line 24 skipping to change at line 24
* 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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _CONSTELLATIONMGR_HPP_ #ifndef _CONSTELLATIONMGR_HPP_
#define _CONSTELLATIONMGR_HPP_ #define _CONSTELLATIONMGR_HPP_
#include "StelObjectType.hpp"
#include "StelObjectModule.hpp"
#include "StelProjectorType.hpp"
#include <vector> #include <vector>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QFont> #include <QFont>
#include "StelObjectType.hpp"
#include "StelObjectModule.hpp"
#include "StelProjectorType.hpp"
class StelToneReproducer; class StelToneReproducer;
class StarMgr; class StarMgr;
class Constellation; class Constellation;
class StelProjector; class StelProjector;
class StelPainter;
//! @class ConstellationMgr //! @class ConstellationMgr
//! Display and manage the constellations. //! Display and manage the constellations.
//! It can display constellations lines, names, art textures and boundaries . //! It can display constellations lines, names, art textures and boundaries .
//! It also supports several different sky cultures. //! It also supports several different sky cultures.
class ConstellationMgr : public StelObjectModule class ConstellationMgr : public StelObjectModule
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool artDisplayed Q_PROPERTY(bool artDisplayed
READ getFlagArt READ getFlagArt
skipping to change at line 104 skipping to change at line 105
virtual ~ConstellationMgr(); virtual ~ConstellationMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initialize the ConstellationMgr. //! Initialize the ConstellationMgr.
//! Reads from the configuration parser object and updates the loadi ng bar //! Reads from the configuration parser object and updates the loadi ng bar
//! as constellation objects are loaded for the required sky culture . //! as constellation objects are loaded for the required sky culture .
virtual void init(); virtual void init();
//! Draw constellation lines, art, names and boundaries. //! Draw constellation lines, art, names and boundaries.
virtual void draw(StelCore* core, class StelRenderer* renderer); virtual void draw(StelCore* core);
//! Updates time-varying state for each Constellation. //! Updates time-varying state for each Constellation.
virtual void update(double deltaTime); virtual void update(double deltaTime);
//! Return the value defining the order of call for the given action //! Return the value defining the order of call for the given action
//! @param actionName the name of the action for which we want the c all order //! @param actionName the name of the action for which we want the c all order
//! @return the value defining the order. The closer to 0 the earlie r the module's action will be called //! @return the value defining the order. The closer to 0 the earlie r the module's action will be called
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
skipping to change at line 160 skipping to change at line 161
void setArtFadeDuration(const float duration); void setArtFadeDuration(const float duration);
//! Get constellation art fade duration in second //! Get constellation art fade duration in second
float getArtFadeDuration() const; float getArtFadeDuration() const;
//! Set constellation maximum art intensity (between 0 and 1) //! Set constellation maximum art intensity (between 0 and 1)
void setArtIntensity(const double intensity); void setArtIntensity(const double intensity);
//! Set constellation maximum art intensity (between 0 and 1) //! Set constellation maximum art intensity (between 0 and 1)
double getArtIntensity() const; double getArtIntensity() const;
//! Define boundary color //! Define boundary color
//! @param color The color of boundaries
//! @code
//! // example of usage in scripts
//! ConstellationMgr.setBoundariesColor(Vec3f(1.0,0.0,0.0));
//! @endcode
void setBoundariesColor(const Vec3f& color); void setBoundariesColor(const Vec3f& color);
//! Get current boundary color //! Get current boundary color
Vec3f getBoundariesColor() const; Vec3f getBoundariesColor() const;
//! Set whether constellation boundaries lines will be displayed //! Set whether constellation boundaries lines will be displayed
void setFlagBoundaries(const bool displayed); void setFlagBoundaries(const bool displayed);
//! Get whether constellation boundaries lines are displayed //! Get whether constellation boundaries lines are displayed
bool getFlagBoundaries(void) const; bool getFlagBoundaries(void) const;
//! Set whether selected constellation must be displayed alone //! Set whether selected constellation must be displayed alone
void setFlagIsolateSelected(const bool isolate); void setFlagIsolateSelected(const bool isolate);
//! Get whether selected constellation is displayed alone //! Get whether selected constellation is displayed alone
bool getFlagIsolateSelected(void) const; bool getFlagIsolateSelected(void) const;
//! Define line color //! Define line color
//! @param color The color of lines
//! @code
//! // example of usage in scripts
//! ConstellationMgr.setLinesColor(Vec3f(1.0,0.0,0.0));
//! @endcode
void setLinesColor(const Vec3f& color); void setLinesColor(const Vec3f& color);
//! Get line color //! Get line color
Vec3f getLinesColor() const; Vec3f getLinesColor() const;
//! Set whether constellation path lines will be displayed //! Set whether constellation path lines will be displayed
void setFlagLines(const bool displayed); void setFlagLines(const bool displayed);
//! Get whether constellation path lines are displayed //! Get whether constellation path lines are displayed
bool getFlagLines(void) const; bool getFlagLines(void) const;
//! Set label color for names //! Set label color for names
//! @param color The color of labels
//! @code
//! // example of usage in scripts
//! ConstellationMgr.setLabelsColor(Vec3f(1.0,0.0,0.0));
//! @endcode
void setLabelsColor(const Vec3f& color); void setLabelsColor(const Vec3f& color);
//! Get label color for names //! Get label color for names
Vec3f getLabelsColor() const; Vec3f getLabelsColor() const;
//! Set whether constellation names will be displayed //! Set whether constellation names will be displayed
void setFlagLabels(bool displayed); void setFlagLabels(bool displayed);
//! Set whether constellation names are displayed //! Set whether constellation names are displayed
bool getFlagLabels(void) const; bool getFlagLabels(void) const;
//! Set the font size used for constellation names display //! Set the font size used for constellation names display
skipping to change at line 258 skipping to change at line 274
//! data items: //! data items:
//! - The number of vertexes which make up in the boundary (integer ). //! - The number of vertexes which make up in the boundary (integer ).
//! - For each vertex, two floating point numbers describing the ra and dec //! - For each vertex, two floating point numbers describing the ra and dec
//! of the vertex. //! of the vertex.
//! - The number of constellations which this boundary separates (a lways 2). //! - The number of constellations which this boundary separates (a lways 2).
//! - Two constellation abbreviations representing the constellatio ns which //! - Two constellation abbreviations representing the constellatio ns which
//! the boundary separates. //! the boundary separates.
//! @param conCatFile the path to the file which contains the conste llation boundary data. //! @param conCatFile the path to the file which contains the conste llation boundary data.
bool loadBoundaries(const QString& conCatFile); bool loadBoundaries(const QString& conCatFile);
//! Draw the constellation lines at the epoch given by the StelCore . //! Draw the constellation lines at the epoch given by the StelCore .
void drawLines(class StelRenderer* renderer, StelProjectorP projecto r, const StelCore* core) const; void drawLines(StelPainter& sPainter, const StelCore* core) const;
//! Draw the constellation art. //! Draw the constellation art.
//! void drawArt(StelPainter& sPainter) const;
//! @param renderer Renderer to draw with.
//! @param projector Projector to project vertices to viewport.
void drawArt(class StelRenderer* renderer, StelProjectorP projector)
const;
//! Draw the constellation name labels. //! Draw the constellation name labels.
//! void drawNames(StelPainter& sPainter) const;
//! @param renderer Renderer to draw with.
//! @param projector Projector to project vertices to viewport.
//! @param font Font to draw the names with.
void drawNames(class StelRenderer* renderer, StelProjectorP projecto
r, QFont& font) const;
//! Draw the constellation boundaries. //! Draw the constellation boundaries.
//! void drawBoundaries(StelPainter& sPainter) const;
//! @param renderer Renderer to draw with.
//! @param projector Projector to project vertices to viewport.
void drawBoundaries(StelRenderer* renderer, StelProjectorP projector
) const;
//! Handle single and multi-constellation selections. //! Handle single and multi-constellation selections.
void setSelectedConst(Constellation* c); void setSelectedConst(Constellation* c);
//! Handle unselecting a single constellation. //! Handle unselecting a single constellation.
void unsetSelectedConst(Constellation* c); void unsetSelectedConst(Constellation* c);
//! Define which constellation is selected from its abbreviation. //! Define which constellation is selected from its abbreviation.
void setSelected(const QString& abbreviation); void setSelected(const QString& abbreviation);
//! Define which constellation is selected and return brightest star . //! Define which constellation is selected and return brightest star .
StelObjectP setSelectedStar(const QString& abbreviation); StelObjectP setSelectedStar(const QString& abbreviation);
//! Define which constellation is selected from a star number. //! Define which constellation is selected from a star number.
void setSelected(const StelObject* s) {if (!s) setSelectedConst(NULL ); else setSelectedConst(isStarIn(s));} void setSelected(const StelObject* s) {if (!s) setSelectedConst(NULL ); else setSelectedConst(isStarIn(s));}
 End of changes. 11 change blocks. 
22 lines changed or deleted 25 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/