Kstars

trixelnode.cpp
1 /*
2  SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
3  SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #include "trixelnode.h"
7 
8 #include "skynode.h"
9 
10 #include <QSGSimpleTextureNode>
11 
12 TrixelNode::TrixelNode(const Trixel &trixel) : m_trixel(trixel)
13 {
14 }
15 
17 {
19 
20  while (i != m_nodes.cend())
21  {
22  SkyNode *node = (*i).second;
23  if (node)
24  {
25  removeChildNode(node);
26  delete node;
27 
28  *i = QPair<SkyObject *, SkyNode *>((*i).first, 0);
29  }
30  ++i;
31  }
32 }
33 
35 {
36  m_hideCount++;
38 }
39 
41 {
43  m_hideCount = 0;
44 }
virtual void deleteAllChildNodes()
Delete all childNodes and remove nodes from pairs in m_nodes.
Definition: trixelnode.cpp:16
virtual void show()
makes this node visible
virtual void show() override
makes this node visible
Definition: trixelnode.cpp:40
TrixelNode(const Trixel &trixel)
Constructor.
Definition: trixelnode.cpp:12
QLinkedList< QPair< SkyObject *, SkyNode * > > m_nodes
m_nodes - holds SkyNodes with corresponding SkyObjects
Definition: trixelnode.h:41
QLinkedList::iterator begin()
QLinkedList::const_iterator cend() const const
virtual void hide() override
hides this node
Definition: trixelnode.cpp:34
Provides virtual functions for update of coordinates and nodes hiding.
Definition: skynode.h:27
virtual void hide()
hides this node
void removeChildNode(QSGNode *node)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.