File indexing completed on 2025-01-05 03:59:10
0001 /* 0002 SPDX-FileCopyrightText: 2007 Murad Tagirov <tmurad@gmail.com> 0003 SPDX-FileCopyrightText: 2007 Nikolas Zimmermann <zimmermann@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 // Own 0009 #include "GeoSceneDocument.h" 0010 0011 // Marble 0012 #include "GeoSceneHead.h" 0013 #include "GeoSceneMap.h" 0014 #include "GeoSceneLegend.h" 0015 #include "GeoSceneSettings.h" 0016 #include "GeoSceneTypes.h" 0017 0018 namespace Marble 0019 { 0020 0021 class GeoSceneDocumentPrivate 0022 { 0023 public: 0024 GeoSceneDocumentPrivate() 0025 : m_head(new GeoSceneHead), 0026 m_map(new GeoSceneMap), 0027 m_settings(new GeoSceneSettings), 0028 m_legend(new GeoSceneLegend) 0029 { 0030 } 0031 0032 ~GeoSceneDocumentPrivate() 0033 { 0034 delete m_head; 0035 delete m_map; 0036 delete m_settings; 0037 delete m_legend; 0038 } 0039 0040 GeoSceneHead* m_head; 0041 GeoSceneMap* m_map; 0042 GeoSceneSettings* m_settings; 0043 GeoSceneLegend* m_legend; 0044 }; 0045 0046 0047 GeoSceneDocument::GeoSceneDocument() 0048 : GeoDocument(), 0049 d( new GeoSceneDocumentPrivate ) 0050 { 0051 // Establish connection of property changes to the outside, e.g. the LegendBrowser 0052 connect ( d->m_settings, SIGNAL(valueChanged(QString,bool)), 0053 SIGNAL(valueChanged(QString,bool)) ); 0054 } 0055 0056 GeoSceneDocument::~GeoSceneDocument() 0057 { 0058 delete d; 0059 } 0060 0061 const char* GeoSceneDocument::nodeType() const 0062 { 0063 return GeoSceneTypes::GeoSceneDocumentType; 0064 } 0065 0066 const GeoSceneHead* GeoSceneDocument::head() const 0067 { 0068 return d->m_head; 0069 } 0070 0071 GeoSceneHead* GeoSceneDocument::head() 0072 { 0073 return d->m_head; 0074 } 0075 0076 const GeoSceneMap* GeoSceneDocument::map() const 0077 { 0078 return d->m_map; 0079 } 0080 0081 GeoSceneMap* GeoSceneDocument::map() 0082 { 0083 return d->m_map; 0084 } 0085 0086 const GeoSceneSettings* GeoSceneDocument::settings() const 0087 { 0088 return d->m_settings; 0089 } 0090 0091 GeoSceneSettings* GeoSceneDocument::settings() 0092 { 0093 return d->m_settings; 0094 } 0095 0096 const GeoSceneLegend* GeoSceneDocument::legend() const 0097 { 0098 return d->m_legend; 0099 } 0100 0101 GeoSceneLegend* GeoSceneDocument::legend() 0102 { 0103 return d->m_legend; 0104 } 0105 0106 } 0107 0108 #include "moc_GeoSceneDocument.cpp"