Stellarium  25.3
Public Member Functions | Static Public Member Functions | Data Fields
scm::StarLine Struct Reference

The pair of optional start and end stars. More...

#include <StarLine.hpp>

Public Member Functions

QJsonArray toJson () const
 Converts the StarLine 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

std::optional< QString > start
 The start star of the line.
 
std::optional< QString > end
 The end star of the line.
 

Detailed Description

The pair of optional start and end stars.

Member Function Documentation

◆ getFormattedStarId()

static QString scm::StarLine::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.

◆ toJson()

QJsonArray scm::StarLine::toJson ( ) const
inline

Converts the StarLine to a JSON array.

Returns
QJsonArray The JSON representation of the star line.