Marble

DgmlDocumentTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2011 Utku Aydın <utkuaydin34@gmail.com>
4//
5
6#include "DgmlDocumentTagWriter.h"
7
8#include "DgmlElementDictionary.h"
9#include "GeoSceneDocument.h"
10#include "GeoSceneHead.h"
11#include "GeoSceneLegend.h"
12#include "GeoSceneMap.h"
13#include "GeoSceneSettings.h"
14#include "GeoWriter.h"
15
16namespace Marble
17{
18
19static GeoTagWriterRegistrar s_writerDocument(GeoTagWriter::QualifiedName(QStringLiteral("GeoSceneDocument"), QString::fromLatin1(dgml::dgmlTag_nameSpace20)),
20 new DgmlDocumentTagWriter());
21
22bool DgmlDocumentTagWriter::write(const GeoNode *node, GeoWriter &writer) const
23{
24 const auto document = static_cast<const GeoSceneDocument *>(node);
25
26 writer.writeStartElement(QString::fromUtf8(dgml::dgmlTag_Document));
27
28 const GeoSceneHead *head = document->head();
29 writeElement(head, writer);
30
31 const GeoSceneMap *map = document->map();
32 writeElement(map, writer);
33
34 const GeoSceneSettings *settings = document->settings();
35 writeElement(settings, writer);
36
37 const GeoSceneLegend *legend = document->legend();
38 writeElement(legend, writer);
39
40 writer.writeEndDocument();
41 return true;
42}
43
44}
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
Binds a QML item to a specific geodetic location in screen coordinates.
QString fromLatin1(QByteArrayView str)
QString fromUtf8(QByteArrayView str)
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.