QGIS API Documentation 4.1.0-Master (60fea48833c)
Loading...
Searching...
No Matches
qgstextshadowsettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstextshadowsettings.h
3 -----------------
4 begin : May 2020
5 copyright : (C) Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSTEXTSHADOWSETTINGS_H
17#define QGSTEXTSHADOWSETTINGS_H
18
19#include "qgsmapunitscale.h"
20
21#include <QDomElement>
22#include <QPainter>
23#include <QSharedDataPointer>
24
25class QgsTextShadowSettingsPrivate;
26class QgsVectorLayer;
28
35class CORE_EXPORT QgsTextShadowSettings
36{
37 public:
48
52
53 QgsTextShadowSettings &operator=( const QgsTextShadowSettings &other );
54 QgsTextShadowSettings &operator=( QgsTextShadowSettings &&other );
55
57
58 bool operator==( const QgsTextShadowSettings &other ) const;
59 bool operator!=( const QgsTextShadowSettings &other ) const;
60
65 bool enabled() const;
66
72 void setEnabled( bool enabled );
73
80 QgsTextShadowSettings::ShadowPlacement shadowPlacement() const;
81
89 void setShadowPlacement( QgsTextShadowSettings::ShadowPlacement placement );
90
96 int offsetAngle() const;
97
104 void setOffsetAngle( int angle );
105
112 double offsetDistance() const;
113
121 void setOffsetDistance( double distance );
122
128 Qgis::RenderUnit offsetUnit() const;
129
136 void setOffsetUnit( Qgis::RenderUnit units );
137
144 QgsMapUnitScale offsetMapUnitScale() const;
145
153 void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
154
159 bool offsetGlobal() const;
160
165 void setOffsetGlobal( bool global );
166
172 double blurRadius() const;
173
180 void setBlurRadius( double blurRadius );
181
187 Qgis::RenderUnit blurRadiusUnit() const;
188
195 void setBlurRadiusUnit( Qgis::RenderUnit units );
196
203 QgsMapUnitScale blurRadiusMapUnitScale() const;
204
212 void setBlurRadiusMapUnitScale( const QgsMapUnitScale &scale );
213
218 bool blurAlphaOnly() const;
219
226 void setBlurAlphaOnly( bool alphaOnly );
227
233 double opacity() const;
234
241 void setOpacity( double opacity );
242
247 int scale() const;
248
254 void setScale( int scale );
255
260 QColor color() const;
261
267 void setColor( const QColor &color );
268
273 QPainter::CompositionMode blendMode() const;
274
280 void setBlendMode( QPainter::CompositionMode mode );
281
286 void readFromLayer( QgsVectorLayer *layer );
287
292 void readXml( const QDomElement &elem );
293
298 QDomElement writeXml( QDomDocument &doc ) const;
299
304 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
305
310 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
311
312 private:
313 QSharedDataPointer<QgsTextShadowSettingsPrivate> d;
314};
315
316#endif // QGSTEXTSHADOWSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:5340
Struct for storing maximum and minimum scales for measurements in map units.
A grouped map of multiple QgsProperty objects, each referenced by an integer key value.
Contains information about the context of a rendering operation.
Container for settings relating to a text shadow.
ShadowPlacement
Placement positions for text shadow.
@ ShadowBuffer
Draw shadow under buffer.
@ ShadowShape
Draw shadow under background shape.
@ ShadowLowest
Draw shadow below all text components.
@ ShadowText
Draw shadow under text.
Represents a vector layer which manages a vector based dataset.
#define SIP_SKIP
Definition qgis_sip.h:133
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)