Kstars

asteroidscomponent.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 "binarylistcomponent.h"
10#include "ksparser.h"
11#include "typedef.h"
12#include "skyobjects/ksasteroid.h"
13#include "solarsystemlistcomponent.h"
14#include "filedownloader.h"
15
16#include <QList>
17#include <QPointer>
18
19/**
20 * @class AsteroidsComponent
21 * Represents the asteroids on the sky map.
22 *
23 * @author Thomas Kabelmann
24 * @version 0.1
25 */
27 virtual public BinaryListComponent<KSAsteroid, AsteroidsComponent>
28{
30
32 public:
33 /**
34 * @short Default constructor.
35 *
36 * @p parent pointer to the parent SolarSystemComposite
37 */
39 virtual ~AsteroidsComponent() override = default;
40
41 void draw(SkyPainter *skyp) override;
42 bool selected() override;
43 SkyObject *objectNearest(SkyPoint *p, double &maxrad) override;
44
45 void updateDataFile(bool isAutoUpdate = false);
46
47 protected slots:
48 void downloadReady();
49 void downloadError(const QString &errorString);
50
51 private:
52 void loadDataFromText() override;
53
54 QPointer<FileDownloader> downloadJob;
55};
Represents the asteroids on the sky map.
AsteroidsComponent(SolarSystemComposite *parent)
Default constructor.
void draw(SkyPainter *skyp) override
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
SkyObject * objectNearest(SkyPoint *p, double &maxrad) override
Find the SkyObject nearest the given SkyPoint.
provides functionality for loading the component data from Binary
A subclass of KSPlanetBase that implements asteroids.
Definition ksasteroid.h:42
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
The solar system composite manages all planets, asteroids and comets.
Q_OBJECTQ_OBJECT
QObject * parent() const const
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.