Kstars

constellationlines.h
1/*
2 SPDX-FileCopyrightText: 2005 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ksnumbers.h"
10#include "linelistindex.h"
11
12class CultureList;
13
14/**
15 * @class ConstellationLines
16 * Collection of lines making the 88 constellations
17 *
18 * @author Jason Harris
19 * @version 0.1
20 */
21
23{
24 public:
25 /**
26 * @short Constructor
27 * @p parent Pointer to the parent SkyComposite object
28 *
29 * Constellation lines data is read from clines.dat.
30 * Each line in the file contains a command character ("M" means move to
31 * this position without drawing a line, "D" means draw a line from
32 * the previous position to this one), followed by the genetive name of
33 * a star, which marks the position of the constellation node.
34 */
36
37 void reindex(KSNumbers *num);
38
39 bool selected() override;
40
41 protected:
42 const IndexHash &getIndexHash(LineList *lineList) override;
43
44 /**
45 * @short we need to override the update routine because stars are
46 * updated differently from mere SkyPoints.
47 */
48 void JITupdate(LineList *lineList) override;
49
50 /** @short Set the QColor and QPen for drawing. */
51 void preDraw(SkyPainter *skyp) override;
52
53 private:
54 KSNumbers m_reindexNum;
55 double m_reindexInterval { 0 };
56};
Collection of lines making the 88 constellations.
const IndexHash & getIndexHash(LineList *lineList) override
Returns an IndexHash from the SkyMesh that contains the set of trixels that cover lineList.
void preDraw(SkyPainter *skyp) override
Set the QColor and QPen for drawing.
ConstellationLines(SkyComposite *parent, CultureList *cultures)
Constructor parent Pointer to the parent SkyComposite object.
void JITupdate(LineList *lineList) override
we need to override the update routine because stars are updated differently from mere SkyPoints.
A list of all cultures FIXME: Why not use a QStringList?
Definition culturelist.h:17
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition ksnumbers.h:43
Contains almost all the code needed for indexing and drawing and clipping lines and polygons.
A simple data container used by LineListIndex.
Definition linelist.h:25
SkyComposite * parent()
SkyComposite is a kind of container class for SkyComponent objects.
Draws things on the sky, without regard to backend.
Definition skypainter.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:15:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.