Marble

GeoSceneDocument.cpp
1 /*
2  SPDX-FileCopyrightText: 2007 Murad Tagirov <[email protected]>
3  SPDX-FileCopyrightText: 2007 Nikolas Zimmermann <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 // Own
9 #include "GeoSceneDocument.h"
10 
11 // Marble
12 #include "GeoSceneHead.h"
13 #include "GeoSceneMap.h"
14 #include "GeoSceneLegend.h"
15 #include "GeoSceneSettings.h"
16 #include "GeoSceneTypes.h"
17 
18 namespace Marble
19 {
20 
21 class GeoSceneDocumentPrivate
22 {
23  public:
24  GeoSceneDocumentPrivate()
25  : m_head(new GeoSceneHead),
26  m_map(new GeoSceneMap),
27  m_settings(new GeoSceneSettings),
28  m_legend(new GeoSceneLegend)
29  {
30  }
31 
32  ~GeoSceneDocumentPrivate()
33  {
34  delete m_head;
35  delete m_map;
36  delete m_settings;
37  delete m_legend;
38  }
39 
40  GeoSceneHead* m_head;
41  GeoSceneMap* m_map;
42  GeoSceneSettings* m_settings;
43  GeoSceneLegend* m_legend;
44 };
45 
46 
47 GeoSceneDocument::GeoSceneDocument()
48  : GeoDocument(),
49  d( new GeoSceneDocumentPrivate )
50 {
51  // Establish connection of property changes to the outside, e.g. the LegendBrowser
52  connect ( d->m_settings, SIGNAL(valueChanged(QString,bool)),
53  SIGNAL(valueChanged(QString,bool)) );
54 }
55 
56 GeoSceneDocument::~GeoSceneDocument()
57 {
58  delete d;
59 }
60 
61 const char* GeoSceneDocument::nodeType() const
62 {
63  return GeoSceneTypes::GeoSceneDocumentType;
64 }
65 
66 const GeoSceneHead* GeoSceneDocument::head() const
67 {
68  return d->m_head;
69 }
70 
71 GeoSceneHead* GeoSceneDocument::head()
72 {
73  return d->m_head;
74 }
75 
76 const GeoSceneMap* GeoSceneDocument::map() const
77 {
78  return d->m_map;
79 }
80 
81 GeoSceneMap* GeoSceneDocument::map()
82 {
83  return d->m_map;
84 }
85 
86 const GeoSceneSettings* GeoSceneDocument::settings() const
87 {
88  return d->m_settings;
89 }
90 
91 GeoSceneSettings* GeoSceneDocument::settings()
92 {
93  return d->m_settings;
94 }
95 
96 const GeoSceneLegend* GeoSceneDocument::legend() const
97 {
98  return d->m_legend;
99 }
100 
101 GeoSceneLegend* GeoSceneDocument::legend()
102 {
103  return d->m_legend;
104 }
105 
106 }
107 
108 #include "moc_GeoSceneDocument.cpp"
General properties and identifiers of a GeoScene document.
Definition: GeoSceneHead.h:30
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Jul 1 2022 05:33:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.