Kstars

crosshairnode.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5#ifndef CROSSHAIRNODE_H_
6#define CROSSHAIRNODE_H_
7#include "skynode.h"
8
9/** @class CrossHairNode
10 *
11 * @short Represents crosshair of telescope in SkyMapLite
12 * @version 1.0
13 */
14
15class EllipseNode;
16class LineNode;
17class LabelNode;
19
20class CrosshairNode : public SkyNode
21{
22 public:
23 /**
24 * @short Constructor. Initializes lines, ellipses and labels.
25 * @param baseDevice - pointer to telescope
26 * @param rootNode parent RootNode that instantiated this object
27 */
28 CrosshairNode(INDI::BaseDevice *baseDevice, RootNode *rootNode);
29
30 /** Destructor. **/
31 ~CrosshairNode();
32
33 /** @short Update position and visibility of crosshair based on the Alt, Az (or Ra and Dec)
34 of telescope **/
35 virtual void update() override;
36 virtual void hide() override;
37
38 /** @short Set color of crosshair **/
39 void setColor(QColor color);
40
41 private:
42 EllipseNode *el1;
43 EllipseNode *el2;
44
45 QSGGeometryNode *lines;
46 QSGFlatColorMaterial *material;
47
48 LabelNode *label;
49
50 LabelsItem *labelsItem;
51
52 INDI::BaseDevice *bd;
53};
54
55#endif
QSGTransformNode derived node used to draw ellipses.
Definition ellipsenode.h:23
A SkyNode derived class used for displaying labels.
Definition labelnode.h:27
This class is in charge of labels in SkyMapLite.
Definition labelsitem.h:53
SkyOpacityNode derived class that draws lines from LineList.
Definition linenode.h:28
A QSGClipNode derived class used as a container for holding pointers to nodes and for clipping.
Definition rootnode.h:60
Provides virtual functions for update of coordinates and nodes hiding.
Definition skynode.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:59:52 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.