Kstars

skypolygonnode.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 "skynode.h"
9 
10 class 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 
23 class 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 };
virtual void hide() override
hides all child nodes (sets opacity of m_opacity to 0)
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...
A SkyOpacityNode derived class used for drawing of polygons (both filled and non-filled)
Definition: polynode.h:22
SkyPolygonNode(LineList *list)
Constructor.
Provides virtual functions for update of coordinates and nodes hiding.
Definition: skynode.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.