Stellarium  HEAD
Public Member Functions | Protected Member Functions
ScmConstellationImage Class Reference

Public Member Functions

void setImage (const QPixmap &image)
 Set the image that is shown by this item. More...
 
bool hasAnchorSelection () const
 Gets the indicator if any anchor is selected. More...
 
ScmConstellationImageAnchorgetSelectedAnchor () const
 Get the selected anchor. More...
 
void setAnchorSelectionChangedCallback (std::function< void()> func)
 Set the anchor selection changed callback function.
 
void setAnchorPositionChangedCallback (std::function< void()> func)
 Set the anchor position changed callback function.
 
void resetAnchors ()
 Resets the anchors to default.
 
void resetArtwork ()
 Resets the artwork.
 
const std::vector< ScmConstellationImageAnchor > & getAnchors () const
 Gets the anchors of this object. More...
 
bool isImageAnchored ()
 Indicates if all anchors have a star they are bound too. More...
 
void updateAnchors ()
 Updates the anchors of this object with the drawn artwork.
 
const scm::ScmConstellationArtworkgetArtwork () const
 Gets the artwork;.
 
void setArtwork (const scm::ScmConstellationArtwork &artwork)
 Set the artwork in the constellation image. More...
 

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 

Member Function Documentation

◆ getAnchors()

const std::vector<ScmConstellationImageAnchor>& ScmConstellationImage::getAnchors ( ) const

Gets the anchors of this object.

Returns
const std::vector<ScmConstellationImageAnchor>& The anchors of this object.

◆ getSelectedAnchor()

ScmConstellationImageAnchor* ScmConstellationImage::getSelectedAnchor ( ) const

Get the selected anchor.

Returns
ScmConstellationImageAnchor* The selected anchor pointer or nullptr.

◆ hasAnchorSelection()

bool ScmConstellationImage::hasAnchorSelection ( ) const

Gets the indicator if any anchor is selected.

Returns
true Anchor is selected.
false no Anchor is selected.

◆ isImageAnchored()

bool ScmConstellationImage::isImageAnchored ( )

Indicates if all anchors have a star they are bound too.

Returns
true All anchors have a bound star.
false Not all anchors have a bound star.

◆ setArtwork()

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

Set the artwork in the constellation image.

Parameters
artworkThe artwork to use.

◆ setImage()

void ScmConstellationImage::setImage ( const QPixmap &  image)

Set the image that is shown by this item.

Parameters
imageThe image that is shown.