Marble

KmlSimpleDataTagWriter.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2014 Abhinav Gangwar <[email protected]>
4 //
5 
6 #include "KmlSimpleDataTagWriter.h"
7 #include "KmlElementDictionary.h"
8 
9 #include "GeoDataSimpleData.h"
10 
11 #include "GeoDataTypes.h"
12 
13 #include "GeoWriter.h"
14 
15 namespace Marble
16 {
17 
18 static GeoTagWriterRegistrar s_writerSimpleData(
19  GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataSimpleDataType,
20  kml::kmlTag_nameSpaceOgc22 ),
21  new KmlSimpleDataTagWriter );
22 
23 bool KmlSimpleDataTagWriter::write( const GeoNode *node, GeoWriter &writer ) const
24 {
25  const GeoDataSimpleData *simpleData = static_cast<const GeoDataSimpleData*>( node );
26  writer.writeStartElement( kml::kmlTag_SimpleData );
27  writer.writeAttribute( "name", simpleData->name() );
28  writer.writeCharacters( simpleData->data() );
29  writer.writeEndElement();
30 
31  return true;
32 }
33 
34 }
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 Wed Oct 4 2023 04:09:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.