Search for usage in LXR

DeepSkyNode Class Reference

#include <deepskynode.h>

Inheritance diagram for DeepSkyNode:

Public Member Functions

 DeepSkyNode (DeepSkyObject *skyObject, DSOSymbolNode *symbol, LabelsItem::label_t labelType, short trixel=-1)
virtual ~DeepSkyNode ()
virtual void changePos (QPointF pos) override
DeepSkyObject * dsObject ()
virtual void hide () override
void setColor (QColor color, TrixelNode *symbolTrixel)
DSOSymbolNodesymbol ()
void update (bool drawImage, bool drawLabel, QPointF pos=QPointF(-1, -1))
- Public Member Functions inherited from SkyNode
 SkyNode (SkyObject *skyObject)
void addChildNode (QSGNode *node)
int hideCount ()
SkyMapLitemap () const
const Projectorprojector ()
virtual void show ()
SkyObjectskyObject () const
virtual void update ()
void update (bool drawLabel)
bool visible ()
- Public Member Functions inherited from QSGTransformNode
const QMatrix4x4matrix () const const
void setMatrix (const QMatrix4x4 &matrix)
- Public Member Functions inherited from QSGNode
void appendChildNode (QSGNode *node)
QSGNodechildAtIndex (int i) const const
int childCount () const const
QSGNodefirstChild () const const
QSGNode::Flags flags () const const
void insertChildNodeAfter (QSGNode *node, QSGNode *after)
void insertChildNodeBefore (QSGNode *node, QSGNode *before)
virtual bool isSubtreeBlocked () const const
QSGNodelastChild () const const
void markDirty (QSGNode::DirtyState bits)
QSGNodenextSibling () const const
QSGNodeparent () const const
void prependChildNode (QSGNode *node)
virtual void preprocess ()
QSGNodepreviousSibling () const const
void removeAllChildNodes ()
void removeChildNode (QSGNode *node)
void setFlag (QSGNode::Flag f, bool enabled)
void setFlags (QSGNode::Flags f, bool enabled)
QSGNode::NodeType type () const const

Additional Inherited Members

- Public Types inherited from QSGNode
enum  DirtyStateBit
enum  Flag
enum  NodeType
- Public Attributes inherited from SkyNode
SkyOpacityNodem_opacity { nullptr }
- Public Attributes inherited from QSGNode
typedef DirtyState
typedef Flags
- Protected Attributes inherited from SkyNode
bool m_drawLabel { false }
int m_hideCount { 0 }
SkyObjectm_skyObject { nullptr }

Detailed Description

A SkyNode derived class used for displaying DeepSkyObjects.

Keep in mind that DSO symbol is handled by DSOSymbolNode that has different parent from this node but DeepSkyNode calls update routines of DSOSymbolNode.

Artem Fedoskin

Definition at line 32 of file deepskynode.h.

Constructor & Destructor Documentation

◆ DeepSkyNode()

DeepSkyNode::DeepSkyNode ( DeepSkyObject *  skyObject,
DSOSymbolNode symbol,
LabelsItem::label_t  labelType,
short  trixel = -1 


skyObject- DSOs that is represented by this node
symbol- DSOSymbolNode of this DSO
labelType- type of label
trixel- trixelID, with which this node is indexed

Definition at line 22 of file deepskynode.cpp.

◆ ~DeepSkyNode()

DeepSkyNode::~DeepSkyNode ( )


Call delete routines of label

Definition at line 28 of file deepskynode.cpp.

Member Function Documentation

◆ changePos()

void DeepSkyNode::changePos ( QPointF  pos)

changePos changes the position of this node and rotate it according to m_angle

posnew position

Reimplemented from SkyNode.

Definition at line 34 of file deepskynode.cpp.

◆ hide()

void DeepSkyNode::hide ( )

hides all child nodes (sets opacity of m_opacity to 0)

Reimplemented from SkyNode.

Definition at line 142 of file deepskynode.cpp.

◆ setColor()

void DeepSkyNode::setColor ( QColor  color,
TrixelNode symbolTrixel 

sets color of DSO symbol and label To not increase the code for symbols we just recreate the symbol painted with desired color

colorthe color to be set
symbolTrixelthe TrixelNode to which symbol node should be appended

Definition at line 46 of file deepskynode.cpp.

◆ update()

void DeepSkyNode::update ( bool  drawImage,
bool  drawLabel,
QPointF  pos = QPointF(-1, -1) 

Update position and visibility of this node.

drawImage- true if image (if exists) should be drawn
drawLabel- true if label should be drawn
pos- new position of the object. If default parameter is passed, the visibility and position of node is calculated. There is one case when we pass this parameter - in DeepSkyItem::updateDeepSkyNode() when we check whether DeepSkyObject is visible or no and instantiate it accordingly. There is no need to calculate the position again and we pass it as a parameter.

Definition at line 58 of file deepskynode.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.