Marble

DgmlGeodataTagWriter.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2011 Utku Aydın <[email protected]>
4 //
5 
6 #include "DgmlGeodataTagWriter.h"
7 
8 #include "GeoWriter.h"
9 #include "GeoSceneGeodata.h"
10 #include "GeoSceneTypes.h"
11 #include "DgmlElementDictionary.h"
12 
13 namespace Marble
14 {
15 
16 static GeoTagWriterRegistrar s_writerGeodata( GeoTagWriter::QualifiedName( GeoSceneTypes::GeoSceneGeodataType, dgml::dgmlTag_nameSpace20 ), new DgmlGeodataTagWriter() );
17 
18 bool DgmlGeodataTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
19 {
20  const GeoSceneGeodata *geodata = static_cast<const GeoSceneGeodata*>( node );
21  writer.writeStartElement( dgml::dgmlTag_Geodata );
22  writer.writeAttribute( "name", geodata->name() );
23 
24  writer.writeStartElement( dgml::dgmlTag_SourceFile );
25  writer.writeCharacters( geodata->sourceFile() );
26  writer.writeEndElement();
27 
28  writer.writeEndElement();
29  return true;
30 }
31 
32 }
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.