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 /** 0011 * @class FOVItem 0012 * This class handles representation of FOV symbols in SkyMapLite 0013 * 0014 * @author Artem Fedoskin 0015 * @version 1.0 0016 */ 0017 class FOVItem : public SkyItem 0018 { 0019 public: 0020 /** FOV symbol types */ 0021 enum Shape 0022 { 0023 SQUARE, 0024 CIRCLE, 0025 CROSSHAIRS, 0026 BULLSEYE, 0027 SOLIDCIRCLE, 0028 UNKNOWN 0029 }; 0030 0031 /** Constructor. Initialize default FOV symbols */ 0032 explicit FOVItem(RootNode *rootNode); 0033 0034 /** 0035 * @short Add information about new symbol to SkyMapLite and create FOVSymbolNode 0036 * SkyMapLite acts here as a bridge between FOVItem and QML. Here we call SkyMapLite::addFOVSymbol to add 0037 * information about new FOVSymbol to SkyMapLite and later in update() we check if user switched this 0038 * FOVSymbol on 0039 */ 0040 void addSymbol(const QString &name, float a, float b, float xoffset, float yoffset, float rot, FOVItem::Shape shape, 0041 const QString &color); 0042 0043 /** Update FOVSymbol if user switched it on */ 0044 virtual void update() override; 0045 };