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 "GeoWriter.h"
9#include "GeoSceneDocument.h"
10#include "GeoSceneHead.h"
11#include "GeoSceneMap.h"
12#include "GeoSceneSettings.h"
13#include "GeoSceneLegend.h"
14#include "DgmlElementDictionary.h"
15
16namespace Marble
17{
18
19static GeoTagWriterRegistrar s_writerDocument( GeoTagWriter::QualifiedName( "GeoSceneDocument", dgml::dgmlTag_nameSpace20 ),
20 new DgmlDocumentTagWriter() );
21
22bool DgmlDocumentTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
23{
24 const GeoSceneDocument *document = static_cast<const GeoSceneDocument*>( node );
25
26 writer.writeStartElement( 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.
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 Fri Jun 14 2024 11:54:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.