Kstars

guidelabelnode.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5
6#pragma once
7
8#include "skynode.h"
9#include "../labelsitem.h"
10
11#include <QSGSimpleRectNode>
12
13class PlanetItemNode;
14class PointNode;
16class RootNode;
17class SkyLabeler;
18class SkyMapLite;
19
20/**
21 * @class GuideLabelNode
22 * Currently this class is not used anywhere.
23 *
24 * @author Artem Fedoskin
25 * @version 1.0
26 */
27class GuideLabelNode : public SkyNode
28{
29 public:
30 /**
31 * @short Constructor
32 * @param name name of the guide label
33 * @param type type of the label item
34 */
36
37 /**
38 * @short changePos changes the position m_point
39 * @param pos new position
40 */
41 virtual void changePos(QPointF pos) override;
42
43 /**
44 * @short setLabelPos sets the position of label with the given offset from SkyObject's position and
45 * makes the label visible if it was hidden
46 * @param pos position of label
47 * @param angle label angle
48 */
49 void setLabelPos(QPointF pos, float angle);
50
51 virtual void update() override;
52
53 inline const QString name() const { return m_name; }
54
55 QPointF labelPos;
56 qreal left { 0 };
57 qreal right { 0 };
58 qreal top { 0 };
59 qreal bot { 0 };
60
61 private:
62 QSGSimpleTextureNode *m_textTexture { nullptr };
63 QSize m_textSize { 0, 0 };
64 float m_angle { 0 };
65 QSGSimpleRectNode debugRect;
66 const QString m_name;
67 QPointF m_translatePos;
68};
Currently this class is not used anywhere.
virtual void changePos(QPointF pos) override
changePos changes the position m_point
void setLabelPos(QPointF pos, float angle)
setLabelPos sets the position of label with the given offset from SkyObject's position and makes the ...
GuideLabelNode(QString name, LabelsItem::label_t type)
Constructor.
virtual void update() override
Updates coordinate of the object on SkyMapLite.
label_t
The label_t enum.
Definition labelsitem.h:62
SkyOpacityNode derived class that represents stars and planets using cached QSGTexture.
Definition pointnode.h:25
A QSGClipNode derived class used as a container for holding pointers to nodes and for clipping.
Definition rootnode.h:60
The purpose of this class is to prevent labels from overlapping.
Definition skylabeler.h:99
This is the main item that displays all SkyItems.
Definition skymaplite.h:59
Provides virtual functions for update of coordinates and nodes hiding.
Definition skynode.h:28
NodeType type() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.