2
// This file is part of the Marble Virtual Globe.
4
// This program is free software licensed under the GNU LGPL. You can
5
// find a copy of this license in LICENSE.txt in the top directory of
8
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>
12
#include "GeoDataPolyStyle.h"
14
#include "GeoDataTypes.h"
19
class GeoDataPolyStylePrivate
22
GeoDataPolyStylePrivate()
23
: m_fill( true ), m_outline( true )
27
const char* nodeType() const
29
return GeoDataTypes::GeoDataPolyStyleType;
32
/// whether to fill the polygon
34
/// whether to draw the outline
38
GeoDataPolyStyle::GeoDataPolyStyle()
39
: d( new GeoDataPolyStylePrivate )
43
GeoDataPolyStyle::GeoDataPolyStyle( const GeoDataPolyStyle& other )
44
: GeoDataColorStyle( other ), d( new GeoDataPolyStylePrivate( *other.d ) )
48
GeoDataPolyStyle::GeoDataPolyStyle( const QColor &color )
49
: d( new GeoDataPolyStylePrivate )
54
GeoDataPolyStyle::~GeoDataPolyStyle()
59
GeoDataPolyStyle& GeoDataPolyStyle::operator=( const GeoDataPolyStyle& other )
61
GeoDataColorStyle::operator=( other );
66
const char* GeoDataPolyStyle::nodeType() const
71
void GeoDataPolyStyle::setFill( const bool &fill )
76
bool GeoDataPolyStyle::fill() const
81
void GeoDataPolyStyle::setOutline( const bool &outline )
83
d->m_outline = outline;
86
bool GeoDataPolyStyle::outline() const
91
void GeoDataPolyStyle::pack( QDataStream& stream ) const
93
GeoDataColorStyle::pack( stream );
96
stream << d->m_outline;
99
void GeoDataPolyStyle::unpack( QDataStream& stream )
101
GeoDataColorStyle::unpack( stream );
104
stream >> d->m_outline;