Marble

KmlSimpleDataTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Abhinav Gangwar <abhgang@gmail.com>
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
15namespace Marble
16{
17
18static GeoTagWriterRegistrar s_writerSimpleData(GeoTagWriter::QualifiedName(QString::fromLatin1(GeoDataTypes::GeoDataSimpleDataType),
19 QString::fromLatin1(kml::kmlTag_nameSpaceOgc22)),
20 new KmlSimpleDataTagWriter);
21
22bool KmlSimpleDataTagWriter::write(const GeoNode *node, GeoWriter &writer) const
23{
24 const auto simpleData = static_cast<const GeoDataSimpleData *>(node);
25 writer.writeStartElement(QString::fromUtf8(kml::kmlTag_SimpleData));
26 writer.writeAttribute(QStringLiteral("name"), simpleData->name());
27 writer.writeCharacters(simpleData->data());
28 writer.writeEndElement();
29
30 return true;
31}
32
33}
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.
QString fromLatin1(QByteArrayView str)
QString fromUtf8(QByteArrayView str)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.