DeepSkyNode

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
 
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 (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 (Flag f, bool enabled)
 
void setFlags (Flags f, bool enabled)
 
NodeType type () const const
 

Additional Inherited Members

- Public Types inherited from QSGNode
typedef  DirtyState
 
enum  DirtyStateBit
 
enum  Flag
 
typedef  Flags
 
enum  NodeType
 
- Public Attributes inherited from SkyNode
SkyOpacityNodem_opacity { nullptr }
 
- Public Attributes inherited from QSGNode
 BasicNodeType
 
 ClipNodeType
 
 DirtyForceUpdate
 
 DirtyGeometry
 
 DirtyMaterial
 
 DirtyMatrix
 
 DirtyNodeAdded
 
 DirtyNodeRemoved
 
 DirtyOpacity
 
 DirtyPropagationMask
 
 DirtySubtreeBlocked
 
 DirtyUsePreprocess
 
 GeometryNodeType
 
 InternalReserved
 
 IsVisitableNode
 
 OpacityNodeType
 
 OwnedByParent
 
 OwnsGeometry
 
 OwnsMaterial
 
 OwnsOpaqueMaterial
 
 RenderNodeType
 
 RootNodeType
 
 TransformNodeType
 
 UsePreprocess
 
- 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.

Author
Artem Fedoskin
Version
1.0

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 )

Constructor.

Parameters
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 ( )
virtual

Destructor.

Call delete routines of label

Definition at line 28 of file deepskynode.cpp.

Member Function Documentation

◆ changePos()

void DeepSkyNode::changePos ( QPointF pos)
overridevirtual

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

Parameters
posnew position

Reimplemented from SkyNode.

Definition at line 34 of file deepskynode.cpp.

◆ dsObject()

DeepSkyObject * DeepSkyNode::dsObject ( )
inline

Definition at line 75 of file deepskynode.h.

◆ hide()

void DeepSkyNode::hide ( )
overridevirtual

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

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

Definition at line 46 of file deepskynode.cpp.

◆ symbol()

DSOSymbolNode * DeepSkyNode::symbol ( )
inline

Definition at line 76 of file deepskynode.h.

◆ update()

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

Update position and visibility of this node.

Parameters
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-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.