Marble

KmlRegionTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Mayank Madan <maddiemadan@gmail.com>
4//
5
6#include "KmlRegionTagWriter.h"
7
8#include "GeoDataLatLonAltBox.h"
9#include "GeoDataLod.h"
10#include "GeoDataRegion.h"
11#include "GeoDataTypes.h"
12#include "GeoWriter.h"
13#include "KmlElementDictionary.h"
14#include "KmlObjectTagWriter.h"
15
16namespace Marble
17{
18
19static GeoTagWriterRegistrar s_writerRegion(GeoTagWriter::QualifiedName(QString::fromLatin1(GeoDataTypes::GeoDataRegionType),
20 QString::fromLatin1(kml::kmlTag_nameSpaceOgc22)),
21 new KmlRegionTagWriter);
22
23bool KmlRegionTagWriter::write(const GeoNode *node, GeoWriter &writer) const
24{
25 const auto region = static_cast<const GeoDataRegion *>(node);
26 writer.writeStartElement(QString::fromUtf8(kml::kmlTag_Region));
27 KmlObjectTagWriter::writeIdentifiers(writer, region);
28 writeElement(&region->latLonAltBox(), writer);
29 writeElement(&region->lod(), writer);
30 writer.writeEndElement();
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.
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 Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.