Stellarium  24.3
Public Types | Public Slots | Signals | Public Member Functions | Properties
SpecificTimeMgr Class Reference

Public Types

enum  Equinox { March = 0 , September = 1 }
 
enum  Solstice { June = 0 , December = 1 }
 
- Public Types inherited from StelModule
enum  StelModuleSelectAction { AddToSelection , ReplaceSelection , RemoveFromSelection }
 Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More...
 
enum  StelModuleActionName {
  ActionDraw , ActionUpdate , ActionHandleMouseClicks , ActionHandleMouseMoves ,
  ActionHandleKeys
}
 Define the possible action for which an order is defined. More...
 

Public Slots

void setTwilightAltitude (double alt)
 Set twilight altitude [degrees].
 
void nextTransit ()
 Set simulation time to the time of next transit of selected object.
 
void previousTransit ()
 Set simulation time to the time of previous transit of selected object.
 
void todayTransit ()
 Set simulation time to the time of today's transit of selected object.
 
void nextRising ()
 Set simulation time to the time of next rising of selected object (if applicable) More...
 
void previousRising ()
 Set simulation time to the time of previous rising of selected object (if applicable) More...
 
void todayRising ()
 Set simulation time to the time of today's rising of selected object (if applicable) More...
 
void nextSetting ()
 Set simulation time to the time of next setting of selected object (if applicable) More...
 
void previousSetting ()
 Set simulation time to the time of previous setting of selected object (if applicable) More...
 
void todaySetting ()
 Set simulation time to the time of today's setting of selected object (if applicable) More...
 
void todayMorningTwilight ()
 Set simulation time to this day's morning when Sun reaches twilightAltitude.
 
void todayEveningTwilight ()
 Set simulation time to this day's evening when Sun reaches twilightAltitude.
 
void previousMorningTwilight ()
 Set simulation time to the previous day's morning when Sun reaches twilightAltitude.
 
void previousEveningTwilight ()
 Set simulation time to the previous day's evening when Sun reaches twilightAltitude.
 
void nextMorningTwilight ()
 Set simulation time to the next day's morning when Sun reaches twilightAltitude.
 
void nextEveningTwilight ()
 Set simulation time to the next day's evening when Sun reaches twilightAltitude.
 
void todayMorningAtAltitude ()
 Set simulation time to this day's morning when selected object reaches current altitude.
 
void nextMorningAtAltitude ()
 Set simulation time to the next morning when selected object reaches current altitude.
 
void previousMorningAtAltitude ()
 Set simulation time to the previous morning when selected object reaches current altitude.
 
void todayEveningAtAltitude ()
 Set simulation time to this day's evening when selected object reaches current altitude.
 
void nextEveningAtAltitude ()
 Set simulation time to the next evening when selected object reaches current altitude.
 
void previousEveningAtAltitude ()
 Set simulation time to the previous evening when selected object reaches current altitude.
 
void currentMarchEquinox ()
 Set simulation time to the time of March equinox at current year.
 
void nextMarchEquinox ()
 Set simulation time to the time of March equinox at next year.
 
void previousMarchEquinox ()
 Set simulation time to the time of March equinox at previous year.
 
void currentSeptemberEquinox ()
 Set simulation time to the time of September equinox at current year.
 
void nextSeptemberEquinox ()
 Set simulation time to the time of September equinox at next year.
 
void previousSeptemberEquinox ()
 Set simulation time to the time of September equinox at previous year.
 
void currentJuneSolstice ()
 Set simulation time to the time of June solstice at current year.
 
void nextJuneSolstice ()
 Set simulation time to the time of June solstice at next year.
 
void previousJuneSolstice ()
 Set simulation time to the time of June solstice at previous year.
 
void currentDecemberSolstice ()
 Set simulation time to the time of December solstice at current year.
 
void nextDecemberSolstice ()
 Set simulation time to the time of December solstice at next year.
 
void previousDecemberSolstice ()
 Set simulation time to the time of December solstice at previous year.
 

Signals

void twilightAltitudeChanged (double alt)
 Signal that the configurable twilight altitude for the sun has changed.
 
void eventYearChanged ()
 

Public Member Functions

void init () override
 Initialize itself. More...
 
void deinit () override
 Called before the module will be deleted, and before the OpenGL context is suppressed. More...
 
double getTwilightAltitude () const
 Get twilight altitude [degrees].
 
double getEquinox (int year, SpecificTimeMgr::Equinox equinox)
 Compute the time of equinoxe for specific year Source: J. More...
 
double getSolstice (int year, SpecificTimeMgr::Solstice solstice)
 Compute the time of solstice for specific year Source: J. More...
 
- Public Member Functions inherited from StelModule
 StelModule ()
 Constructor. Every derived class MUST call setObjectName(className) in its constructor.
 
virtual QSettings * getSettings ()
 Return module-specific settings. More...
 
virtual void draw (StelCore *core)
 Execute all the drawing functions for this module. More...
 
virtual void update (double deltaTime)
 Update the module with respect to the time. More...
 
virtual QString getModuleVersion () const
 Get the version of the module, default is stellarium main version.
 
virtual QString getAuthorName () const
 Get the name of the module author.
 
virtual QString getAuthorEmail () const
 Get the email address of the module author.
 
virtual void handleMouseClicks (class QMouseEvent *)
 Handle mouse clicks. More...
 
virtual void handleMouseWheel (class QWheelEvent *)
 Handle mouse wheel. More...
 
virtual bool handleMouseMoves (int x, int y, Qt::MouseButtons b)
 Handle mouse moves. More...
 
virtual void handleKeys (class QKeyEvent *e)
 Handle key events. More...
 
virtual bool handlePinch (qreal scale, bool started)
 Handle pinch gesture events. More...
 
virtual double getCallOrder (StelModuleActionName actionName) const
 Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations. More...
 
virtual bool configureGui (bool show=true)
 Detect or show the configuration GUI elements for the module. More...
 

Properties

double twilightAltitude
 configurable altitude for the sun for "goto next twilight" actions
 

Additional Inherited Members

- Protected Member Functions inherited from StelModule
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to slot) to the StelActionMgr object. More...
 
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to own slot) to the StelActionMgr object. More...
 
StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *contextObject, std::function< void()> lambda, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to Lambda functor) to the StelActionMgr object. More...
 

Member Function Documentation

◆ deinit()

void SpecificTimeMgr::deinit ( )
overridevirtual

Called before the module will be deleted, and before the OpenGL context is suppressed.

Deinitialize all OpenGL texture in this method.

Reimplemented from StelModule.

◆ getEquinox()

double SpecificTimeMgr::getEquinox ( int  year,
SpecificTimeMgr::Equinox  equinox 
)

Compute the time of equinoxe for specific year Source: J.

Meeus "Astronomical Algorithms" (2nd ed., 1998) ch. 27

Parameters
year(valid range: -1000..+3000)
equinoxtype (Equinox::March or Equinox::September)
Returns
JDE or zero for outside the valid range

◆ getSolstice()

double SpecificTimeMgr::getSolstice ( int  year,
SpecificTimeMgr::Solstice  solstice 
)

Compute the time of solstice for specific year Source: J.

Meeus "Astronomical Algorithms" (2nd ed., 1998) ch. 27

Parameters
year(valid range: -1000..+3000)
solsticetype (Solstice::June or Solstice::December)
Returns
JDE or zero for outside the valid range

◆ init()

void SpecificTimeMgr::init ( )
overridevirtual

Initialize itself.

If the initialization takes significant time, the progress should be displayed on the loading bar.

Implements StelModule.

◆ nextRising

void SpecificTimeMgr::nextRising ( )
slot

Set simulation time to the time of next rising of selected object (if applicable)

Note
for circumpolar objects, this sets to time of lower culmination
for permanently invisible objects, this sets to time of transit

◆ nextSetting

void SpecificTimeMgr::nextSetting ( )
slot

Set simulation time to the time of next setting of selected object (if applicable)

Note
for circumpolar objects, this sets to time of lower culmination
for permanently invisible objects, this sets to time of transit

◆ previousRising

void SpecificTimeMgr::previousRising ( )
slot

Set simulation time to the time of previous rising of selected object (if applicable)

Note
for circumpolar objects, this sets to time of lower culmination
for permanently invisible objects, this sets to time of transit

◆ previousSetting

void SpecificTimeMgr::previousSetting ( )
slot

Set simulation time to the time of previous setting of selected object (if applicable)

Note
for circumpolar objects, this sets to time of lower culmination
for permanently invisible objects, this sets to time of transit

◆ todayRising

void SpecificTimeMgr::todayRising ( )
slot

Set simulation time to the time of today's rising of selected object (if applicable)

Note
for circumpolar objects, this sets to time of lower culmination
for permanently invisible objects, this sets to time of transit

◆ todaySetting

void SpecificTimeMgr::todaySetting ( )
slot

Set simulation time to the time of today's setting of selected object (if applicable)

Note
for circumpolar objects, this sets to time of lower culmination
for permanently invisible objects, this sets to time of transit