QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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:
38
49
53
54 QgsTextShadowSettings &operator=( const QgsTextShadowSettings &other );
55 QgsTextShadowSettings &operator=( QgsTextShadowSettings &&other );
56
58
59 bool operator==( const QgsTextShadowSettings &other ) const;
60 bool operator!=( const QgsTextShadowSettings &other ) const;
61
66 bool enabled() const;
67
73 void setEnabled( bool enabled );
74
81 QgsTextShadowSettings::ShadowPlacement shadowPlacement() const;
82
90 void setShadowPlacement( QgsTextShadowSettings::ShadowPlacement placement );
91
97 int offsetAngle() const;
98
105 void setOffsetAngle( int angle );
106
113 double offsetDistance() const;
114
122 void setOffsetDistance( double distance );
123
129 Qgis::RenderUnit offsetUnit() const;
130
137 void setOffsetUnit( Qgis::RenderUnit units );
138
145 QgsMapUnitScale offsetMapUnitScale() const;
146
154 void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
155
160 bool offsetGlobal() const;
161
166 void setOffsetGlobal( bool global );
167
173 double blurRadius() const;
174
181 void setBlurRadius( double blurRadius );
182
188 Qgis::RenderUnit blurRadiusUnit() const;
189
196 void setBlurRadiusUnit( Qgis::RenderUnit units );
197
204 QgsMapUnitScale blurRadiusMapUnitScale() const;
205
213 void setBlurRadiusMapUnitScale( const QgsMapUnitScale &scale );
214
219 bool blurAlphaOnly() const;
220
227 void setBlurAlphaOnly( bool alphaOnly );
228
234 double opacity() const;
235
242 void setOpacity( double opacity );
243
248 int scale() const;
249
255 void setScale( int scale );
256
261 QColor color() const;
262
268 void setColor( const QColor &color );
269
274 QPainter::CompositionMode blendMode() const;
275
281 void setBlendMode( QPainter::CompositionMode mode );
282
287 void readFromLayer( QgsVectorLayer *layer );
288
293 void readXml( const QDomElement &elem );
294
299 QDomElement writeXml( QDomDocument &doc ) const;
300
305 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
306
311 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
312
313 private:
314
315 QSharedDataPointer<QgsTextShadowSettingsPrivate> d;
316
317};
318
319#endif // QGSTEXTSHADOWSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:5183
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:134
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)