Marble

KmlLineStyleTagWriter.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <[email protected]>
4 //
5 
6 #include "KmlLineStyleTagWriter.h"
7 
8 #include "GeoDataLineStyle.h"
9 #include "GeoDataTypes.h"
10 #include "GeoWriter.h"
11 #include "KmlElementDictionary.h"
12 
13 namespace Marble
14 {
15 
16 static GeoTagWriterRegistrar s_writerLineStyle(
17  GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataLineStyleType,
18  kml::kmlTag_nameSpaceOgc22 ),
19  new KmlLineStyleTagWriter );
20 
21 KmlLineStyleTagWriter::KmlLineStyleTagWriter() : KmlColorStyleTagWriter( kml::kmlTag_LineStyle )
22 {
23  // nothing to do
24 }
25 
26 bool KmlLineStyleTagWriter::writeMid( const GeoNode *node, GeoWriter& writer ) const
27 {
28  const GeoDataLineStyle *style = static_cast<const GeoDataLineStyle*>( node );
29  writer.writeOptionalElement( "width", style->width(), 1.0f );
30  return true;
31 }
32 
33 bool KmlLineStyleTagWriter::isEmpty( const GeoNode *node ) const
34 {
35  const GeoDataLineStyle *style = static_cast<const GeoDataLineStyle*>( node );
36  return style->width() == 1.0;
37 }
38 
39 }
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 Mon Sep 25 2023 03:50:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.