Kstars

linesitem.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5
6#pragma once
7
8#include "../skyitem.h"
9#include "../skyopacitynode.h"
10
11class LineListIndex;
12
13class 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 */
37class 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};
Contains almost all the code needed for indexing and drawing and clipping lines and polygons.
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
virtual void update()
updates all trixels that are associated with LineListIndex or hide them if selected() of this LineLis...
Definition linesitem.cpp:72
LinesItem(RootNode *rootNode)
Constructor.
Definition linesitem.cpp:20
A QSGClipNode derived class used as a container for holding pointers to nodes and for clipping.
Definition rootnode.h:60
RootNode * rootNode()
Definition skyitem.h:57
SkyItem(LabelsItem::label_t labelType, RootNode *rootNode=nullptr)
Constructor, appends SkyItem to rootNode as a child in a node tree.
Definition skyitem.cpp:10
A wrapper for QSGOpacityNode that provides hide() and show() functions.
PenStyle
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:53:02 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.