File indexing completed on 2024-04-28 15:10:46
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 "../skyitem.h" 0009 #include "../skyopacitynode.h" 0010 0011 class LineListIndex; 0012 0013 class LineIndexNode : public SkyOpacityNode 0014 { 0015 public: 0016 explicit LineIndexNode(const QString &schemeColor = ""); 0017 0018 QString getSchemeColor() { return schemeColor; } 0019 0020 private: 0021 QString schemeColor; 0022 }; 0023 0024 /** 0025 * @class LinesItem 0026 * 0027 * Class that handles lines (Constellation lines and boundaries and both coordinate grids) in 0028 * SkyMapLite. 0029 * 0030 * To display lines component use addLinesComponent. 0031 * 0032 * @note see RootNode::RootNode() for example of adding lines 0033 * @short Class that handles most of the lines in SkyMapLite 0034 * @author Artem Fedoskin 0035 * @version 1.0 0036 */ 0037 class LinesItem : public SkyItem 0038 { 0039 public: 0040 /** 0041 * @short Constructor 0042 * @param rootNode parent RootNode that instantiated this object 0043 */ 0044 explicit LinesItem(RootNode *rootNode); 0045 0046 /** 0047 * @short adds LinesListIndex that is needed to be displayed to m_lineIndexes 0048 * @param linesComp LineListIndex derived object 0049 * @param color desired color of lines specified as name of entry in ColorScheme 0050 * @param width thickness of lines 0051 * @param style desired style (currently supports only Qt::SolidLine) 0052 */ 0053 void addLinesComponent(LineListIndex *linesComp, QString color, int width, Qt::PenStyle style); 0054 0055 /** 0056 * @short updates all trixels that are associated with LineListIndex or hide them if selected() 0057 * of this LineListIndex returns false 0058 */ 0059 0060 virtual void update(); 0061 0062 private: 0063 QMap<LineIndexNode *, LineListIndex *> m_lineIndexes; 0064 };