Stellarium  25.3
Public Member Functions | Static Public Attributes
scm::ScmConstellation Class Reference

Public Member Functions

 ScmConstellation (const QString &id, const std::vector< CoordinateLine > &coordinates, const std::vector< StarLine > &stars, const bool isDarkConstellation)
 
QString getId () const
 Gets the id of the constellation. More...
 
void setEnglishName (const QString &name)
 Sets the english name of the constellation. More...
 
QString getEnglishName () const
 Gets the english name of the constellation. More...
 
void setNativeName (const std::optional< QString > &name)
 Sets the native name of the constellation. More...
 
std::optional< QString > getNativeName () const
 Gets the native name of the constellation. More...
 
void setPronounce (const std::optional< QString > &pronounce)
 Sets the pronounciation of the constellation. More...
 
std::optional< QString > getPronounce () const
 Gets the pronounciation of the constellation. More...
 
void setIPA (const std::optional< QString > &ipa)
 Sets the IPA. More...
 
std::optional< QString > getIPA () const
 Gets the IPA. More...
 
void setArtwork (const ScmConstellationArtwork &artwork)
 Sets the artwork. More...
 
const ScmConstellationArtworkgetArtwork () const
 Gets the artwork. More...
 
void setConstellation (const std::vector< CoordinateLine > &coordinates, const std::vector< StarLine > &stars)
 Sets the coordinate lines and star lines of the constellation. More...
 
const std::vector< CoordinateLine > & getCoordinates () const
 Gets the coordinates of the constellation. More...
 
const std::vector< StarLine > & getStars () const
 Gets the stars of the constellation. More...
 
void drawConstellation (StelCore *core, const Vec3f &lineColor, const Vec3f &labelColor) const
 Draws the constellation based on the coordinates. More...
 
void drawConstellation (StelCore *core) const
 Draws the constellation based on the coordinates using the default color. More...
 
void drawNames (StelCore *core, StelPainter &painter, const Vec3f &labelColor) const
 Draws the label of the constellation. More...
 
void drawNames (StelCore *core, StelPainter &painter) const
 Draws the label of the constellation using the default color. More...
 
QJsonObject toJson (const QString &skyCultureId) const
 Returns the constellation data as a JSON object. More...
 
bool saveArtwork (const QString &directory)
 Saves the artwork of this constellation, if art is attached, to the give filepath. More...
 
void hide ()
 Hides the constellation from being drawn.
 
void show ()
 Enables the constellation to be drawn.
 
bool getIsDarkConstellation () const
 Returns whether the constellation is a dark constellation. More...
 

Static Public Attributes

static const StelCore::FrameType drawFrame = StelCore::FrameJ2000
 The frame that is used for calculation and is drawn on.
 

Member Function Documentation

◆ drawConstellation() [1/2]

void scm::ScmConstellation::drawConstellation ( StelCore core) const

Draws the constellation based on the coordinates using the default color.

Parameters
coreThe core used for drawing.

◆ drawConstellation() [2/2]

void scm::ScmConstellation::drawConstellation ( StelCore core,
const Vec3f lineColor,
const Vec3f labelColor 
) const

Draws the constellation based on the coordinates.

Parameters
coreThe core used for drawing.
colorThe color to use for drawing the constellation.

◆ drawNames() [1/2]

void scm::ScmConstellation::drawNames ( StelCore core,
StelPainter painter 
) const

Draws the label of the constellation using the default color.

Parameters
coreThe core used for drawing.
painterThe painter used for drawing.

◆ drawNames() [2/2]

void scm::ScmConstellation::drawNames ( StelCore core,
StelPainter painter,
const Vec3f labelColor 
) const

Draws the label of the constellation.

Parameters
coreThe core used for drawing.
painterThe painter used for drawing.
labelColorThe color of the label.

◆ getArtwork()

const ScmConstellationArtwork& scm::ScmConstellation::getArtwork ( ) const

Gets the artwork.

Returns
The artwork.

◆ getCoordinates()

const std::vector<CoordinateLine>& scm::ScmConstellation::getCoordinates ( ) const

Gets the coordinates of the constellation.

Returns
The coordinates of the constellation.

◆ getEnglishName()

QString scm::ScmConstellation::getEnglishName ( ) const

Gets the english name of the constellation.

Returns
The english name

◆ getId()

QString scm::ScmConstellation::getId ( ) const

Gets the id of the constellation.

Returns
id

◆ getIPA()

std::optional<QString> scm::ScmConstellation::getIPA ( ) const

Gets the IPA.

Returns
The optional ipa

◆ getIsDarkConstellation()

bool scm::ScmConstellation::getIsDarkConstellation ( ) const
inline

Returns whether the constellation is a dark constellation.

Returns
true If the constellation is a dark constellation, false otherwise.

◆ getNativeName()

std::optional<QString> scm::ScmConstellation::getNativeName ( ) const

Gets the native name of the constellation.

Returns
The native name

◆ getPronounce()

std::optional<QString> scm::ScmConstellation::getPronounce ( ) const

Gets the pronounciation of the constellation.

Returns
The pronounciation

◆ getStars()

const std::vector<StarLine>& scm::ScmConstellation::getStars ( ) const

Gets the stars of the constellation.

Returns
The stars of the constellation.

◆ saveArtwork()

bool scm::ScmConstellation::saveArtwork ( const QString &  directory)

Saves the artwork of this constellation, if art is attached, to the give filepath.

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

◆ setArtwork()

void scm::ScmConstellation::setArtwork ( const ScmConstellationArtwork artwork)

Sets the artwork.

Parameters
artworkThe artwork.

◆ setConstellation()

void scm::ScmConstellation::setConstellation ( const std::vector< CoordinateLine > &  coordinates,
const std::vector< StarLine > &  stars 
)

Sets the coordinate lines and star lines of the constellation.

Parameters
coordinatesThe coordinates of the constellation.
starsThe equivalent stars to the coordinates.

◆ setEnglishName()

void scm::ScmConstellation::setEnglishName ( const QString &  name)

Sets the english name of the constellation.

Parameters
nameThe english name

◆ setIPA()

void scm::ScmConstellation::setIPA ( const std::optional< QString > &  ipa)

Sets the IPA.

Parameters
ipaThe optional ipa

◆ setNativeName()

void scm::ScmConstellation::setNativeName ( const std::optional< QString > &  name)

Sets the native name of the constellation.

Parameters
nameThe native name

◆ setPronounce()

void scm::ScmConstellation::setPronounce ( const std::optional< QString > &  pronounce)

Sets the pronounciation of the constellation.

Parameters
pronounceThe pronounciation

◆ toJson()

QJsonObject scm::ScmConstellation::toJson ( const QString &  skyCultureId) const

Returns the constellation data as a JSON object.

Parameters
skyCultureIdThe ID of the sky culture to which this constellation belongs.
Returns
QJsonObject