21 #ifndef _SOLARSYSTEM_HPP_
22 #define _SOLARSYSTEM_HPP_
28 #include "StelObjectModule.hpp"
41 typedef QSharedPointer<Planet> PlanetP;
49 Q_PROPERTY(
bool labelsDisplayed
52 Q_PROPERTY(
bool orbitsDisplayed
55 Q_PROPERTY(
bool trailsDisplayed
58 Q_PROPERTY(
bool planetsDisplayed
85 virtual void update(
double deltaTime);
119 virtual QStringList
listMatchingObjectsI18n(
const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=
false)
const;
127 virtual QStringList
listMatchingObjects(
const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=
false)
const;
128 virtual QStringList listAllObjects(
bool inEnglish)
const { Q_UNUSED(inEnglish)
return QStringList(); }
129 virtual QStringList listAllObjectsByType(
const QString& objType,
bool inEnglish)
const;
130 virtual QString getName()
const {
return "Solar System"; }
353 void setStelStyle(
const QString& section);
358 void updateSkyCulture(
const QString& skyCultureDir);
370 void computeTransMatrices(
double date,
const Vec3d& observerPos =
Vec3d(0.));
373 void drawPointer(
const StelCore* core);
382 bool loadPlanets(
const QString& filePath);
384 void recreateTrails();
387 int shadowPlanetCount;
394 void setSelected(
const QString& englishName);
396 void setSelected(PlanetP obj);
398 PlanetP getSelected(
void)
const {
return selected;}
406 QFont planetNameFont;
412 QList<PlanetP> systemPlanets;
416 bool flagLightTravelTime;
423 bool flagNativeNames;
424 bool flagTranslatedNames;
425 bool flagIsolatedTrails;
432 QHash<QString, QString> planetNativeNamesMap;
437 QList<Orbit*> orbits;
441 #endif // _SOLARSYSTEM_HPP_
double getElongationForPlanet(QString planetName) const
Get elongation for Solar system bodies from scripts.
void setLabelsAmount(float a)
Set the amount of planet labels.
float getPhaseForPlanet(QString planetName) const
Get phase for Solar system bodies from scripts.
bool getFlagTranslatedNames(void) const
Get the current value of the flag which enables showing translated names for planets or not...
virtual void update(double deltaTime)
Update time-varying components.
QStringList getAllPlanetEnglishNames() const
Get the list of all the planet english names.
void setFlagOrbits(bool b)
Set flag which determines if planet orbits are drawn or hidden.
bool getFlagMoonScale(void) const
Get the current value of the flag which determines if Earth's moon is scaled or not.
QString getApparentMagnitudeAlgorithmOnEarth() const
Get the algorithm used for computation of apparent magnitudes for planets in case observer on the Ear...
virtual double getCallOrder(StelModuleActionName actionName) const
Used to determine what order to draw the various StelModules.
void setFlagMoonScale(bool b)
Set flag which determines if Earth's moon is scaled or not.
PlanetP getSun() const
Get the Planet object pointer for the Sun.
PlanetP getEarth() const
Get the Planet object pointer for the Earth.
Class used to translate strings to any language.
Implementation of StelFader which implements a linear transition.
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
void reloadPlanets()
Reload the planets.
Define the StelTextureSP type.
float getLabelsAmount(void) const
Get the amount of planet labels.
bool nearLunarEclipse()
Determine if a lunar eclipse is close at hand?
Main class for Stellarium core processing.
bool getFlagMarkers() const
Get the current value of the flag which determines if planet markers are drawn or hidden...
virtual QStringList listMatchingObjectsI18n(const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false) const
Find objects by translated name prefix.
PlanetP getMoon() const
Get the Planet object pointer for Earth's moon.
bool getFlagTrails() const
Get the current value of the flag which determines if planet trails are drawn or hidden.
void setFlagHints(bool b)
Set flag which determines if planet hints are drawn or hidden along labels.
void setPointersColor(const Vec3f &c)
Set the color used to draw planet pointers.
Vec3f getPointersColor() const
Get the current color used to draw planet pointers.
float getMoonScale(void) const
Get the display scaling factor for Earth's oon.
bool getFlagLightTravelTime(void) const
Get the current value of the flag which determines if light travel time calculation is used or not...
void setFlagLabels(bool b)
Set flag which determines if planet labels are drawn or hidden.
void setApparentMagnitudeAlgorithmOnEarth(QString algorithm)
Set the algorithm for computation of apparent magnitudes for planets in case observer on the Earth...
bool getFlagLabels() const
Get the current value of the flag which determines if planet labels are drawn or hidden.
bool getFlagPlanets() const
Get the current value of the flag which determines if planet are drawn or hidden. ...
Specialization of StelModule which manages a collection of StelObject.
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Search for SolarSystem objects in some area around a point.
const QList< PlanetP > & getAllPlanets() const
Get the list of all the bodies of the solar system.
void setOrbitsColor(const Vec3f &c)
Set the color used to draw planet orbit lines.
This StelObjectModule derivative is used to model SolarSystem bodies.
void setFlagIsolatedTrails(bool b)
Set flag which enabled the showing of isolated trails for selected objects only or not...
Vec3f getTrailsColor() const
Get the current color used to draw planet trails lines.
Provide the main interface to all operations of projecting coordinates from sky to screen...
bool getFlagIsolatedTrails(void) const
Get the current value of the flag which enables showing of isolated trails for selected objects only ...
void setFlagTranslatedNames(bool b)
Set flag which enable use translated names for planets or not.
double getDistanceToPlanet(QString planetName) const
Get distance to Solar system bodies from scripts.
QStringList getAllPlanetLocalizedNames() const
Get the list of all the planet localized names.
Vec3f getOrbitsColor(void) const
Get the current color used to draw planet orbit lines.
double getPhaseAngleForPlanet(QString planetName) const
Get phase angle for Solar system bodies from scripts.
virtual void init()
Initialize the SolarSystem.
StelModuleActionName
Define the possible action for which an order is defined.
void setFlagMarkers(bool b)
Set flag which determines if planet markers are drawn or hidden.
virtual QStringList listMatchingObjects(const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false) const
Find objects by translated name prefix.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Search for a SolarSystem object based on the localised name.
void computePositions(double date, const Vec3d &observerPos=Vec3d(0.))
Compute the position and transform matrix for every element of the solar system.
void setLabelsColor(const Vec3f &c)
Set the color used to draw planet labels.
bool getFlagNativeNames(void) const
Get the current value of the flag which enables showing native names for planets or not...
void setFlagNativeNames(bool b)
Set flag which enable use native names for planets or not.
StelModuleSelectAction
Enum used when selecting objects to define whether to add to, replace, or remove from the existing se...
void setTrailsColor(const Vec3f &c)
Set the color used to draw planet trails lines.
void setFontSize(float newFontSize)
Set planet names font size.
bool getFlagOrbits() const
Get the current value of the flag which determines if planet orbits are drawn or hidden.
void setMoonScale(double f)
Set the display scaling factor for Earth's moon.
void updateI18n()
Translate names. (public so that SolarSystemEditor can call it).
virtual void deinit()
Called before the module will be delete, and before the openGL context is suppressed.
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
bool getFlagHints() const
Get the current value of the flag which determines if planet hints are drawn or hidden along labels...
void setFlagPlanets(bool b)
Set flag which determines if planets are drawn or hidden.
QString getPlanetType(QString planetName) const
Get type for Solar system bodies from scripts.
float getPlanetVMagnitude(QString planetName, bool withExtinction=false) const
Get the V magnitude for Solar system bodies from scripts.
const Vec3f & getLabelsColor(void) const
Get the current color used to draw planet labels.
QString getPlanetHashString()
Get a hash of locale and ssystem.ini names for use with the TUI.
void setFlagTrails(bool b)
Set flag which determines if planet trails are drawn or hidden.
void setFlagLightTravelTime(bool b)
Set flag which determines if the light travel time calculation is used or not.
PlanetP searchByEnglishName(QString planetEnglishName) const
Get a pointer to a Planet object.
virtual void draw(StelCore *core)
Draw SolarSystem objects (planets).
virtual StelObjectP searchByName(const QString &name) const
Search for a SolarSystem object based on the English name.