![]() |
Stellarium
26.3
|
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. | |
| ScmConstellation & | addConstellation (const QString &id, const std::vector< ConstellationLine > &lines, const bool isDarkConstellation) |
| Adds a constellation to the sky culture. | |
| void | addLocation (const scm::CulturePolygon &polygon) |
| Adds a location to the sky culture. | |
| void | removeConstellation (const QString &id) |
| Removes a constellation from the sky culture by its ID. | |
| void | removeLocation (int id) |
| Removes a location from the sky culture by its ID. | |
| ScmConstellation * | getConstellation (const QString &id) |
| Gets a constellation from the sky culture by its ID. | |
| ScmConstellation * | getConstellationByEnglishName (const QString &englishName) |
| Gets a constellation from the sky culture by its English (translated) name. More... | |
| ScmConstellation * | getConstellationByDisplayName (const QString &displayName) |
| Gets a constellation from the sky culture by its display name, i.e. More... | |
| 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... | |
| QJsonObject | getTerritoryGeoJson () const |
| Returns the territory of the sky culture as a (Geo)JSON object. | |
| void | draw (StelCore *core) const |
| Draws the sky culture. | |
| void | setDescription (const scm::Description &description) |
| Sets the description of the sky culture. More... | |
| void | setCulturalNames (const QMap< QString, QList< ScmCulturalName >> &culturalNames) |
| Sets the cultural names of stars, planets DSOs 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... | |
| void | mergeLocations () |
| Checks whether the polygons of locations overlap and merges them if necessary. | |
| const scm::Description & | getDescription () const |
| Returns the description of the sky culture. | |
| const QMap< QString, QList< ScmCulturalName > > & | getCulturalNames () const |
| Returns the cultural names map of the sky culture. | |
| const QList< CulturePolygon > & | getLocations () const |
| Returns the geographic locations of the sky culture. | |
| bool | getFallbackToInternationalNames () const |
| Returns whether to fall back to international names when culture-specific names are absent. | |
| ScmConstellation* scm::ScmSkyCulture::getConstellationByDisplayName | ( | const QString & | displayName | ) |
Gets a constellation from the sky culture by its display name, i.e.
the translated name followed by the id, e.g. "The Market (tianquiztli)".
| displayName | The display name to match. |
| ScmConstellation* scm::ScmSkyCulture::getConstellationByEnglishName | ( | const QString & | englishName | ) |
Gets a constellation from the sky culture by its English (translated) name.
The comparison is case-insensitive and ignores non-alphanumeric symbols (e.g. apostrophes, punctuation) so that e.g. "Orion's Belt" matches "Orions Belt".
| englishName | The English name to match. |
| bool scm::ScmSkyCulture::saveDescriptionAsMarkdown | ( | QFile & | file | ) |
Saves the current sky culture description as markdown text.
| file | The file to save the description to. |
| bool scm::ScmSkyCulture::saveIllustrations | ( | const QString & | directory | ) |
Saves all illustrations to the directory.
No subdirectory is saved.
| directory | The directory the illustrations are saved in. |
| void scm::ScmSkyCulture::setCulturalNames | ( | const QMap< QString, QList< ScmCulturalName >> & | culturalNames | ) |
Sets the cultural names of stars, planets DSOs of the sky culture.
The map key is the object identifier (e.g. "HIP 1234", "NAME Venus", "M 31").
| culturalNames | Map of cultural names to set. |
| void scm::ScmSkyCulture::setDescription | ( | const scm::Description & | description | ) |
Sets the description of the sky culture.
| description | The description to set. |
| QJsonObject scm::ScmSkyCulture::toJson | ( | const bool | mergeLines | ) | const |
Returns the sky culture as a JSON object.
| mergeLines | Whether to merge the lines of the constellations into polylines where possible. |