Kstars

milkyway.h
1 /*
2  SPDX-FileCopyrightText: 2005 Jason Harris <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "linelistindex.h"
10 
11 /**
12  * @class MlkyWay
13  *
14  * Draw filled areas as Milky Way and Magellanic clouds.
15  *
16  * This class should store SkipLists instead of LineLists. The two methods
17  * are used inside of LineListIndex to access the SkipLists' skip hashes.
18  * This way the same code in LineListIndex does double duty. Only subclassed
19  * by MilkyWay.
20  *
21  * @author James B. Bowlin
22  * @version 0.1
23  */
24 class MilkyWay : public LineListIndex
25 {
26  friend class MilkyWayItem;
27 
28  public:
29  /**
30  * @short Constructor
31  * @p parent pointer to the parent SkyComposite
32  */
33  explicit MilkyWay(SkyComposite *parent);
34 
35  /** Load skiplists from file */
36  void loadContours(QString fname, QString greeting);
37 
38  void draw(SkyPainter *skyp) override;
39  bool selected() override;
40 
41  protected:
42  /**
43  * @short Returns an IndexHash from the SkyMesh that contains the set
44  * of trixels that cover the _SkipList_ lineList excluding skipped
45  * lines as specified in the SkipList. SkipList is a subclass of
46  * LineList.
47  * FIXME: Implementation is broken!!
48  */
49  const IndexHash &getIndexHash(LineList *skipList) override;
50 
51  /**
52  * @short Returns a boolean indicating whether to skip the i-th line
53  * segment in the _SkipList_ skipList. Note that SkipList is a
54  * subclass of LineList. This routine allows us to use the drawing
55  * code in LineListIndex instead of repeating it all here.
56  * FIXME: Implementation is broken!!
57  */
58  SkipHashList *skipList(LineList *lineList) override;
59 };
const IndexHash & getIndexHash(LineList *skipList) override
Returns an IndexHash from the SkyMesh that contains the set of trixels that cover the SkipList lineLi...
Definition: milkyway.cpp:37
bool selected() override
Definition: milkyway.cpp:48
Class that handles drawing of MilkyWay (both filled and non-filled)
Definition: milkyway.h:24
SkipHashList * skipList(LineList *lineList) override
Returns a boolean indicating whether to skip the i-th line segment in the SkipList skipList.
Definition: milkyway.cpp:43
void draw(SkyPainter *skyp) override
The top level draw routine.
Definition: milkyway.cpp:57
SkyComposite * parent()
Definition: skycomponent.h:137
Draws things on the sky, without regard to backend.
Definition: skypainter.h:37
MilkyWay(SkyComposite *parent)
Constructor parent pointer to the parent SkyComposite.
Definition: milkyway.cpp:22
void loadContours(QString fname, QString greeting)
Load skiplists from file.
Definition: milkyway.cpp:76
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.