Marble

KmlStyleTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#include "KmlStyleTagWriter.h"
7
8#include "GeoDataBalloonStyle.h"
9#include "GeoDataIconStyle.h"
10#include "GeoDataLabelStyle.h"
11#include "GeoDataLineStyle.h"
12#include "GeoDataListStyle.h"
13#include "GeoDataPolyStyle.h"
14#include "GeoDataStyle.h"
15#include "GeoDataTypes.h"
16#include "GeoWriter.h"
17#include "KmlElementDictionary.h"
18#include "KmlObjectTagWriter.h"
19
20namespace Marble
21{
22
23static GeoTagWriterRegistrar s_writerStyle(GeoTagWriter::QualifiedName(QString::fromLatin1(GeoDataTypes::GeoDataStyleType),
24 QString::fromLatin1(kml::kmlTag_nameSpaceOgc22)),
25 new KmlStyleTagWriter);
26
27bool KmlStyleTagWriter::write(const GeoNode *node, GeoWriter &writer) const
28{
29 const auto style = static_cast<const GeoDataStyle *>(node);
30
31 writer.writeStartElement(QString::fromUtf8(kml::kmlTag_Style));
32 KmlObjectTagWriter::writeIdentifiers(writer, style);
33
34 writeElement(&style->iconStyle(), writer);
35 writeElement(&style->labelStyle(), writer);
36 writeElement(&style->lineStyle(), writer);
37 writeElement(&style->polyStyle(), writer);
38 writeElement(&style->balloonStyle(), writer);
39 writeElement(&style->listStyle(), writer);
40
41 writer.writeEndElement();
42
43 return true;
44}
45
46}
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 Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.