Marble

KmlPolyStyleTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Thibaut Gridel <tgridel@free.fr>
4
5#include "KmlPolyStyleTagWriter.h"
6
7#include "GeoDataPolyStyle.h"
8#include "GeoDataTypes.h"
9#include "GeoWriter.h"
10#include "KmlElementDictionary.h"
11
12namespace Marble
13{
14
15static GeoTagWriterRegistrar s_writerLineStyle(
16 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataPolyStyleType,
17 kml::kmlTag_nameSpaceOgc22 ),
18 new KmlPolyStyleTagWriter );
19
20KmlPolyStyleTagWriter::KmlPolyStyleTagWriter() : KmlColorStyleTagWriter( kml::kmlTag_PolyStyle )
21{
22}
23
24bool KmlPolyStyleTagWriter::writeMid( const GeoNode *node, GeoWriter& writer ) const
25{
26 const GeoDataPolyStyle *style = static_cast<const GeoDataPolyStyle*>( node );
27
28 if ( !style->fill() ) {
29 writer.writeElement( "fill", "0" );
30 }
31 if ( !style->outline() ) {
32 writer.writeElement( "outline", "0" );
33 }
34
35 return true;
36}
37
38bool KmlPolyStyleTagWriter::isEmpty(const GeoNode *node) const
39{
40 const GeoDataPolyStyle *style = static_cast<const GeoDataPolyStyle*>( node );
41 return style->fill() && style->outline();
42}
43
44}
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 Fri Jun 14 2024 11:54:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.