Stellarium  25.4
Public Member Functions
scm::ScmSkyCulture Class Reference

Public Member Functions

void setId (const QString &id)
 Sets the id of the sky culture.
 
const QString & getId () const
 Gets the id of the sky culture.
 
void setFallbackToInternationalNames (bool fallback)
 Sets whether to show common names in addition to the culture-specific ones.
 
ScmConstellationaddConstellation (const QString &id, const std::vector< ConstellationLine > &lines, const bool isDarkConstellation)
 Adds a constellation to the sky culture.
 
void removeConstellation (const QString &id)
 Removes a constellation from the sky culture by its ID.
 
ScmConstellationgetConstellation (const QString &id)
 Gets a constellation from the sky culture by its ID.
 
std::vector< std::unique_ptr< ScmConstellation > > * getConstellations ()
 Returns a pointer to the constellations of the sky culture Constellations are held as unique pointers, so the addresses of the constellation objects remain valid even if the vector is modified.
 
QJsonObject toJson (const bool mergeLines) const
 Returns the sky culture as a JSON object. More...
 
void draw (StelCore *core) const
 Draws the sky culture.
 
void setDescription (const scm::Description &description)
 Sets the description of the sky culture. More...
 
bool saveDescriptionAsMarkdown (QFile &file)
 Saves the current sky culture description as markdown text. More...
 
bool saveIllustrations (const QString &directory)
 Saves all illustrations to the directory. More...
 

Member Function Documentation

◆ saveDescriptionAsMarkdown()

bool scm::ScmSkyCulture::saveDescriptionAsMarkdown ( QFile &  file)

Saves the current sky culture description as markdown text.

Parameters
fileThe file to save the description to.
Returns
true if the description was saved successfully, false otherwise.

◆ saveIllustrations()

bool scm::ScmSkyCulture::saveIllustrations ( const QString &  directory)

Saves all illustrations to the directory.

No subdirectory is saved.

Parameters
directoryThe directory the illustrations are saved in.
Returns
true Successful saved.
false Failed to save.

◆ setDescription()

void scm::ScmSkyCulture::setDescription ( const scm::Description description)

Sets the description of the sky culture.

Parameters
descriptionThe description to set.

◆ toJson()

QJsonObject scm::ScmSkyCulture::toJson ( const bool  mergeLines) const

Returns the sky culture as a JSON object.

Parameters
mergeLinesWhether to merge the lines of the constellations into polylines where possible.