Kstars

skypolygonnode.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 "skynode.h"
9
10class PolyNode;
11
12/**
13 *
14 * @class SkyPolygonNode
15 *
16 * @short A SkyNode derived class that represents polygon (either filled or non-filled)
17 * One of the applications of this class is drawing of Milky Way.
18 *
19 * @author Artem Fedoskin
20 * @version 1.0
21 */
22
23class SkyPolygonNode : public SkyNode
24{
25 public:
26 /**
27 * @short Constructor.
28 * @param list - Used of lines that comprise polygon
29 */
30 explicit SkyPolygonNode(LineList *list);
31
32 /**
33 * @short Update position and visibility of this polygon.
34 * @note This is not an overridden function because it requires a parameter
35 * @param forceClip - true if a polygon should be clipped
36 */
37 void update(bool forceClip = true);
38 virtual void hide() override;
39 LineList *lineList() { return m_list; }
40
41 void setColor(QColor color);
42
43 private:
44 LineList *m_list { nullptr };
45 PolyNode *m_polygonNode { nullptr };
46};
A simple data container used by LineListIndex.
Definition linelist.h:25
A SkyOpacityNode derived class used for drawing of polygons (both filled and non-filled)
Definition polynode.h:23
Provides virtual functions for update of coordinates and nodes hiding.
Definition skynode.h:28
virtual void update()
Updates coordinate of the object on SkyMapLite.
Definition skynode.h:48
A SkyNode derived class that represents polygon (either filled or non-filled) One of the applications...
SkyPolygonNode(LineList *list)
Constructor.
virtual void hide() override
hides all child nodes (sets opacity of m_opacity to 0)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.