21 #ifndef _CONSTELLATIONMGR_HPP_ 22 #define _CONSTELLATIONMGR_HPP_ 25 #include "StelObjectModule.hpp" 30 #include <QStringList> 46 Q_PROPERTY(
bool artDisplayed
49 NOTIFY artDisplayedChanged)
50 Q_PROPERTY(
float artFadeDuration
53 NOTIFY artFadeDurationChanged)
54 Q_PROPERTY(
float artIntensity
57 NOTIFY artIntensityChanged)
58 Q_PROPERTY(
Vec3f boundariesColor
61 NOTIFY boundariesColorChanged)
62 Q_PROPERTY(
bool boundariesDisplayed
65 NOTIFY boundariesDisplayedChanged)
66 Q_PROPERTY(
float fontSize
69 NOTIFY fontSizeChanged)
70 Q_PROPERTY(
bool isolateSelected
73 NOTIFY isolateSelectedChanged)
74 Q_PROPERTY(
Vec3f linesColor
77 NOTIFY linesColorChanged)
78 Q_PROPERTY(
bool linesDisplayed
81 NOTIFY linesDisplayedChanged)
82 Q_PROPERTY(
Vec3f namesColor
85 NOTIFY namesColorChanged)
86 Q_PROPERTY(
bool namesDisplayed
89 NOTIFY namesDisplayedChanged)
93 NOTIFY constellationsDisplayStyleChanged)
94 Q_PROPERTY(
float constellationLineThickness
97 NOTIFY constellationLineThicknessChanged)
119 virtual
void update(
double deltaTime);
145 virtual QStringList
listMatchingObjects(const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=false,
bool inEnglish=false) const;
147 virtual QString getName()
const {
return "Constellations"; }
151 constellationsAbbreviated = 0,
152 constellationsNative = 1,
153 constellationsTranslated = 2,
154 constellationsEnglish = 3
271 void artDisplayedChanged(
const bool displayed)
const;
272 void artFadeDurationChanged(
const float duration)
const;
273 void artIntensityChanged(
const double intensity)
const;
274 void boundariesColorChanged(
const Vec3f & color)
const;
275 void boundariesDisplayedChanged(
const bool displayed)
const;
276 void fontSizeChanged(
const float newSize)
const;
277 void isolateSelectedChanged(
const bool isolate)
const;
278 void linesColorChanged(
const Vec3f & color)
const;
279 void linesDisplayedChanged(
const bool displayed)
const;
280 void namesColorChanged(
const Vec3f & color)
const;
281 void namesDisplayedChanged(
const bool displayed)
const;
283 void constellationLineThicknessChanged(
float thickness)
const;
294 void updateSkyCulture(
const QString& skyCultureDir);
303 void deselectConstellations(
void);
310 void loadNames(
const QString& namesFile);
317 void loadLinesAndArt(
const QString& fileName,
const QString& artfileName,
const QString& cultureName);
332 bool loadBoundaries(
const QString& conCatFile);
336 void loadSeasonalRules(
const QString& rulesFile);
351 void setSelected(
const QString& abbreviation);
353 StelObjectP setSelectedStar(
const QString& abbreviation);
357 void deselect() { setSelected(NULL); }
363 std::vector<Constellation*> selected;
367 Constellation* findFromAbbreviation(
const QString& abbreviation)
const;
368 std::vector<Constellation*> asterisms;
372 bool isolateSelected;
373 bool constellationPickEnabled;
374 std::vector<std::vector<Vec3f> *> allBoundarySegments;
376 QString lastLoadedSkyCulture;
382 float artFadeDuration;
384 double artIntensityMinimumFov;
385 double artIntensityMaximumFov;
387 bool boundariesDisplayed;
392 float constellationLineThickness;
395 #endif // _CONSTELLATIONMGR_HPP_ Vec3f getLabelsColor() const
Get label color for names.
double getArtIntensityMinimumFov() const
Returns the lower bound on the FOV at which the art intensity fades to zero.
ConstellationMgr::ConstellationDisplayStyle getConstellationDisplayStyle()
get the way how constellation names are displayed: abbbreviated/as-given/translated ...
bool getFlagBoundaries(void) const
Get whether constellation boundaries lines are displayed.
void setFlagArt(const bool displayed)
Set whether constellation art will be displayed.
virtual void draw(StelCore *core)
Draw constellation lines, art, names and boundaries.
void setFlagBoundaries(const bool displayed)
Set whether constellation boundaries lines will be displayed.
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
void setArtIntensityMinimumFov(const double fov)
Sets the lower bound on the FOV at which the art intensity fades to zero.
virtual void update(double deltaTime)
Updates time-varying state for each Constellation.
bool getFlagArt(void) const
Get whether constellation art is displayed.
The Constellation class models a grouping of stars in a Sky Culture.
Main class for Stellarium core processing.
Specialization of StelModule which manages a collection of StelObject.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Return the matching constellation object's pointer if exists or NULL.
void setArtFadeDuration(const float duration)
Set constellation art fade duration in second.
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Search for StelObject in an area around a specifid point.
Vec3f getBoundariesColor() const
Get current boundary color.
void setFlagIsolateSelected(const bool isolate)
Set whether selected constellation must be displayed alone.
Converts tones in function of the eye adaptation to luminance.
double getArtIntensityMaximumFov() const
Returns the upper bound on the FOV at which the art intensity becomes the maximum set by setArtIntens...
void setFontSize(const float newFontSize)
Set the font size used for constellation names display.
void setLinesColor(const Vec3f &color)
Define line color.
Define the StelObjectP type.
Provides functions for performing openGL drawing operations.
Provide the main interface to all operations of projecting coordinates from sky to screen...
float getFontSize() const
Get the font size used for constellation names display.
virtual double getCallOrder(StelModuleActionName actionName) const
Return the value defining the order of call for the given action.
void setFlagConstellationPick(const bool mode)
Set whether only one selected constellation must be displayed.
void setConstellationDisplayStyle(ConstellationMgr::ConstellationDisplayStyle style)
Set the way how constellation names are displayed: abbbreviated/as-given/translated.
ConstellationDisplayStyle constellationDisplayStyle
this controls how constellations (and also star names) are printed: Abbreviated/as-given/translated ...
virtual QStringList listAllObjects(bool inEnglish) const
List all StelObjects.
Stores the star catalogue data.
void setLabelsColor(const Vec3f &color)
Set label color for names.
StelModuleActionName
Define the possible action for which an order is defined.
ConstellationDisplayStyle
Describes how to display constellation labels. The viewDialog GUI has a combobox which corresponds to...
void setFlagLabels(const bool displayed)
Set whether constellation names will be displayed.
static QString getConstellationDisplayStyleString(ConstellationMgr::ConstellationDisplayStyle style)
Returns the currently set constellation display style as string, instead of enum. ...
bool getFlagIsolateSelected(void) const
Get whether selected constellation is displayed alone.
Display and manage the constellations.
float getArtIntensity() const
Return constellation maximum art intensity (between 0 and 1) Note that the art intensity is linearly ...
virtual StelObjectP searchByName(const QString &name) const
Return the matching constellation if exists or NULL.
void setArtIntensity(const float intensity)
Set constellation maximum art intensity (between 0 and 1) Note that the art intensity is linearly fad...
void setConstellationLineThickness(const float thickness)
Set the thickness of lines of the constellations.
bool getFlagLabels(void) const
Set whether constellation names are displayed.
float getArtFadeDuration() const
Get constellation art fade duration in second.
StelModuleSelectAction
Enum used when selecting objects to define whether to add to, replace, or remove from the existing se...
bool getFlagConstellationPick(void) const
Get whether only one selected constellation is displayed.
Define the StelProjectorP type.
float getConstellationLineThickness() const
Get the thickness of lines of the constellations.
bool getFlagLines(void) const
Get whether constellation lines are displayed.
virtual QStringList listMatchingObjects(const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const
Find and return the list of at most maxNbItem objects auto-completing the passed object name...
void setBoundariesColor(const Vec3f &color)
Define boundary color.
virtual void init()
Initialize the ConstellationMgr.
void setFlagLines(const bool displayed)
Set whether constellation lines will be displayed.
Vec3f getLinesColor() const
Get line color.
void setArtIntensityMaximumFov(const double fov)
Sets the upper bound on the FOV at which the art intensity becomes the maximum set by setArtIntensity...