Marble

DgmlDocumentTagWriter.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2011 Utku Aydın <[email protected]>
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 
16 namespace Marble
17 {
18 
19 static GeoTagWriterRegistrar s_writerDocument( GeoTagWriter::QualifiedName( "GeoSceneDocument", dgml::dgmlTag_nameSpace20 ),
20  new DgmlDocumentTagWriter() );
21 
22 bool 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.
Definition: GeoTagWriter.h:44
Binds a QML item to a specific geodetic location in screen coordinates.
QFuture< void > map(Sequence &sequence, MapFunctor function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.