Stellarium  25.4
Public Member Functions | Static Public Member Functions | Data Fields
scm::ConstellationLine Struct Reference

Public Member Functions

QJsonArray starsToJson () const
 Converts the stars of the line to a JSON array. More...
 
QJsonArray coordinatesToJson () const
 Converts the coordinates of the line to a JSON array. More...
 

Static Public Member Functions

static QString getFormattedStarId (QString starId)
 Gets the formatted star Id from the name. More...
 

Data Fields

SkyPoint start
 The start point of the line.
 
SkyPoint end
 The end point of the line.
 

Member Function Documentation

◆ coordinatesToJson()

QJsonArray scm::ConstellationLine::coordinatesToJson ( ) const
inline

Converts the coordinates of the line to a JSON array.

Returns
QJsonArray The JSON representation of the coordinates of the line.

◆ getFormattedStarId()

static QString scm::ConstellationLine::getFormattedStarId ( QString  starId)
inlinestatic

Gets the formatted star Id from the name.

Parameters
starIdThe Id of the star or DSO, which may contain identifiers like "HIP" or "Gaia DR3".
Returns
QString The formatted star Id, either as plain number for HIP or Gaia, or as "DSO:<name>" for others.

◆ starsToJson()

QJsonArray scm::ConstellationLine::starsToJson ( ) const
inline

Converts the stars of the line to a JSON array.

Returns
QJsonArray The JSON representation of the stars of the line.