Marble

GeoSceneDocument.cpp
1/*
2 SPDX-FileCopyrightText: 2007 Murad Tagirov <tmurad@gmail.com>
3 SPDX-FileCopyrightText: 2007 Nikolas Zimmermann <zimmermann@kde.org>
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
18namespace Marble
19{
20
21class 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
47GeoSceneDocument::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
56GeoSceneDocument::~GeoSceneDocument()
57{
58 delete d;
59}
60
61const char* GeoSceneDocument::nodeType() const
62{
63 return GeoSceneTypes::GeoSceneDocumentType;
64}
65
66const GeoSceneHead* GeoSceneDocument::head() const
67{
68 return d->m_head;
69}
70
71GeoSceneHead* GeoSceneDocument::head()
72{
73 return d->m_head;
74}
75
76const GeoSceneMap* GeoSceneDocument::map() const
77{
78 return d->m_map;
79}
80
81GeoSceneMap* GeoSceneDocument::map()
82{
83 return d->m_map;
84}
85
86const GeoSceneSettings* GeoSceneDocument::settings() const
87{
88 return d->m_settings;
89}
90
91GeoSceneSettings* GeoSceneDocument::settings()
92{
93 return d->m_settings;
94}
95
96const GeoSceneLegend* GeoSceneDocument::legend() const
97{
98 return d->m_legend;
99}
100
101GeoSceneLegend* 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.
Binds a QML item to a specific geodetic location in screen coordinates.
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.