Kstars

asteroidsitem.h
1 /*
2  SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
3  SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #pragma once
7 
8 #include "skyitem.h"
9 
10 class RootNode;
11 class SkyObject;
12 
13 /**
14  * @class AsteroidsItem
15  * This class handles asteroids in SkyMapLite
16  *
17  * @author Artem Fedoskin
18  * @version 1.0
19  */
20 class AsteroidsItem : public SkyItem
21 {
22  public:
23  /**
24  * @short Constructor
25  * @param asteroidsList const reference to list of asteroids
26  * @param rootNode parent RootNode that instantiates PlanetsItem
27  */
28  explicit AsteroidsItem(const QList<SkyObject *> &asteroidsList, RootNode *rootNode = nullptr);
29 
30  /**
31  * @short recreates the node tree (deletes old nodes and appends new ones based on SkyObjects in
32  * m_asteroidsList)
33  */
34  void recreateList();
35 
36  /** Determines the visibility of the object and its label and hides/updates them accordingly */
37  virtual void update() override;
38 
39  private:
40  const QList<SkyObject *> &m_asteroidsList;
41 };
A base class that is used for displaying SkyComponents on SkyMapLite.
Definition: skyitem.h:29
A container for nodes that holds collection of textures for stars and provides clipping.
Definition: rootnode.h:59
AsteroidsItem(const QList< SkyObject * > &asteroidsList, RootNode *rootNode=nullptr)
Constructor.
virtual void update() override
Determines the visibility of the object and its label and hides/updates them accordingly.
RootNode * rootNode()
Definition: skyitem.h:57
void recreateList()
recreates the node tree (deletes old nodes and appends new ones based on SkyObjects in m_asteroidsLis...
Information about an object in the sky.
Definition: skyobject.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:03:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.