QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
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
36class CORE_EXPORT QgsTextShadowSettings
37{
38 public:
39
44 {
45 ShadowLowest = 0,
48 ShadowShape
49 };
50
52
58
59 QgsTextShadowSettings &operator=( const QgsTextShadowSettings &other );
60
62
63 bool operator==( const QgsTextShadowSettings &other ) const;
64 bool operator!=( const QgsTextShadowSettings &other ) const;
65
70 bool enabled() const;
71
77 void setEnabled( bool enabled );
78
85 QgsTextShadowSettings::ShadowPlacement shadowPlacement() const;
86
94 void setShadowPlacement( QgsTextShadowSettings::ShadowPlacement placement );
95
101 int offsetAngle() const;
102
109 void setOffsetAngle( int angle );
110
117 double offsetDistance() const;
118
126 void setOffsetDistance( double distance );
127
133 Qgis::RenderUnit offsetUnit() const;
134
141 void setOffsetUnit( Qgis::RenderUnit units );
142
149 QgsMapUnitScale offsetMapUnitScale() const;
150
158 void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
159
164 bool offsetGlobal() const;
165
170 void setOffsetGlobal( bool global );
171
177 double blurRadius() const;
178
185 void setBlurRadius( double blurRadius );
186
192 Qgis::RenderUnit blurRadiusUnit() const;
193
200 void setBlurRadiusUnit( Qgis::RenderUnit units );
201
208 QgsMapUnitScale blurRadiusMapUnitScale() const;
209
217 void setBlurRadiusMapUnitScale( const QgsMapUnitScale &scale );
218
223 bool blurAlphaOnly() const;
224
231 void setBlurAlphaOnly( bool alphaOnly );
232
238 double opacity() const;
239
246 void setOpacity( double opacity );
247
252 int scale() const;
253
259 void setScale( int scale );
260
265 QColor color() const;
266
272 void setColor( const QColor &color );
273
278 QPainter::CompositionMode blendMode() const;
279
285 void setBlendMode( QPainter::CompositionMode mode );
286
291 void readFromLayer( QgsVectorLayer *layer );
292
297 void readXml( const QDomElement &elem );
298
303 QDomElement writeXml( QDomDocument &doc ) const;
304
309 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
310
315 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
316
317 private:
318
319 QSharedDataPointer<QgsTextShadowSettingsPrivate> d;
320
321};
322
323#endif // QGSTEXTSHADOWSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:3627
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)