Kstars

crosshairnode.h
1 /*
2  SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
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 
15 class EllipseNode;
16 class LineNode;
17 class LabelNode;
19 
20 class 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 
49 
50  LabelsItem *labelsItem;
51 
52  INDI::BaseDevice *bd;
53 };
54 
55 #endif
A container for nodes that holds collection of textures for stars and provides clipping.
Definition: rootnode.h:59
A SkyNode derived class used for displaying labels.
Definition: labelnode.h:26
virtual void update()
Updates coordinate of the object on SkyMapLite.
Definition: skynode.h:48
Handles labels in SkyMapLite.
Definition: labelsitem.h:52
SkyOpacityNode derived class that draws lines from LineList.
Definition: linenode.h:27
QString label(StandardShortcut id)
QSGTransformNode derived node used to draw ellipses.
Definition: ellipsenode.h:22
Provides virtual functions for update of coordinates and nodes hiding.
Definition: skynode.h:27
virtual void hide()
hides all child nodes (sets opacity of m_opacity to 0)
Definition: skynode.cpp:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 04:04:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.