QGIS API Documentation 3.37.0-Master (614ebf5f6b2)
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
51
57
58 QgsTextShadowSettings &operator=( const QgsTextShadowSettings &other );
59
61
62 bool operator==( const QgsTextShadowSettings &other ) const;
63 bool operator!=( const QgsTextShadowSettings &other ) const;
64
69 bool enabled() const;
70
76 void setEnabled( bool enabled );
77
84 QgsTextShadowSettings::ShadowPlacement shadowPlacement() const;
85
93 void setShadowPlacement( QgsTextShadowSettings::ShadowPlacement placement );
94
100 int offsetAngle() const;
101
108 void setOffsetAngle( int angle );
109
116 double offsetDistance() const;
117
125 void setOffsetDistance( double distance );
126
132 Qgis::RenderUnit offsetUnit() const;
133
140 void setOffsetUnit( Qgis::RenderUnit units );
141
148 QgsMapUnitScale offsetMapUnitScale() const;
149
157 void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
158
163 bool offsetGlobal() const;
164
169 void setOffsetGlobal( bool global );
170
176 double blurRadius() const;
177
184 void setBlurRadius( double blurRadius );
185
191 Qgis::RenderUnit blurRadiusUnit() const;
192
199 void setBlurRadiusUnit( Qgis::RenderUnit units );
200
207 QgsMapUnitScale blurRadiusMapUnitScale() const;
208
216 void setBlurRadiusMapUnitScale( const QgsMapUnitScale &scale );
217
222 bool blurAlphaOnly() const;
223
230 void setBlurAlphaOnly( bool alphaOnly );
231
237 double opacity() const;
238
245 void setOpacity( double opacity );
246
251 int scale() const;
252
258 void setScale( int scale );
259
264 QColor color() const;
265
271 void setColor( const QColor &color );
272
277 QPainter::CompositionMode blendMode() const;
278
284 void setBlendMode( QPainter::CompositionMode mode );
285
290 void readFromLayer( QgsVectorLayer *layer );
291
296 void readXml( const QDomElement &elem );
297
302 QDomElement writeXml( QDomDocument &doc ) const;
303
308 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
309
314 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
315
316 private:
317
318 QSharedDataPointer<QgsTextShadowSettingsPrivate> d;
319
320};
321
322#endif // QGSTEXTSHADOWSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:4489
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)