File indexing completed on 2024-04-28 15:10:49
0001 /* 0002 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #pragma once 0007 0008 #include "skynode.h" 0009 0010 class PolyNode; 0011 0012 /** 0013 * 0014 * @class SkyPolygonNode 0015 * 0016 * @short A SkyNode derived class that represents polygon (either filled or non-filled) 0017 * One of the applications of this class is drawing of Milky Way. 0018 * 0019 * @author Artem Fedoskin 0020 * @version 1.0 0021 */ 0022 0023 class SkyPolygonNode : public SkyNode 0024 { 0025 public: 0026 /** 0027 * @short Constructor. 0028 * @param list - Used of lines that comprise polygon 0029 */ 0030 explicit SkyPolygonNode(LineList *list); 0031 0032 /** 0033 * @short Update position and visibility of this polygon. 0034 * @note This is not an overridden function because it requires a parameter 0035 * @param forceClip - true if a polygon should be clipped 0036 */ 0037 void update(bool forceClip = true); 0038 virtual void hide() override; 0039 LineList *lineList() { return m_list; } 0040 0041 void setColor(QColor color); 0042 0043 private: 0044 LineList *m_list { nullptr }; 0045 PolyNode *m_polygonNode { nullptr }; 0046 };