QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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:
49 {
51 };
52
54
57 QgsTextMaskSettings &operator=( const QgsTextMaskSettings &other );
58 QgsTextMaskSettings &operator=( QgsTextMaskSettings &&other );
59
61
62 bool operator==( const QgsTextMaskSettings &other ) const;
63 bool operator!=( const QgsTextMaskSettings &other ) const;
64
68 bool enabled() const;
69
73 void setEnabled( bool );
74
79 MaskType type() const;
80
86 void setType( MaskType type );
87
93 double size() const;
94
101 void setSize( double size );
102
109
116 void setSizeUnit( Qgis::RenderUnit unit );
117
125
133 void setSizeMapUnitScale( const QgsMapUnitScale &scale );
134
139 Qt::PenJoinStyle joinStyle() const;
140
146 void setJoinStyle( Qt::PenJoinStyle style );
147
153 double opacity() const;
154
161 void setOpacity( double opacity );
162
169
176
181 void readXml( const QDomElement &elem );
182
187 QDomElement writeXml( QDomDocument &doc ) const;
188
194 QList<QgsSymbolLayerReference> maskedSymbolLayers() const;
195
201 void setMaskedSymbolLayers( const QList<QgsSymbolLayerReference> &maskedLayers );
202
206 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
207
212 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
213
214 private:
215 QSharedDataPointer<QgsTextMaskSettingsPrivate> d;
216};
217
218#endif // QGSTEXTMASKSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:5340
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:133
#define SIP_TRANSFER
Definition qgis_sip.h:35
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)