Kstars

planetsitem.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5
6#pragma once
7
8#include "skyitem.h"
9
10class RootNode;
11class SkyObject;
13
14/**
15 * @class PlanetsItem
16 * This class handles planets and their moons in SkyMapLite
17 *
18 * @author Artem Fedoskin
19 * @version 1.0
20 */
21class PlanetsItem : public SkyItem
22{
23 public:
24 /**
25 * @short Constructor. Takes lists of pointers to planets(SolarSystemSingleComponent) and their
26 * moons (PlanetMoonsComponent) to instantiate PlanetMoonsNodes for each of the planet.
27 *
28 * @param planets list of pointers to planets
29 * @param moons list of pointers to moons
30 * @param rootNode parent RootNode that instantiates this object
31 */
33 /*QList<PlanetMoonsComponent *> moons,*/ RootNode *rootNode = nullptr);
34
35 /**
36 * @short returns SolarSystemSingleComponent that corresponds to the planet. Used to determine
37 * whether the planet has to be drawn according to its selected() function
38 * @param planet
39 * @return corresponding SolarSystemSingleComponent
40 */
42
43 /**
44 * @short calls update() of all child PlanetMoonsNodes
45 * @note see PlanetMoonsNodes::update()
46 */
47 void update() override;
48
49 /**
50 * @short shows this item and labels for all moons (currently only Jupiter moons. Add here labels
51 * for moons that are needed to be shown)
52 */
53 virtual void show() override;
54
55 /**
56 * @short hides this item and labels for all moons (currently only Jupiter moons. Add here labels
57 * for moons that are needed to be hidden)
58 */
59 virtual void hide() override;
60
61 private:
62 QList<SolarSystemSingleComponent *> m_planetComponents;
63 // QList<PlanetMoonsComponent *> m_moonsComponents;
64};
This class handles planets and their moons in SkyMapLite.
Definition planetsitem.h:22
void update() override
calls update() of all child PlanetMoonsNodes
virtual void hide() override
hides this item and labels for all moons (currently only Jupiter moons.
SolarSystemSingleComponent * getParentComponent(SkyObject *planet)
returns SolarSystemSingleComponent that corresponds to the planet.
PlanetsItem(QList< SolarSystemSingleComponent * > planets, RootNode *rootNode=nullptr)
Constructor.
virtual void show() override
shows this item and labels for all moons (currently only Jupiter moons.
A QSGClipNode derived class used as a container for holding pointers to nodes and for clipping.
Definition rootnode.h:60
This is an interface for implementing SkyItems that represent SkyComponent derived objects on the Sky...
Definition skyitem.h:30
RootNode * rootNode()
Definition skyitem.h:57
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
This class encapsulates some methods which are shared between all single-object solar system componen...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:47:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.