QGIS API Documentation 3.41.0-Master (3440c17df1d)
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 <QSharedDataPointer>
22#include <QPainter>
23#include <QDomElement>
24
25class QgsTextShadowSettingsPrivate;
26class QgsVectorLayer;
28
35class CORE_EXPORT QgsTextShadowSettings
36{
37 public:
38
43 {
44 ShadowLowest = 0,
47 ShadowShape
48 };
49
52
53 QgsTextShadowSettings &operator=( const QgsTextShadowSettings &other );
54
56
57 bool operator==( const QgsTextShadowSettings &other ) const;
58 bool operator!=( const QgsTextShadowSettings &other ) const;
59
64 bool enabled() const;
65
71 void setEnabled( bool enabled );
72
79 QgsTextShadowSettings::ShadowPlacement shadowPlacement() const;
80
88 void setShadowPlacement( QgsTextShadowSettings::ShadowPlacement placement );
89
95 int offsetAngle() const;
96
103 void setOffsetAngle( int angle );
104
111 double offsetDistance() const;
112
120 void setOffsetDistance( double distance );
121
127 Qgis::RenderUnit offsetUnit() const;
128
135 void setOffsetUnit( Qgis::RenderUnit units );
136
143 QgsMapUnitScale offsetMapUnitScale() const;
144
152 void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
153
158 bool offsetGlobal() const;
159
164 void setOffsetGlobal( bool global );
165
171 double blurRadius() const;
172
179 void setBlurRadius( double blurRadius );
180
186 Qgis::RenderUnit blurRadiusUnit() const;
187
194 void setBlurRadiusUnit( Qgis::RenderUnit units );
195
202 QgsMapUnitScale blurRadiusMapUnitScale() const;
203
211 void setBlurRadiusMapUnitScale( const QgsMapUnitScale &scale );
212
217 bool blurAlphaOnly() const;
218
225 void setBlurAlphaOnly( bool alphaOnly );
226
232 double opacity() const;
233
240 void setOpacity( double opacity );
241
246 int scale() const;
247
253 void setScale( int scale );
254
259 QColor color() const;
260
266 void setColor( const QColor &color );
267
272 QPainter::CompositionMode blendMode() const;
273
279 void setBlendMode( QPainter::CompositionMode mode );
280
285 void readFromLayer( QgsVectorLayer *layer );
286
291 void readXml( const QDomElement &elem );
292
297 QDomElement writeXml( QDomDocument &doc ) const;
298
303 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
304
309 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
310
311 private:
312
313 QSharedDataPointer<QgsTextShadowSettingsPrivate> d;
314
315};
316
317#endif // QGSTEXTSHADOWSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:4847
Struct for storing maximum and minimum scales for measurements in map units.
A grouped map of multiple QgsProperty objects, each referenced by a 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.
@ ShadowText
Draw shadow under text.
Represents a vector layer which manages a vector based data sets.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)