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 "GeoSceneLegend.h"
14#include "GeoSceneMap.h"
15#include "GeoSceneSettings.h"
16#include "GeoSceneTypes.h"
17
18namespace Marble
19{
20
21class GeoSceneDocumentPrivate
22{
23public:
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 *const m_head;
41 GeoSceneMap *const m_map;
42 GeoSceneSettings *const m_settings;
43 GeoSceneLegend *const m_legend;
44};
45
46GeoSceneDocument::GeoSceneDocument()
47 : GeoDocument()
48 , d(new GeoSceneDocumentPrivate)
49{
50 // Establish connection of property changes to the outside, e.g. the LegendBrowser
51 connect(d->m_settings, SIGNAL(valueChanged(QString, bool)), SIGNAL(valueChanged(QString, bool)));
52}
53
54GeoSceneDocument::~GeoSceneDocument()
55{
56 delete d;
57}
58
59const char *GeoSceneDocument::nodeType() const
60{
61 return GeoSceneTypes::GeoSceneDocumentType;
62}
63
64const GeoSceneHead *GeoSceneDocument::head() const
65{
66 return d->m_head;
67}
68
69GeoSceneHead *GeoSceneDocument::head()
70{
71 return d->m_head;
72}
73
74const GeoSceneMap *GeoSceneDocument::map() const
75{
76 return d->m_map;
77}
78
79GeoSceneMap *GeoSceneDocument::map()
80{
81 return d->m_map;
82}
83
84const GeoSceneSettings *GeoSceneDocument::settings() const
85{
86 return d->m_settings;
87}
88
89GeoSceneSettings *GeoSceneDocument::settings()
90{
91 return d->m_settings;
92}
93
94const GeoSceneLegend *GeoSceneDocument::legend() const
95{
96 return d->m_legend;
97}
98
99GeoSceneLegend *GeoSceneDocument::legend()
100{
101 return d->m_legend;
102}
103
104}
105
106#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 Nov 8 2024 12:02:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.