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 "GeoDataStyle.h"
9#include "GeoDataBalloonStyle.h"
10#include "GeoDataIconStyle.h"
11#include "GeoDataLabelStyle.h"
12#include "GeoDataLineStyle.h"
13#include "GeoDataListStyle.h"
14#include "GeoDataPolyStyle.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(
24 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataStyleType,
25 kml::kmlTag_nameSpaceOgc22 ),
26 new KmlStyleTagWriter );
27
28bool KmlStyleTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
29{
30 const GeoDataStyle *style = static_cast<const GeoDataStyle*>( node );
31
32 writer.writeStartElement( kml::kmlTag_Style );
33 KmlObjectTagWriter::writeIdentifiers( writer, style );
34
35 writeElement( &style->iconStyle(), writer );
36 writeElement( &style->labelStyle(), writer );
37 writeElement( &style->lineStyle(), writer );
38 writeElement( &style->polyStyle(), writer );
39 writeElement( &style->balloonStyle(), writer );
40 writeElement( &style->listStyle(), writer );
41
42 writer.writeEndElement();
43
44 return true;
45}
46
47}
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.