Marble

GeoSceneHead.cpp
1/*
2 SPDX-FileCopyrightText: 2008 Torsten Rahn <rahn@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7// Own
8#include "GeoSceneHead.h"
9
10// Marble
11#include "GeoSceneIcon.h"
12#include "GeoSceneLicense.h"
13#include "GeoSceneTypes.h"
14#include "GeoSceneZoom.h"
15
16namespace Marble
17{
18
19class GeoSceneHeadPrivate
20{
21public:
22 GeoSceneHeadPrivate()
23 : m_zoom(new GeoSceneZoom)
24 , m_icon(new GeoSceneIcon)
25 , m_license(new GeoSceneLicense)
26 , m_name()
27 , m_target()
28 , m_theme()
29 , m_description()
30 , m_radius(0.0)
31 , m_visible(true)
32 {
33 }
34
35 ~GeoSceneHeadPrivate()
36 {
37 delete m_icon;
38 delete m_zoom;
39 delete m_license;
40 }
41
42 GeoSceneZoom *const m_zoom;
43 GeoSceneIcon *const m_icon;
44 GeoSceneLicense *const m_license;
45
46 QString m_name;
47 QString m_target;
48 QString m_theme;
49 QString m_description;
50 qreal m_radius;
51
52 bool m_visible;
53};
54
55GeoSceneHead::GeoSceneHead()
56 : d(new GeoSceneHeadPrivate)
57{
58}
59
60GeoSceneHead::~GeoSceneHead()
61{
62 delete d;
63}
64
65const char *GeoSceneHead::nodeType() const
66{
67 return GeoSceneTypes::GeoSceneHeadType;
68}
69
70QString GeoSceneHead::name() const
71{
72 return d->m_name;
73}
74
75void GeoSceneHead::setName(const QString &name)
76{
77 d->m_name = name;
78}
79
80QString GeoSceneHead::target() const
81{
82 return d->m_target;
83}
84
85void GeoSceneHead::setTarget(const QString &target)
86{
87 d->m_target = target;
88}
89
90QString GeoSceneHead::theme() const
91{
92 return d->m_theme;
93}
94
95QString GeoSceneHead::mapThemeId() const
96{
97 return d->m_target + QLatin1Char('/') + d->m_theme + QLatin1Char('/') + d->m_theme + QLatin1StringView(".dgml");
98}
99
100void GeoSceneHead::setTheme(const QString &theme)
101{
102 d->m_theme = theme;
103}
104
105QString GeoSceneHead::description() const
106{
107 return d->m_description;
108}
109
110void GeoSceneHead::setDescription(const QString &description)
111{
112 d->m_description = description;
113}
114
115qreal GeoSceneHead::radius() const
116{
117 return d->m_radius;
118}
119
120void GeoSceneHead::setRadius(qreal radius)
121{
122 d->m_radius = radius;
123}
124
125bool GeoSceneHead::visible() const
126{
127 return d->m_visible;
128}
129
130void GeoSceneHead::setVisible(bool visible)
131{
132 d->m_visible = visible;
133}
134
135const GeoSceneIcon *GeoSceneHead::icon() const
136{
137 return d->m_icon;
138}
139
140GeoSceneIcon *GeoSceneHead::icon()
141{
142 return d->m_icon;
143}
144
145const GeoSceneZoom *GeoSceneHead::zoom() const
146{
147 return d->m_zoom;
148}
149
150GeoSceneZoom *GeoSceneHead::zoom()
151{
152 return d->m_zoom;
153}
154
155const GeoSceneLicense *GeoSceneHead::license() const
156{
157 return d->m_license;
158}
159
160GeoSceneLicense *GeoSceneHead::license()
161{
162 return d->m_license;
163}
164
165}
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.