Marble

GeoSceneHead.cpp
1 /*
2  SPDX-FileCopyrightText: 2008 Torsten Rahn <[email protected]>
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 
16 namespace Marble
17 {
18 
19 class 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 
56 GeoSceneHead::GeoSceneHead()
57  : d( new GeoSceneHeadPrivate )
58 {
59 }
60 
61 GeoSceneHead::~GeoSceneHead()
62 {
63  delete d;
64 }
65 
66 const char* GeoSceneHead::nodeType() const
67 {
68  return GeoSceneTypes::GeoSceneHeadType;
69 }
70 
71 QString GeoSceneHead::name() const
72 {
73  return d->m_name;
74 }
75 
76 void GeoSceneHead::setName( const QString& name )
77 {
78  d->m_name = name;
79 }
80 
81 QString GeoSceneHead::target() const
82 {
83  return d->m_target;
84 }
85 
86 void GeoSceneHead::setTarget( const QString& target )
87 {
88  d->m_target = target;
89 }
90 
91 QString GeoSceneHead::theme() const
92 {
93  return d->m_theme;
94 }
95 
96 QString GeoSceneHead::mapThemeId() const
97 {
98  return d->m_target + QLatin1Char('/') + d->m_theme + QLatin1Char('/') + d->m_theme + QLatin1String(".dgml");
99 }
100 
101 void GeoSceneHead::setTheme( const QString& theme )
102 {
103  d->m_theme = theme;
104 }
105 
106 QString GeoSceneHead::description() const
107 {
108  return d->m_description;
109 }
110 
111 void GeoSceneHead::setDescription( const QString& description )
112 {
113  d->m_description = description;
114 }
115 
116 qreal GeoSceneHead::radius() const
117 {
118  return d->m_radius;
119 }
120 
121 void GeoSceneHead::setRadius( qreal radius )
122 {
123  d->m_radius = radius;
124 }
125 
126 bool GeoSceneHead::visible() const
127 {
128  return d->m_visible;
129 }
130 
131 void GeoSceneHead::setVisible( bool visible )
132 {
133  d->m_visible = visible;
134 }
135 
136 const GeoSceneIcon* GeoSceneHead::icon() const
137 {
138  return d->m_icon;
139 }
140 
141 GeoSceneIcon* GeoSceneHead::icon()
142 {
143  return d->m_icon;
144 }
145 
146 const GeoSceneZoom* GeoSceneHead::zoom() const
147 {
148  return d->m_zoom;
149 }
150 
151 GeoSceneZoom* GeoSceneHead::zoom()
152 {
153  return d->m_zoom;
154 }
155 
156 const GeoSceneLicense* GeoSceneHead::license() const {
157  return d->m_license;
158 }
159 
160 GeoSceneLicense* GeoSceneHead::license()
161 {
162  return d->m_license;
163 }
164 
165 }
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
Binds a QML item to a specific geodetic location in screen coordinates.
qreal radius() const
Planet radius, 0.0 if unknown.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:02:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.