Stellarium  0.20.4
Public Slots | Signals | Public Member Functions | Properties
Calendars Class Reference

Calendars plugin provides an interface to various calendars.

#include <Calendars.hpp>

Public Slots

bool isEnabled () const
 is display of calendars overlay active?
void enable (bool b)
 enable display of calendars overlay
bool isJulianDisplayed () const
 display Julian Calendar?
void showJulian (bool b)
 activate display of Julian Calendar
bool isGregorianDisplayed () const
 display Gregorian Calendar?
void showGregorian (bool b)
 activate display of Gregorian Calendar
bool isISODisplayed () const
 display ISO Calendar?
void showISO (bool b)
 activate display of ISO Calendar
bool isIcelandicDisplayed () const
 display Icelandic Calendar?
void showIcelandic (bool b)
 activate display of Icelandic Calendar
bool isRomanDisplayed () const
 display Roman Calendar?
void showRoman (bool b)
 activate display of Roman Calendar
bool isOlympicDisplayed () const
 display Olympic Calendar?
void showOlympic (bool b)
 activate display of Olympic Calendar
bool isEgyptianDisplayed () const
 display Egyptian Calendar?
void showEgyptian (bool b)
 activate display of Egyptian Calendar
bool isArmenianDisplayed () const
 display Armenian Calendar?
void showArmenian (bool b)
 activate display of Armenian Calendar
bool isZoroastrianDisplayed () const
 display Zoroastrian Calendar?
void showZoroastrian (bool b)
 activate display of Zoroastrian Calendar
bool isCopticDisplayed () const
 display Coptic Calendar?
void showCoptic (bool b)
 activate display of Coptic Calendar
bool isEthiopicDisplayed () const
 display Ethiopic Calendar?
void showEthiopic (bool b)
 activate display of Ethiopic Calendar
bool isChineseDisplayed () const
 display Chinese Calendar?
void showChinese (bool b)
 activate display of Chinese Calendar
bool isMayaLongCountDisplayed () const
 display Maya Long Count?
void showMayaLongCount (bool b)
 activate display of Maya Long Count
bool isMayaHaabDisplayed () const
 display Maya Haab?
void showMayaHaab (bool b)
 activate display of Maya Haab
bool isMayaTzolkinDisplayed () const
 display Maya Tzolkin?
void showMayaTzolkin (bool b)
 activate display of Maya Tzolkin
bool isAztecXihuitlDisplayed () const
 display Aztec Xihuitl?
void showAztecXihuitl (bool b)
 activate display of Aztec Xihuitl
bool isAztecTonalpohualliDisplayed () const
 display Aztec Tonalpohualli?
void showAztecTonalpohualli (bool b)
 activate display of Aztec Tonalpohualli
bool isBalineseDisplayed () const
 display Balinese Pawukon?
void showBalinese (bool b)
 activate display of Balinese Pawukon


void enabledChanged (bool b)
void showJulianChanged (bool b)
void showGregorianChanged (bool b)
void showISOChanged (bool b)
void showIcelandicChanged (bool b)
void showRomanChanged (bool b)
void showOlympicChanged (bool b)
void showEgyptianChanged (bool b)
void showArmenianChanged (bool b)
void showZoroastrianChanged (bool b)
void showCopticChanged (bool b)
void showEthiopicChanged (bool b)
void showChineseChanged (bool b)
void showMayaLongCountChanged (bool b)
void showMayaHaabChanged (bool b)
void showMayaTzolkinChanged (bool b)
void showAztecXihuitlChanged (bool b)
void showAztecTonalpohualliChanged (bool b)
void showBalineseChanged (bool b)

Public Member Functions

virtual void init () Q_DECL_OVERRIDE
 Initialize itself. More...
virtual void update (double) Q_DECL_OVERRIDE
 Set all calendars to the Core's JD.
virtual void draw (StelCore *core) Q_DECL_OVERRIDE
 if enabled, provide a table of calendars on screen.
virtual double getCallOrder (StelModuleActionName actionName) const Q_DECL_OVERRIDE
 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) Q_DECL_OVERRIDE
 Detect or show the configuration GUI elements for the module. More...
void restoreDefaultSettings ()
 Restore the plug-in's settings to the default state. More...
void loadSettings ()
 Load the plug-in's settings from the configuration file. More...
CalendargetCal (QString name)
 Get a pointer to the respective Calendar. More...
- Public Member Functions inherited from StelModule
virtual void deinit ()
 Called before the module will be delete, and before the openGL context is suppressed. More...
virtual QSettings * getSettings ()
 Return module-specific settings. 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 adress 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...


bool enabled
bool flagShowJulian
bool flagShowGregorian
bool flagShowISO
bool flagShowIcelandic
bool flagShowRoman
bool flagShowOlympic
bool flagShowEgyptian
bool flagShowArmenian
bool flagShowZoroastrian
bool flagShowCoptic
bool flagShowEthiopic
bool flagShowChinese
bool flagShowMayaLongCount
bool flagShowMayaHaab
bool flagShowMayaTzolkin
bool flagShowAztecXihuitl
bool flagShowAztecTonalpohualli
bool flagShowBalinese

Additional Inherited Members

- 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,
 Define the possible action for which an order is defined. More...
- 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

◆ configureGui()

virtual bool Calendars::configureGui ( bool  show = true)

This is to be used with plugins to display a configuration dialog from the plugin list window.

showif true, make the configuration GUI visible. If false, hide the config GUI if there is one.
true if the module has a configuration GUI, else false.

Reimplemented from StelModule.

◆ getCal()

Calendar* Calendars::getCal ( QString  name)

Returns Q_NULLPTR if not found. Valid names: Julian, Gregorian, ISO, Icelandic, Roman, Olympic, Egyptian, Armenian, Zoroastrian, Coptic, Ethiopic, MayaLongCount, MayaHaab, MayaTzolkin, AztecXihuitl, AztecTonalpohualli TODO: ADD HERE: Chinese, ...

◆ getCallOrder()

virtual double Calendars::getCallOrder ( StelModuleActionName  actionName) const
actionNamethe name of the action for which we want the call order
the value defining the order. The closer to 0 the earlier the module's action will be called

Reimplemented from StelModule.

◆ init()

virtual void Calendars::init ( )

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

Implements StelModule.

◆ loadSettings()

void Calendars::loadSettings ( )

Settings are kept in the "Calendars" section in Stellarium's configuration file. If no such section exists, it will load default values.

See also

◆ restoreDefaultSettings()

void Calendars::restoreDefaultSettings ( )

Replace the plug-in's settings in Stellarium's configuration file with the default values and re-load them. Uses internally loadSettings().