Kstars

linesitem.h
1 /*
2  SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
3  SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #pragma once
7 
8 #include "../skyitem.h"
9 #include "../skyopacitynode.h"
10 
11 class LineListIndex;
12 
13 class LineIndexNode : public SkyOpacityNode
14 {
15  public:
16  explicit LineIndexNode(const QString &schemeColor = "");
17 
18  QString getSchemeColor() { return schemeColor; }
19 
20  private:
21  QString schemeColor;
22 };
23 
24 /**
25  * @class LinesItem
26  *
27  * Class that handles lines (Constellation lines and boundaries and both coordinate grids) in
28  * SkyMapLite.
29  *
30  * To display lines component use addLinesComponent.
31  *
32  * @note see RootNode::RootNode() for example of adding lines
33  * @short Class that handles most of the lines in SkyMapLite
34  * @author Artem Fedoskin
35  * @version 1.0
36  */
37 class LinesItem : public SkyItem
38 {
39  public:
40  /**
41  * @short Constructor
42  * @param rootNode parent RootNode that instantiated this object
43  */
44  explicit LinesItem(RootNode *rootNode);
45 
46  /**
47  * @short adds LinesListIndex that is needed to be displayed to m_lineIndexes
48  * @param linesComp LineListIndex derived object
49  * @param color desired color of lines specified as name of entry in ColorScheme
50  * @param width thickness of lines
51  * @param style desired style (currently supports only Qt::SolidLine)
52  */
53  void addLinesComponent(LineListIndex *linesComp, QString color, int width, Qt::PenStyle style);
54 
55  /**
56  * @short updates all trixels that are associated with LineListIndex or hide them if selected()
57  * of this LineListIndex returns false
58  */
59 
60  virtual void update();
61 
62  private:
64 };
A base class that is used for displaying SkyComponents on SkyMapLite.
Definition: skyitem.h:29
A container for nodes that holds collection of textures for stars and provides clipping.
Definition: rootnode.h:59
LinesItem(RootNode *rootNode)
Constructor.
Definition: linesitem.cpp:20
A wrapper for QSGOpacityNode that provides hide() and show() functions. If node is invisible (opacity...
virtual void update()
updates all trixels that are associated with LineListIndex or hide them if selected() of this LineLis...
Definition: linesitem.cpp:72
RootNode * rootNode()
Definition: skyitem.h:57
void addLinesComponent(LineListIndex *linesComp, QString color, int width, Qt::PenStyle style)
adds LinesListIndex that is needed to be displayed to m_lineIndexes
Definition: linesitem.cpp:24
Class that handles most of the lines in SkyMapLite.
Definition: linesitem.h:37
PenStyle
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:03:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.