Kstars

solarsystemcomposite.h
1/*
2 SPDX-FileCopyrightText: 2005 Thomas Kabelmann <thomas.kabelmann@gmx.de>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "planetmoonscomponent.h"
10#include "skycomposite.h"
11
13class CometsComponent;
14class KSMoon;
15class KSPlanet;
16class KSSun;
17//class JupiterMoonsComponent;
18class SkyLabeler;
19class KSEarthShadow;
20/**
21 * @class SolarSystemComposite
22 * The solar system composite manages all planets, asteroids and comets.
23 * As every sub component of solar system needs the earth , the composite
24 * is managing this object by itself.
25 *
26 * @author Thomas Kabelmann
27 * @version 0.1
28 */
29
31{
32 public:
34 ~SolarSystemComposite() override;
35
36 // Use this instead of `findByName`
37 KSPlanet *earth() { return m_Earth; }
38 KSSun *sun() { return m_Sun; }
39 KSMoon *moon() { return m_Moon; }
40 KSEarthShadow *earthShadow() { return m_EarthShadow; }
41
42 const QList<SkyObject *> &asteroids() const;
43 const QList<SkyObject *> &comets() const;
44 const QList<SkyObject *> &planetObjects() const;
45 const QList<SkyObject *> &moons() const;
46
47 bool selected() override;
48
49 void update(KSNumbers *num) override;
50
51 void updateSolarSystemBodies(KSNumbers *num) override;
52
53 void updateMoons(KSNumbers *num) override;
54
55 void drawTrails(SkyPainter *skyp) override;
56
57 CometsComponent *cometsComponent();
58
59 AsteroidsComponent *asteroidsComponent();
60
61 QList<PlanetMoonsComponent *> planetMoonsComponent() const;
62
63 const QList<SolarSystemSingleComponent *> &planets() const;
64
65 private:
66 KSPlanet *m_Earth { nullptr };
67 KSSun *m_Sun { nullptr };
68 KSMoon *m_Moon { nullptr };
69 KSEarthShadow *m_EarthShadow { nullptr };
70
71 // PlanetMoonsComponent *m_JupiterMoons;
72 AsteroidsComponent *m_AsteroidsComponent;
73 CometsComponent *m_CometsComponent;
75 QList<SkyObject *> m_planetObjects;
76 QList<SkyObject *> m_moons;
77};
Represents the asteroids on the sky map.
This class encapsulates the Comets.
A class that manages the calculation of the earths shadow (in moon distance) as a 'virtual' skyobject...
Provides necessary information about the Moon.
Definition ksmoon.h:26
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition ksnumbers.h:43
A subclass of KSPlanetBase for seven of the major planets in the solar system (Earth and Pluto have t...
Definition ksplanet.h:33
Child class of KSPlanetBase; encapsulates information about the Sun.
Definition kssun.h:24
SkyComposite * parent()
SkyComposite is a kind of container class for SkyComponent objects.
The purpose of this class is to prevent labels from overlapping.
Definition skylabeler.h:99
Draws things on the sky, without regard to backend.
Definition skypainter.h:40
The solar system composite manages all planets, asteroids and comets.
void update(KSNumbers *num) override
Delegate update-position requests to all sub components.
void drawTrails(SkyPainter *skyp) override
Draw trails for objects.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.