Stellarium  23.4
Public Slots | Signals | Public Member Functions | Properties
StelSkyCultureMgr Class Reference

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.
 
int getCurrentSkyCultureClassificationIdx () const
 Get the classification index for the current sky culture Config option: info/classification Possible values: More...
 
QString getCurrentSkyCultureHtmlClassification () const
 
QString getCurrentSkyCultureHtmlLicense () const
 
QString getCurrentSkyCultureHtmlRegion () const
 
QString getCurrentSkyCultureHtmlReferences () const
 
QString getCurrentSkyCultureHtmlDescription () const
 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...
 
QString 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, StelSkyCulturegetDirToNameMap () const
 Returns a map from sky culture IDs/folders to sky culture names.
 

Signals

void defaultSkyCultureChanged (const QString &id)
 Emitted whenever the default sky culture changed. More...
 
void currentSkyCultureChanged (const QString &id)
 Emitted when the current sky culture changes.
 

Public Member Functions

void init ()
 Initialize the StelSkyCultureMgr object. More...
 
StelSkyCulture getSkyCulture () const
 Get the current sky culture.
 

Properties

QString currentSkyCultureID
 
QString defaultSkyCultureID
 

Detailed Description

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.

Author
Fabien Chereau

Member Function Documentation

◆ defaultSkyCultureChanged

void StelSkyCultureMgr::defaultSkyCultureChanged ( const QString &  id)
signal

Emitted whenever the default sky culture changed.

See also
setDefaultSkyCultureID

◆ getCurrentSkyCultureClassificationIdx

int StelSkyCultureMgr::getCurrentSkyCultureClassificationIdx ( ) const
slot

Get the classification index for the current sky culture Config option: info/classification Possible values:

  • scientific (1)
  • traditional (2; using by default)
  • personal (3)
  • single (4)

◆ getCurrentSkyCultureHtmlClassification

QString StelSkyCultureMgr::getCurrentSkyCultureHtmlClassification ( ) const
slot
Returns
a localized HTML description of the classification for the current sky culture

◆ getCurrentSkyCultureHtmlDescription

QString StelSkyCultureMgr::getCurrentSkyCultureHtmlDescription ( ) const
slot

Returns a localized HTML description for the current sky culture.

Returns
a HTML description of the current sky culture, suitable for display

◆ getCurrentSkyCultureHtmlLicense

QString StelSkyCultureMgr::getCurrentSkyCultureHtmlLicense ( ) const
slot
Returns
a localized HTML description of the license for the current sky culture

◆ getCurrentSkyCultureHtmlReferences

QString StelSkyCultureMgr::getCurrentSkyCultureHtmlReferences ( ) const
slot
Returns
a localized HTML description of the references for the current sky culture

◆ getCurrentSkyCultureHtmlRegion

QString StelSkyCultureMgr::getCurrentSkyCultureHtmlRegion ( ) const
slot
Returns
a localized HTML description of the region for the current sky culture

◆ getSkyCultureListEnglish

QString StelSkyCultureMgr::getSkyCultureListEnglish ( void  ) const
slot

Get a list of sky culture names in English.

Returns
A new-line delimited list of English sky culture names.

◆ getSkyCultureListI18

QStringList StelSkyCultureMgr::getSkyCultureListI18 ( void  ) const
slot

Get a list of sky culture names in the current language.

Returns
A list of translated sky culture names.

◆ init()

void StelSkyCultureMgr::init ( )

Initialize the StelSkyCultureMgr object.

Gets the default sky culture name from the application's settings, sets that sky culture by calling setCurrentSkyCultureID().

◆ setCurrentSkyCultureID

bool StelSkyCultureMgr::setCurrentSkyCultureID ( const QString &  id)
slot

Set the current sky culture from the ID.

Parameters
idthe sky culture ID.
Returns
true on success; else false.

◆ setCurrentSkyCultureNameI18

bool StelSkyCultureMgr::setCurrentSkyCultureNameI18 ( const QString &  cultureName)
slot

Set the sky culture from i18n name.

Returns
true on success; false and doesn't change if skyculture is invalid.

◆ setDefaultSkyCultureID

bool StelSkyCultureMgr::setDefaultSkyCultureID ( const QString &  id)
slot

Set the default sky culture from the ID.

Parameters
idthe sky culture ID.
Returns
true on success; else false.