QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgstextmasksettings.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgstextmasksettings.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 QGSTEXTMASKSETTINGS_H
17 #define QGSTEXTMASKSETTINGS_H
18 
19 #include "qgis_sip.h"
20 #include "qgis_core.h"
22 #include "qgsunittypes.h"
23 #include "qgsmapunitscale.h"
24 
25 #include <QSharedDataPointer>
26 #include <QDomElement>
27 
28 class QgsTextMaskSettingsPrivate;
29 class QgsPaintEffect;
31 
41 class CORE_EXPORT QgsTextMaskSettings
42 {
43  public:
44 
48  enum MaskType
49  {
50  MaskBuffer = 0
51  };
52 
54 
60 
65  QgsTextMaskSettings &operator=( const QgsTextMaskSettings &other );
66 
68 
72  bool enabled() const;
73 
77  void setEnabled( bool );
78 
83  MaskType type() const;
84 
90  void setType( MaskType type );
91 
97  double size() const;
98 
105  void setSize( double size );
106 
112  QgsUnitTypes::RenderUnit sizeUnit() const;
113 
120  void setSizeUnit( QgsUnitTypes::RenderUnit unit );
121 
128  QgsMapUnitScale sizeMapUnitScale() const;
129 
137  void setSizeMapUnitScale( const QgsMapUnitScale &scale );
138 
143  Qt::PenJoinStyle joinStyle() const;
144 
150  void setJoinStyle( Qt::PenJoinStyle style );
151 
157  double opacity() const;
158 
165  void setOpacity( double opacity );
166 
172  QgsPaintEffect *paintEffect() const;
173 
179  void setPaintEffect( QgsPaintEffect *effect SIP_TRANSFER );
180 
185  void readXml( const QDomElement &elem );
186 
191  QDomElement writeXml( QDomDocument &doc ) const;
192 
198  QgsSymbolLayerReferenceList maskedSymbolLayers() const;
199 
205  void setMaskedSymbolLayers( QgsSymbolLayerReferenceList maskedLayers );
206 
210  void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
211 
216  QSet<QString> referencedFields( const QgsRenderContext &context ) const;
217 
218  private:
219 
220  QSharedDataPointer<QgsTextMaskSettingsPrivate> d;
221 };
222 
223 #endif // QGSTEXTMASKSETTINGS_H
QgsUnitTypes::RenderUnit
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:166
QgsTextMaskSettings::MaskType
MaskType
Mask shape types.
Definition: qgstextmasksettings.h:48
QgsRenderContext
Definition: qgsrendercontext.h:57
qgsunittypes.h
qgssymbollayerreference.h
QgsTextMaskSettings
Definition: qgstextmasksettings.h:41
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
Definition: qgsmapunitscale.h:37
QgsPropertyCollection
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Definition: qgspropertycollection.h:318
QgsSymbolLayerReferenceList
QList< QgsSymbolLayerReference > QgsSymbolLayerReferenceList
Definition: qgssymbollayerreference.h:160
QgsPaintEffect
Base class for visual effects which can be applied to QPicture drawings.
Definition: qgspainteffect.h:53
qgsmapunitscale.h