![]() |
Stellarium
HEAD
|
Manage sky cultures for stellarium. More...
#include <StelSkyCultureMgr.hpp>
Public Slots | |
| QString | getCurrentSkyCultureEnglishName () const |
| Get the current sky culture English name. | |
| QString | getCurrentSkyCultureNameI18 () const |
| Get the current sky culture translated name. | |
| bool | setCurrentSkyCultureNameI18 (const QString &cultureName) |
| Set the sky culture from i18n name. More... | |
| QString | getCurrentSkyCultureID () const |
| Get the current sky culture ID. | |
| bool | setCurrentSkyCultureID (const QString &id) |
| Set the current sky culture from the ID. More... | |
| void | reloadSkyCulture () |
| Reload the current sky culture. | |
| StelSkyCulture::BoundariesType | getCurrentSkyCultureBoundariesType () const |
| Get the type of boundaries of the current sky culture Config option: info/boundaries. | |
| StelSkyCulture::CLASSIFICATION | getCurrentSkyCultureClassificationIdx () const |
| Get the classification index for the current sky culture. | |
| QString | getCurrentSkyCultureHtmlClassification () const |
| QString | getCurrentSkyCultureHtmlLicense () const |
| QString | getCurrentSkyCultureHtmlRegion () const |
| QString | getCurrentSkyCultureHtmlDescription () |
| Returns a localized HTML description for the current sky culture. More... | |
| QString | getDefaultSkyCultureID () |
| Get the default sky culture ID. | |
| bool | setDefaultSkyCultureID (const QString &id) |
| Set the default sky culture from the ID. More... | |
| QStringList | getSkyCultureListEnglish (void) const |
| Get a list of sky culture names in English. More... | |
| QStringList | getSkyCultureListI18 (void) const |
| Get a list of sky culture names in the current language. More... | |
| QStringList | getSkyCultureListIDs (void) const |
| Get a list of sky culture IDs. | |
| QMap< QString, StelSkyCulture > | getDirToNameMap () const |
| Returns a map from sky culture IDs/folders to sky culture names. | |
| static StelObject::CulturalDisplayStyle | convertCulturalDisplayStyleFromCSVstring (const QString &csv) |
| static QString | convertCulturalDisplayStyleToCSVstring (const StelObject::CulturalDisplayStyle style) |
| StelObject::CulturalDisplayStyle | getScreenLabelStyle () const |
| Returns the screen labeling setting for the currently active skyculture. | |
| QString | getScreenLabelStyleString () const |
| Scripting version. | |
| void | setScreenLabelStyle (const StelObject::CulturalDisplayStyle style) |
| Sets the screen labeling setting for the currently active skyculture. | |
| void | setScreenLabelStyle (const QString &style) |
| scripting version | |
| StelObject::CulturalDisplayStyle | getInfoLabelStyle () const |
| Returns the InfoString labeling setting for the currently active skyculture. | |
| QString | getInfoLabelStyleString () const |
| Scripting version. | |
| void | setInfoLabelStyle (const StelObject::CulturalDisplayStyle style) |
| sets the InfoString labeling setting for the currently active skyculture | |
| void | setInfoLabelStyle (const QString &style) |
| scripting version | |
| StelObject::CulturalDisplayStyle | getZodiacLabelStyle () const |
| Returns the Zodiac labeling setting for the currently active skyculture. | |
| QString | getZodiacLabelStyleString () const |
| Scripting version. | |
| void | setZodiacLabelStyle (const StelObject::CulturalDisplayStyle style) |
| sets the Zodiac labeling setting for the currently active skyculture | |
| void | setZodiacLabelStyle (const QString &style) |
| scripting version | |
| StelObject::CulturalDisplayStyle | getLunarSystemLabelStyle () const |
| Returns the Lunar_System labeling setting for the currently active skyculture. | |
| QString | getLunarSystemLabelStyleString () const |
| Scripting version. | |
| void | setLunarSystemLabelStyle (const StelObject::CulturalDisplayStyle style) |
| sets the Lunar_System labeling setting for the currently active skyculture | |
| void | setLunarSystemLabelStyle (const QString &style) |
| scripting version | |
| bool | getFlagOverrideUseCommonNames () const |
| Returns whether we ignore SC authors' settings "fallback_to_international_names". | |
| void | setFlagOverrideUseCommonNames (bool override) |
| Set whether we ignore SC authors' settings "fallback_to_international_names". | |
| bool | getFlagUseAbbreviatedNames () const |
| Returns whether we show shortest name as screen label. | |
| void | setFlagUseAbbreviatedNames (bool b) |
| Set whether we ignore SC authors' settings "fallback_to_international_names". | |
| bool | currentSkycultureUsesCommonNames () const |
| Returns whether current skyculture uses (incorporates) common names. | |
Signals | |
| void | defaultSkyCultureIDChanged (const QString &id) |
| Emitted whenever the default sky culture changed. More... | |
| void | currentSkyCultureIDChanged (const QString &id) |
| Emitted when the current sky culture changes. | |
| void | currentSkyCultureChanged (const StelSkyCulture &culture) |
| Emitted when the current sky culture changes. | |
| void | infoLabelStyleChanged (const StelObject::CulturalDisplayStyle style) |
| Emitted when InfoLabelStyle has changed. | |
| void | screenLabelStyleChanged (const StelObject::CulturalDisplayStyle style) |
| Emitted when ScreenLabelStyle has changed. | |
| void | zodiacLabelStyleChanged (const StelObject::CulturalDisplayStyle style) |
| Emitted when ZodiacLabelStyle has changed. | |
| void | lunarSystemLabelStyleChanged (const StelObject::CulturalDisplayStyle style) |
| Emitted when Lunar_System LabelStyle has changed. | |
| void | flagOverrideUseCommonNamesChanged (bool override) |
| Emitted on flag change. | |
| void | flagUseAbbreviatedNamesChanged (bool b) |
| Emitted on flag change. | |
Public Member Functions | |
| void | init () |
| Initialize the StelSkyCultureMgr object. More... | |
| QString | createCulturalLabel (const StelObject::CulturalName &cName, const StelObject::CulturalDisplayStyle style, const QString &commonNameI18n, const QString &abbrevI18n=QString()) const |
| Creates one label from cName. More... | |
Public Member Functions inherited from StelModule | |
| StelModule () | |
| Constructor. Every derived class MUST call setObjectName(className) in its constructor. | |
| virtual void | deinit () |
| Called before the module will be deleted, and before the OpenGL context is suppressed. More... | |
| 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 | |
| QString | currentSkyCultureID |
| QString | defaultSkyCultureID |
| StelObject::CulturalDisplayStyle | screenLabelStyle |
| StelObject::CulturalDisplayStyle | infoLabelStyle |
| StelObject::CulturalDisplayStyle | zodiacLabelStyle |
| StelObject::CulturalDisplayStyle | lunarSystemLabelStyle |
| bool | flagUseAbbreviatedNames |
| Replace any detailed cultural label by the short label (from constellation ID) This should be a short string, some skycultures still have numerical IDs here. | |
| bool | flagOverrideUseCommonNames |
| Ignore skyculture dict setting "fallback_to_international_names". | |
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 , ActionHandleKeys } |
| Define the possible action for which an order is defined. More... | |
Protected Member Functions inherited from StelModule | |
| class StelAction * | addAction (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 StelAction * | addAction (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... | |
| StelAction * | addAction (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... | |
Manage sky cultures for stellarium.
In the installation data directory and user data directory are the "skycultures" sub-directories containing one sub-directory per sky culture. This sub-directory name is that we refer to as sky culture ID here.
| QString StelSkyCultureMgr::createCulturalLabel | ( | const StelObject::CulturalName & | cName, |
| const StelObject::CulturalDisplayStyle | style, | ||
| const QString & | commonNameI18n, | ||
| const QString & | abbrevI18n = QString() |
||
| ) | const |
Creates one label from cName.
| commonNameI18n | object common name in user language. |
| abbrevI18n | string to use as shortest possible label. If you call this with an actual non-default argument abbrevI18n, you really only want this short label, and style is not evaluated. If abbrevI18n starts with a dot, an empty string is returned. |
|
signal |
Emitted whenever the default sky culture changed.
|
slot |
|
slot |
Returns a localized HTML description for the current sky culture.
|
slot |
|
slot |
|
slot |
Get a list of sky culture names in English.
|
slot |
Get a list of sky culture names in the current language.
|
virtual |
Initialize the StelSkyCultureMgr object.
Gets the default sky culture name from the application's settings, sets that sky culture by calling setCurrentSkyCultureID().
Implements StelModule.
|
slot |
Set the current sky culture from the ID.
| id | the sky culture ID. |
|
slot |
Set the sky culture from i18n name.
|
slot |
Set the default sky culture from the ID.
| id | the sky culture ID. |