Kstars

skynode.cpp
1 /*
2  SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
3  SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #include "skynode.h"
7 
8 #include "../skyopacitynode.h"
9 
11  : m_opacity(new SkyOpacityNode), m_skyObject(skyObject)
12 {
13  appendChildNode(m_opacity);
14 }
15 
16 SkyNode::SkyNode() : m_opacity(new SkyOpacityNode)
17 {
18  appendChildNode(m_opacity);
19 }
20 
22 {
23  m_opacity->hide();
24  m_hideCount++;
25 }
26 
28 {
29  m_opacity->show();
30  m_hideCount = 0;
31 }
32 
33 void SkyNode::update(bool drawLabel)
34 {
35  m_drawLabel = drawLabel;
36  update();
37 }
38 
39 void SkyNode::addChildNode(QSGNode *node)
40 {
41  m_opacity->appendChildNode(node);
42 }
43 
45 {
46  return m_opacity->visible();
47 }
virtual void show()
makes this node visible
SkyNode(SkyObject *skyObject)
Constructor.
Definition: skynode.cpp:10
void appendChildNode(QSGNode *node)
virtual void update()
Updates coordinate of the object on SkyMapLite.
Definition: skynode.h:48
bool visible()
Definition: skynode.cpp:44
A wrapper for QSGOpacityNode that provides hide() and show() functions. If node is invisible (opacity...
virtual void show()
shows all child nodes (sets opacity of m_opacity to 1)
Definition: skynode.cpp:27
virtual void hide()
hides this node
Information about an object in the sky.
Definition: skyobject.h:41
virtual void hide()
hides all child nodes (sets opacity of m_opacity to 0)
Definition: skynode.cpp:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 04:04:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.