Marble

KmlDataTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Gaurav Gupta <1989.gaurav@googlemail.com>
4//
5
6
7#include "KmlDataTagWriter.h"
8
9#include "GeoDataTypes.h"
10#include "GeoWriter.h"
11#include "KmlElementDictionary.h"
12#include "GeoDataData.h"
13
14namespace Marble
15{
16
17static GeoTagWriterRegistrar s_writerData( GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataDataType,
18 kml::kmlTag_nameSpaceOgc22 ),
19 new KmlDataTagWriter() );
20
21
22bool KmlDataTagWriter::write( const GeoNode *node,
23 GeoWriter& writer ) const
24{
25 const GeoDataData *data = static_cast<const GeoDataData*>( node );
26
27 writer.writeStartElement( kml::kmlTag_Data );
28 writer.writeAttribute( "name", data->name() );
29 writer.writeOptionalElement( kml::kmlTag_displayName, data->displayName() );
30 writer.writeElement( "value", data->value().toString() );
31 writer.writeEndElement();
32
33 return true;
34}
35
36}
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.