QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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.h"
20#include "qgis_core.h"
21#include "qgis_sip.h"
22#include "qgsmapunitscale.h"
23
24#include <QDomElement>
25#include <QSharedDataPointer>
26
27class QgsTextMaskSettingsPrivate;
28class QgsPaintEffect;
31
41
42class CORE_EXPORT QgsTextMaskSettings
43{
44 public:
45
50 {
52 };
53
55
58 QgsTextMaskSettings &operator=( const QgsTextMaskSettings &other );
59 QgsTextMaskSettings &operator=( QgsTextMaskSettings &&other );
60
62
63 bool operator==( const QgsTextMaskSettings &other ) const;
64 bool operator!=( const QgsTextMaskSettings &other ) const;
65
69 bool enabled() const;
70
74 void setEnabled( bool );
75
80 MaskType type() const;
81
87 void setType( MaskType type );
88
94 double size() const;
95
102 void setSize( double size );
103
110
117 void setSizeUnit( Qgis::RenderUnit unit );
118
126
134 void setSizeMapUnitScale( const QgsMapUnitScale &scale );
135
140 Qt::PenJoinStyle joinStyle() const;
141
147 void setJoinStyle( Qt::PenJoinStyle style );
148
154 double opacity() const;
155
162 void setOpacity( double opacity );
163
170
177
182 void readXml( const QDomElement &elem );
183
188 QDomElement writeXml( QDomDocument &doc ) const;
189
195 QList<QgsSymbolLayerReference> maskedSymbolLayers() const;
196
202 void setMaskedSymbolLayers( const QList<QgsSymbolLayerReference> &maskedLayers );
203
207 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
208
213 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
214
215 private:
216
217 QSharedDataPointer<QgsTextMaskSettingsPrivate> d;
218};
219
220#endif // QGSTEXTMASKSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:5183
Struct for storing maximum and minimum scales for measurements in map units.
Base class for visual effects which can be applied to QPicture drawings.
A grouped map of multiple QgsProperty objects, each referenced by an integer key value.
Contains information about the context of a rendering operation.
Type used to refer to a specific symbol layer in a symbol of a layer.
Container for settings relating to a selective masking around a text.
void setEnabled(bool)
Returns whether the mask is enabled.
void setMaskedSymbolLayers(const QList< QgsSymbolLayerReference > &maskedLayers)
Sets the symbol layers that will be masked by this buffer.
MaskType
Mask shape types.
Qgis::RenderUnit sizeUnit() const
Returns the units for the buffer size.
QList< QgsSymbolLayerReference > maskedSymbolLayers() const
Returns a list of references to symbol layers that are masked by this buffer.
void setSize(double size)
Sets the size of the buffer.
QSet< QString > referencedFields(const QgsRenderContext &context) const
Returns all field names referenced by the configuration (e.g.
QgsMapUnitScale sizeMapUnitScale() const
Returns the map unit scale object for the buffer size.
double size() const
Returns the size of the buffer.
void setSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale object for the buffer size.
void updateDataDefinedProperties(QgsRenderContext &context, const QgsPropertyCollection &properties)
Updates the format by evaluating current values of data defined properties.
void readXml(const QDomElement &elem)
Read settings from a DOM element.
QDomElement writeXml(QDomDocument &doc) const
Write settings into a DOM element.
QgsPaintEffect * paintEffect() const
Returns the current paint effect for the mask.
void setJoinStyle(Qt::PenJoinStyle style)
Sets the join style used for drawing the buffer.
double opacity() const
Returns the mask's opacity.
bool enabled() const
Returns whether the mask is enabled.
void setSizeUnit(Qgis::RenderUnit unit)
Sets the units used for the buffer size.
void setPaintEffect(QgsPaintEffect *effect)
Sets the current paint effect for the mask.
Qt::PenJoinStyle joinStyle() const
Returns the buffer join style.
void setType(MaskType type)
Sets the type of mask shape.
MaskType type() const
Returns the type of mask shape.
void setOpacity(double opacity)
Sets the mask's opacity.
#define SIP_SKIP
Definition qgis_sip.h:134
#define SIP_TRANSFER
Definition qgis_sip.h:36
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)