Marble
7 #include "GeoDataStyle.h"
9 #include "GeoDataTypes.h"
10 #include "GeoDataBalloonStyle.h"
11 #include "GeoDataIconStyle.h"
12 #include "GeoDataLabelStyle.h"
13 #include "GeoDataLineStyle.h"
14 #include "GeoDataListStyle.h"
15 #include "GeoDataPolyStyle.h"
20 class GeoDataStylePrivate
27 GeoDataStylePrivate(
const QString& iconPath,
29 : m_iconStyle( iconPath ),
30 m_labelStyle( font, color ),
37 GeoDataIconStyle m_iconStyle;
38 GeoDataLabelStyle m_labelStyle;
39 GeoDataLineStyle m_lineStyle;
40 GeoDataPolyStyle m_polyStyle;
41 GeoDataBalloonStyle m_balloonStyle;
42 GeoDataListStyle m_listStyle;
46 : d( new GeoDataStylePrivate )
57 : d( new GeoDataStylePrivate( iconPath, font, color ) )
61 GeoDataStyle::~GeoDataStyle()
73 bool GeoDataStyle::operator==(
const GeoDataStyle &other )
const
75 if ( GeoDataStyleSelector::operator!=( other ) ) {
79 return d->m_iconStyle == other.d->m_iconStyle &&
80 d->m_labelStyle == other.d->m_labelStyle &&
81 d->m_lineStyle == other.d->m_lineStyle &&
82 d->m_polyStyle == other.d->m_polyStyle &&
83 d->m_balloonStyle == other.d->m_balloonStyle &&
84 d->m_listStyle == other.d->m_listStyle;
87 bool GeoDataStyle::operator!=(
const GeoDataStyle &other )
const
89 return !this->operator==( other );
94 return GeoDataTypes::GeoDataStyleType;
99 d->m_iconStyle = style;
100 d->m_iconStyle.setParent(
this );
105 d->m_lineStyle = style;
110 d->m_labelStyle = style;
115 d->m_polyStyle = style;
120 d->m_balloonStyle = style;
125 d->m_listStyle = style;
126 d->m_listStyle.setParent(
this );
131 return d->m_iconStyle;
136 return d->m_iconStyle;
141 return d->m_lineStyle;
146 return d->m_lineStyle;
151 return d->m_polyStyle;
156 return d->m_polyStyle;
161 return d->m_labelStyle;
166 return d->m_labelStyle;
171 return d->m_balloonStyle;
176 return d->m_balloonStyle;
181 return d->m_listStyle;
186 return d->m_listStyle;
193 d->m_iconStyle.pack( stream );
194 d->m_labelStyle.pack( stream );
195 d->m_polyStyle.pack( stream );
196 d->m_lineStyle.pack( stream );
197 d->m_balloonStyle.pack( stream );
198 d->m_listStyle.pack( stream );
205 d->m_iconStyle.unpack( stream );
206 d->m_labelStyle.unpack( stream );
207 d->m_lineStyle.unpack( stream );
208 d->m_polyStyle.unpack( stream );
209 d->m_balloonStyle.unpack( stream );
210 d->m_listStyle.unpack( stream );
void unpack(QDataStream &stream) override
Unserialize the styleselector from a stream.
void pack(QDataStream &stream) const override
Serialize the style to a stream.
void unpack(QDataStream &stream) override
Unserialize the style from a stream.
specifies the style how lines are drawn
void setLineStyle(const GeoDataLineStyle &style)
set the line style
GeoDataLineStyle & lineStyle()
Return the label style of this style.
GeoDataStyle & operator=(const GeoDataStyle &other)
assignment operator
specifies how the name of a GeoDataFeature is drawn
GeoDataLabelStyle & labelStyle()
Return the label style of this style.
GeoDataStyleSelector & operator=(const GeoDataStyleSelector &other)
assignment operator
void pack(QDataStream &stream) const override
Serialize the styleselector to a stream.
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
GeoDataListStyle & listStyle()
Return the list style of this style.
void setLabelStyle(const GeoDataLabelStyle &style)
set the label style
Binds a QML item to a specific geodetic location in screen coordinates.
void setPolyStyle(const GeoDataPolyStyle &style)
set the poly style
GeoDataBalloonStyle & balloonStyle()
Return the balloon style of this style.
an abstract base class for the style classes
void setIconStyle(const GeoDataIconStyle &style)
set the icon style
GeoDataPolyStyle & polyStyle()
Return the label style of this style.
void setBalloonStyle(const GeoDataBalloonStyle &style)
set the balloon style
void setListStyle(const GeoDataListStyle &style)
set the list style
specifies the style how polygons are drawn
GeoDataStyle()
Construct a default style.
GeoDataIconStyle & iconStyle()
Return the icon style of this style.
an addressable style group
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.