Kstars

trixelnode.cpp
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
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
12TrixelNode::TrixelNode(const Trixel &trixel) : m_trixel(trixel)
13{
14}
15
17{
18 QLinkedList<QPair<SkyObject *, SkyNode *>>::iterator i = m_nodes.begin();
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}
Provides virtual functions for update of coordinates and nodes hiding.
Definition skynode.h:28
virtual void show()
makes this node visible
virtual void hide()
hides this node
TrixelNode(const Trixel &trixel)
Constructor.
virtual void deleteAllChildNodes()
Delete all childNodes and remove nodes from pairs in m_nodes.
virtual void show() override
makes this node visible
virtual void hide() override
hides this node
QLinkedList< QPair< SkyObject *, SkyNode * > > m_nodes
m_nodes - holds SkyNodes with corresponding SkyObjects
Definition trixelnode.h:41
void removeChildNode(QSGNode *node)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.