File indexing completed on 2024-03-24 03:47:03
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 0010 class HorizonComponent; 0011 class GuideLabelNode; 0012 0013 /** 0014 * @class HorizonItem 0015 * 0016 * Handles representation of HorizonComponent in SkyMapLite (lines, filled polygon and compass 0017 * labels). 0018 * 0019 * @author Artem Fedoskin 0020 * @version 1.0 0021 */ 0022 class HorizonItem : public SkyItem 0023 { 0024 public: 0025 /** 0026 * @short Constructor. 0027 * @param hComp pointer to HorizonComponent which HorizonItem represents in SkyMapLite 0028 * @param rootNode parent RootNode that instantiated this object 0029 */ 0030 HorizonItem(HorizonComponent *hComp, RootNode *rootNode); 0031 0032 /** 0033 * @short setter for m_horizonComp 0034 * @param hComp pointer to HorizonComponent 0035 */ 0036 inline void setHorizonComp(HorizonComponent *hComp) { m_horizonComp = hComp; } 0037 0038 /** 0039 * @short Call update() of HorizonNode and update/hide compass labels based on their visibility 0040 */ 0041 virtual void update(); 0042 0043 private: 0044 HorizonComponent *m_horizonComp { nullptr }; 0045 QMap<SkyPoint *, LabelNode *> m_compassLabels; 0046 };