Marble

KmlStyleTagWriter.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <[email protected]>
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 
20 namespace Marble
21 {
22 
23 static GeoTagWriterRegistrar s_writerStyle(
24  GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataStyleType,
25  kml::kmlTag_nameSpaceOgc22 ),
26  new KmlStyleTagWriter );
27 
28 bool 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.
Definition: GeoTagWriter.h:44
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.