File indexing completed on 2025-01-05 03:59:10
0001 /* 0002 SPDX-FileCopyrightText: 2008 Torsten Rahn <rahn@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 // Own 0008 #include "GeoSceneHead.h" 0009 0010 // Marble 0011 #include "GeoSceneTypes.h" 0012 #include "GeoSceneIcon.h" 0013 #include "GeoSceneZoom.h" 0014 #include "GeoSceneLicense.h" 0015 0016 namespace Marble 0017 { 0018 0019 class GeoSceneHeadPrivate 0020 { 0021 public: 0022 GeoSceneHeadPrivate() 0023 : m_zoom(new GeoSceneZoom), 0024 m_icon(new GeoSceneIcon), 0025 m_license(new GeoSceneLicense), 0026 m_name(), 0027 m_target(), 0028 m_theme(), 0029 m_description(), 0030 m_radius( 0.0 ), 0031 m_visible( true ) 0032 { 0033 } 0034 0035 ~GeoSceneHeadPrivate() 0036 { 0037 delete m_icon; 0038 delete m_zoom; 0039 delete m_license; 0040 } 0041 0042 GeoSceneZoom* m_zoom; 0043 GeoSceneIcon* m_icon; 0044 GeoSceneLicense* m_license; 0045 0046 QString m_name; 0047 QString m_target; 0048 QString m_theme; 0049 QString m_description; 0050 qreal m_radius; 0051 0052 bool m_visible; 0053 }; 0054 0055 0056 GeoSceneHead::GeoSceneHead() 0057 : d( new GeoSceneHeadPrivate ) 0058 { 0059 } 0060 0061 GeoSceneHead::~GeoSceneHead() 0062 { 0063 delete d; 0064 } 0065 0066 const char* GeoSceneHead::nodeType() const 0067 { 0068 return GeoSceneTypes::GeoSceneHeadType; 0069 } 0070 0071 QString GeoSceneHead::name() const 0072 { 0073 return d->m_name; 0074 } 0075 0076 void GeoSceneHead::setName( const QString& name ) 0077 { 0078 d->m_name = name; 0079 } 0080 0081 QString GeoSceneHead::target() const 0082 { 0083 return d->m_target; 0084 } 0085 0086 void GeoSceneHead::setTarget( const QString& target ) 0087 { 0088 d->m_target = target; 0089 } 0090 0091 QString GeoSceneHead::theme() const 0092 { 0093 return d->m_theme; 0094 } 0095 0096 QString GeoSceneHead::mapThemeId() const 0097 { 0098 return d->m_target + QLatin1Char('/') + d->m_theme + QLatin1Char('/') + d->m_theme + QLatin1String(".dgml"); 0099 } 0100 0101 void GeoSceneHead::setTheme( const QString& theme ) 0102 { 0103 d->m_theme = theme; 0104 } 0105 0106 QString GeoSceneHead::description() const 0107 { 0108 return d->m_description; 0109 } 0110 0111 void GeoSceneHead::setDescription( const QString& description ) 0112 { 0113 d->m_description = description; 0114 } 0115 0116 qreal GeoSceneHead::radius() const 0117 { 0118 return d->m_radius; 0119 } 0120 0121 void GeoSceneHead::setRadius( qreal radius ) 0122 { 0123 d->m_radius = radius; 0124 } 0125 0126 bool GeoSceneHead::visible() const 0127 { 0128 return d->m_visible; 0129 } 0130 0131 void GeoSceneHead::setVisible( bool visible ) 0132 { 0133 d->m_visible = visible; 0134 } 0135 0136 const GeoSceneIcon* GeoSceneHead::icon() const 0137 { 0138 return d->m_icon; 0139 } 0140 0141 GeoSceneIcon* GeoSceneHead::icon() 0142 { 0143 return d->m_icon; 0144 } 0145 0146 const GeoSceneZoom* GeoSceneHead::zoom() const 0147 { 0148 return d->m_zoom; 0149 } 0150 0151 GeoSceneZoom* GeoSceneHead::zoom() 0152 { 0153 return d->m_zoom; 0154 } 0155 0156 const GeoSceneLicense* GeoSceneHead::license() const { 0157 return d->m_license; 0158 } 0159 0160 GeoSceneLicense* GeoSceneHead::license() 0161 { 0162 return d->m_license; 0163 } 0164 0165 }