Kstars

satellitescomponent.h
1/*
2 SPDX-FileCopyrightText: 2009 Jerome SONRIER <jsid@emor3j.fr.eu.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "satellitegroup.h"
10#include "skycomponent.h"
11
12#include <QList>
13
14class QPointF;
15class Satellite;
16
17/**
18 * @class SatellitesComponent
19 * Represents artificial satellites on the sky map.
20 * @author Jérôme SONRIER
21 * @version 1.0
22 */
24{
25 public:
26 /**
27 * @short Constructor
28 * @param parent pointer to the parent SkyComposite
29 */
30 explicit SatellitesComponent(SkyComposite *parent = nullptr);
31
32 /**
33 * @short Destructor
34 */
35 ~SatellitesComponent() override;
36
37 /**
38 * @return true if satellites must be draw.
39 */
40 bool selected() override;
41
42 /**
43 * Draw all satellites.
44 * @param skyp SkyPainter to use
45 */
46 void draw(SkyPainter *skyp) override;
47
48 /**
49 * Update satellites position.
50 * @param num
51 */
52 void update(KSNumbers *num) override;
53
54 /**
55 * Download new TLE files
56 */
57 void updateTLEs();
58
59 /**
60 * @return The list of all groups
61 */
63
64 /**
65 * Search a satellite by name.
66 * @param name The name of the satellite
67 * @return Satellite that was find or 0
68 */
70
71 /**
72 * Draw label of a satellite.
73 * @param sat The satellite
74 * @param pos The position of the satellite
75 */
76 void drawLabel(Satellite *sat, const QPointF &pos);
77
78 /**
79 * Search the nearest satellite from point p
80 * @param p
81 * @param maxrad
82 */
83 SkyObject *objectNearest(SkyPoint *p, double &maxrad) override;
84
85 /**
86 * Return object given name
87 * @param name object name
88 * @p exact If true, it will return an exact match, otherwise it can return
89 * a partial match.
90 * @return object if found, otherwise nullptr
91 */
92 SkyObject *findByName(const QString &name, bool exact = true) override;
93
94 void loadData();
95
96 protected:
97 void drawTrails(SkyPainter *skyp) override;
98
99 private:
100 QList<SatelliteGroup *> m_groups; // List of all groups
102};
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition ksnumbers.h:43
Represents an artificial satellites.
Definition satellite.h:23
Represents artificial satellites on the sky map.
SkyObject * objectNearest(SkyPoint *p, double &maxrad) override
Search the nearest satellite from point p.
Satellite * findSatellite(QString name)
Search a satellite by name.
void drawTrails(SkyPainter *skyp) override
Draw trails for objects.
QList< SatelliteGroup * > groups()
void updateTLEs()
Download new TLE files.
void drawLabel(Satellite *sat, const QPointF &pos)
Draw label of a satellite.
SatellitesComponent(SkyComposite *parent=nullptr)
Constructor.
~SatellitesComponent() override
Destructor.
void draw(SkyPainter *skyp) override
Draw all satellites.
SkyObject * findByName(const QString &name, bool exact=true) override
Return object given name.
void update(KSNumbers *num) override
Update satellites position.
SkyComponent represents an object on the sky map.
SkyComposite * parent()
SkyComposite is a kind of container class for SkyComponent objects.
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
Draws things on the sky, without regard to backend.
Definition skypainter.h:40
The sky coordinates of a point in the sky.
Definition skypoint.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.