Kstars

constellationartcomponent.h
1 /*
2  SPDX-FileCopyrightText: 2015 M.S.Adityan <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "skycomponent.h"
10 
11 class ConstellationsArt;
12 class CultureList;
13 
14 /**
15  * @class ConstellationArtComponent
16  * Represents the ConstellationsArt objects.
17  * For each skyculture there is a separate table in skycultures.sqlite.
18  * @author M.S.Adityan
19  * @version 0.1
20  */
22 {
23  public:
24  /** Constructor */
25  explicit ConstellationArtComponent(SkyComposite *, CultureList *cultures);
26 
27  /** Destructor */
28  ~ConstellationArtComponent() override;
29 
30  /**
31  * @short Read the skycultures.sqlite database file.
32  * Parse all the data from the skycultures database.Construct a ConstellationsArt object
33  * from the data, and add it to a QList.
34  * @return true if data file is successfully read.
35  */
36  void loadData();
37 
38  /**
39  * @short deletes all created ConstellationsArt objects.
40  * Used in KStars Lite to reduce memory consumption if Constellation Art is switched off
41  */
42  void deleteData();
43 
44  /** @short Shows the details of the constellations selected skyculture */
45  void showList();
46 
47  void draw(SkyPainter *skyp) override;
48 
49  QList<ConstellationsArt *> m_ConstList;
50 
51  private:
52  QString cultureName;
53  int records { 0 };
54 };
void loadData()
Read the skycultures.sqlite database file.
void deleteData()
deletes all created ConstellationsArt objects.
void showList()
Shows the details of the constellations selected skyculture.
Draws things on the sky, without regard to backend.
Definition: skypainter.h:37
void draw(SkyPainter *skyp) override
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
ConstellationArtComponent(SkyComposite *, CultureList *cultures)
Constructor.
~ConstellationArtComponent() override
Destructor.
Information about a ConstellationsArt object. This class represents a constellation image.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Aug 14 2022 04:13:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.