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 "GeoSceneTypes.h"
12#include "GeoSceneIcon.h"
13#include "GeoSceneZoom.h"
14#include "GeoSceneLicense.h"
15
16namespace Marble
17{
18
19class GeoSceneHeadPrivate
20{
21 public:
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* m_zoom;
43 GeoSceneIcon* m_icon;
44 GeoSceneLicense* 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
55
56GeoSceneHead::GeoSceneHead()
57 : d( new GeoSceneHeadPrivate )
58{
59}
60
61GeoSceneHead::~GeoSceneHead()
62{
63 delete d;
64}
65
66const char* GeoSceneHead::nodeType() const
67{
68 return GeoSceneTypes::GeoSceneHeadType;
69}
70
71QString GeoSceneHead::name() const
72{
73 return d->m_name;
74}
75
76void GeoSceneHead::setName( const QString& name )
77{
78 d->m_name = name;
79}
80
81QString GeoSceneHead::target() const
82{
83 return d->m_target;
84}
85
86void GeoSceneHead::setTarget( const QString& target )
87{
88 d->m_target = target;
89}
90
91QString GeoSceneHead::theme() const
92{
93 return d->m_theme;
94}
95
96QString GeoSceneHead::mapThemeId() const
97{
98 return d->m_target + QLatin1Char('/') + d->m_theme + QLatin1Char('/') + d->m_theme + QLatin1String(".dgml");
99}
100
101void GeoSceneHead::setTheme( const QString& theme )
102{
103 d->m_theme = theme;
104}
105
106QString GeoSceneHead::description() const
107{
108 return d->m_description;
109}
110
111void GeoSceneHead::setDescription( const QString& description )
112{
113 d->m_description = description;
114}
115
116qreal GeoSceneHead::radius() const
117{
118 return d->m_radius;
119}
120
121void GeoSceneHead::setRadius( qreal radius )
122{
123 d->m_radius = radius;
124}
125
126bool GeoSceneHead::visible() const
127{
128 return d->m_visible;
129}
130
131void GeoSceneHead::setVisible( bool visible )
132{
133 d->m_visible = visible;
134}
135
136const GeoSceneIcon* GeoSceneHead::icon() const
137{
138 return d->m_icon;
139}
140
141GeoSceneIcon* GeoSceneHead::icon()
142{
143 return d->m_icon;
144}
145
146const GeoSceneZoom* GeoSceneHead::zoom() const
147{
148 return d->m_zoom;
149}
150
151GeoSceneZoom* GeoSceneHead::zoom()
152{
153 return d->m_zoom;
154}
155
156const GeoSceneLicense* GeoSceneHead::license() const {
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 May 17 2024 11:49:23 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.