SkyNode
#include <skynode.h>
Public Member Functions | |
SkyNode (SkyObject *skyObject) | |
void | addChildNode (QSGNode *node) |
virtual void | changePos (QPointF pos) |
virtual void | hide () |
int | hideCount () |
SkyMapLite * | map () const |
const Projector * | projector () |
virtual void | show () |
SkyObject * | skyObject () const |
virtual void | update () |
void | update (bool drawLabel) |
bool | visible () |
Public Member Functions inherited from QSGTransformNode | |
const QMatrix4x4 & | matrix () const const |
void | setMatrix (const QMatrix4x4 &matrix) |
Public Member Functions inherited from QSGNode | |
void | appendChildNode (QSGNode *node) |
QSGNode * | childAtIndex (int i) const const |
int | childCount () const const |
QSGNode * | firstChild () const const |
Flags | flags () const const |
void | insertChildNodeAfter (QSGNode *node, QSGNode *after) |
void | insertChildNodeBefore (QSGNode *node, QSGNode *before) |
virtual bool | isSubtreeBlocked () const const |
QSGNode * | lastChild () const const |
void | markDirty (DirtyState bits) |
QSGNode * | nextSibling () const const |
QSGNode * | parent () const const |
void | prependChildNode (QSGNode *node) |
virtual void | preprocess () |
QSGNode * | previousSibling () const const |
void | removeAllChildNodes () |
void | removeChildNode (QSGNode *node) |
void | setFlag (Flag f, bool enabled) |
void | setFlags (Flags f, bool enabled) |
NodeType | type () const const |
Protected Attributes | |
bool | m_drawLabel { false } |
int | m_hideCount { 0 } |
SkyObject * | m_skyObject { nullptr } |
Additional Inherited Members | |
Public Types inherited from QSGNode | |
typedef | DirtyState |
enum | DirtyStateBit |
enum | Flag |
typedef | Flags |
enum | NodeType |
Detailed Description
Provides virtual functions for update of coordinates and nodes hiding.
A QSGTransformNode derived class that has to be subclassed by node containers like PlanetNode and PointSourceNode. SkyObject * that is passed as parameter to constructor is used in subclasses to calculate new coordinates in update(). Subclasses have to implement hide() so that each of their child nodes can be hidden.
- Version
- 1.0
Constructor & Destructor Documentation
◆ SkyNode() [1/2]
|
explicit |
Constructor.
- Parameters
-
skyObject that is represented on the SkyMapLIte
Definition at line 10 of file skynode.cpp.
◆ SkyNode() [2/2]
SkyNode::SkyNode | ( | ) |
Definition at line 16 of file skynode.cpp.
◆ ~SkyNode()
Member Function Documentation
◆ addChildNode()
void SkyNode::addChildNode | ( | QSGNode * | node | ) |
Definition at line 39 of file skynode.cpp.
◆ changePos()
|
inlinevirtual |
changes the position of SkyNode on SkyMapLite.
Has to be overridden by the classes that support moving
- Parameters
-
pos new position
Reimplemented in DeepSkyNode, GuideLabelNode, LabelNode, PlanetNode, PointSourceNode, SatelliteNode, and SupernovaNode.
◆ hide()
|
virtual |
hides all child nodes (sets opacity of m_opacity to 0)
Reimplemented in ConstellationArtNode, DeepSkyNode, HorizonNode, PlanetMoonsNode, PlanetNode, PointSourceNode, SatelliteNode, and SkyPolygonNode.
Definition at line 21 of file skynode.cpp.
◆ hideCount()
◆ map()
|
inline |
short function to access SkyMapLite
- Returns
- pointer to instance of SkyMapLite class
◆ projector()
◆ show()
|
virtual |
shows all child nodes (sets opacity of m_opacity to 1)
Definition at line 27 of file skynode.cpp.
◆ skyObject()
|
inline |
◆ update() [1/2]
|
inlinevirtual |
Updates coordinate of the object on SkyMapLite.
Reimplemented in ConstellationArtNode, GuideLabelNode, HorizonNode, LabelNode, PlanetMoonsNode, PlanetNode, PointSourceNode, SatelliteNode, and SupernovaNode.
◆ update() [2/2]
void SkyNode::update | ( | bool | drawLabel | ) |
sets m_drawLabel to true if it is needed to be drawn and calls update()
- Parameters
-
drawLabel true of label has to be drawn
Definition at line 33 of file skynode.cpp.
◆ visible()
bool SkyNode::visible | ( | ) |
- Returns
- true if object is visible (m_opacity->opacity() != 0) else returns false
Definition at line 44 of file skynode.cpp.
Member Data Documentation
◆ m_drawLabel
◆ m_hideCount
◆ m_opacity
SkyOpacityNode* SkyNode::m_opacity { nullptr } |
◆ m_skyObject
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.