Marble

GeoSceneDocument.cpp
1 /*
2  Copyright (C) 2007 Murad Tagirov <[email protected]>
3  Copyright (C) 2007 Nikolas Zimmermann <[email protected]>
4 
5  This file is part of the KDE project
6 
7  This library is free software you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  aint with this library see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 // Own
24 #include "GeoSceneDocument.h"
25 
26 // Marble
27 #include "GeoSceneHead.h"
28 #include "GeoSceneMap.h"
29 #include "GeoSceneLegend.h"
30 #include "GeoSceneSettings.h"
31 #include "GeoSceneTypes.h"
32 
33 namespace Marble
34 {
35 
36 class GeoSceneDocumentPrivate
37 {
38  public:
39  GeoSceneDocumentPrivate()
40  : m_head(new GeoSceneHead),
41  m_map(new GeoSceneMap),
42  m_settings(new GeoSceneSettings),
43  m_legend(new GeoSceneLegend)
44  {
45  }
46 
47  ~GeoSceneDocumentPrivate()
48  {
49  delete m_head;
50  delete m_map;
51  delete m_settings;
52  delete m_legend;
53  }
54 
55  GeoSceneHead* m_head;
56  GeoSceneMap* m_map;
57  GeoSceneSettings* m_settings;
58  GeoSceneLegend* m_legend;
59 };
60 
61 
62 GeoSceneDocument::GeoSceneDocument()
63  : GeoDocument(),
64  d( new GeoSceneDocumentPrivate )
65 {
66  // Establish connection of property changes to the outside, e.g. the LegendBrowser
67  connect ( d->m_settings, SIGNAL(valueChanged(QString,bool)),
68  SIGNAL(valueChanged(QString,bool)) );
69 }
70 
71 GeoSceneDocument::~GeoSceneDocument()
72 {
73  delete d;
74 }
75 
76 const char* GeoSceneDocument::nodeType() const
77 {
78  return GeoSceneTypes::GeoSceneDocumentType;
79 }
80 
81 const GeoSceneHead* GeoSceneDocument::head() const
82 {
83  return d->m_head;
84 }
85 
86 GeoSceneHead* GeoSceneDocument::head()
87 {
88  return d->m_head;
89 }
90 
91 const GeoSceneMap* GeoSceneDocument::map() const
92 {
93  return d->m_map;
94 }
95 
96 GeoSceneMap* GeoSceneDocument::map()
97 {
98  return d->m_map;
99 }
100 
101 const GeoSceneSettings* GeoSceneDocument::settings() const
102 {
103  return d->m_settings;
104 }
105 
106 GeoSceneSettings* GeoSceneDocument::settings()
107 {
108  return d->m_settings;
109 }
110 
111 const GeoSceneLegend* GeoSceneDocument::legend() const
112 {
113  return d->m_legend;
114 }
115 
116 GeoSceneLegend* GeoSceneDocument::legend()
117 {
118  return d->m_legend;
119 }
120 
121 }
122 
123 #include "moc_GeoSceneDocument.cpp"
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
Settings of a GeoScene document.
General properties and identifiers of a GeoScene document.
Definition: GeoSceneHead.h:45
Binds a QML item to a specific geodetic location in screen coordinates.
Map layer structure of a GeoScene document.
Definition: GeoSceneMap.h:45
Legend of a GeoScene document.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 23:19:31 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.