|
QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
Container for settings relating to a selective masking around a text. More...
#include <qgstextmasksettings.h>
Public Types | |
| enum | MaskType { MaskBuffer = 0 } |
| Mask shape types. More... | |
Public Member Functions | |
| QgsTextMaskSettings () | |
| QgsTextMaskSettings (const QgsTextMaskSettings &other) | |
| Copy constructor. More... | |
| ~QgsTextMaskSettings () | |
| bool | enabled () const |
| Returns whether the mask is enabled. More... | |
| Qt::PenJoinStyle | joinStyle () const |
| Returns the buffer join style. More... | |
| QgsSymbolLayerReferenceList | maskedSymbolLayers () const |
| Returns a list of references to symbol layers that are masked by this buffer. More... | |
| double | opacity () const |
| Returns the mask's opacity. More... | |
| bool | operator!= (const QgsTextMaskSettings &other) const |
| QgsTextMaskSettings & | operator= (const QgsTextMaskSettings &other) |
| Copy constructor. More... | |
| bool | operator== (const QgsTextMaskSettings &other) const |
| QgsPaintEffect * | paintEffect () const |
| Returns the current paint effect for the mask. More... | |
| void | readXml (const QDomElement &elem) |
| Read settings from a DOM element. More... | |
| QSet< QString > | referencedFields (const QgsRenderContext &context) const |
| Returns all field names referenced by the configuration (e.g. More... | |
| void | setEnabled (bool) |
| Returns whether the mask is enabled. More... | |
| void | setJoinStyle (Qt::PenJoinStyle style) |
| Sets the join style used for drawing the buffer. More... | |
| void | setMaskedSymbolLayers (QgsSymbolLayerReferenceList maskedLayers) |
| Sets the symbol layers that will be masked by this buffer. More... | |
| void | setOpacity (double opacity) |
| Sets the mask's opacity. More... | |
| void | setPaintEffect (QgsPaintEffect *effect) |
| Sets the current paint effect for the mask. More... | |
| void | setSize (double size) |
| Sets the size of the buffer. More... | |
| void | setSizeMapUnitScale (const QgsMapUnitScale &scale) |
| Sets the map unit scale object for the buffer size. More... | |
| void | setSizeUnit (QgsUnitTypes::RenderUnit unit) |
| Sets the units used for the buffer size. More... | |
| void | setType (MaskType type) |
| Sets the type of mask shape. More... | |
| double | size () const |
| Returns the size of the buffer. More... | |
| QgsMapUnitScale | sizeMapUnitScale () const |
| Returns the map unit scale object for the buffer size. More... | |
| QgsUnitTypes::RenderUnit | sizeUnit () const |
| Returns the units for the buffer size. More... | |
| MaskType | type () const |
| Returns the type of mask shape. More... | |
| void | updateDataDefinedProperties (QgsRenderContext &context, const QgsPropertyCollection &properties) |
| Updates the format by evaluating current values of data defined properties. More... | |
| QDomElement | writeXml (QDomDocument &doc) const |
| Write settings into a DOM element. More... | |
Container for settings relating to a selective masking around a text.
A selective masking only makes sense in contexts where the text is rendered over some other map layers, especially for labeling.
Definition at line 41 of file qgstextmasksettings.h.
| QgsTextMaskSettings::QgsTextMaskSettings | ( | ) |
Definition at line 22 of file qgstextmasksettings.cpp.
| QgsTextMaskSettings::QgsTextMaskSettings | ( | const QgsTextMaskSettings & | other | ) |
Copy constructor.
| other | source settings |
Definition at line 29 of file qgstextmasksettings.cpp.
|
default |
| bool QgsTextMaskSettings::enabled | ( | ) | const |
Returns whether the mask is enabled.
Definition at line 64 of file qgstextmasksettings.cpp.
| Qt::PenJoinStyle QgsTextMaskSettings::joinStyle | ( | ) | const |
Returns the buffer join style.
Definition at line 115 of file qgstextmasksettings.cpp.
| QgsSymbolLayerReferenceList QgsTextMaskSettings::maskedSymbolLayers | ( | ) | const |
Returns a list of references to symbol layers that are masked by this buffer.
Definition at line 231 of file qgstextmasksettings.cpp.
| double QgsTextMaskSettings::opacity | ( | ) | const |
Returns the mask's opacity.
The opacity is a double value between 0 (fully transparent) and 1 (totally opaque).
Definition at line 125 of file qgstextmasksettings.cpp.
| bool QgsTextMaskSettings::operator!= | ( | const QgsTextMaskSettings & | other | ) | const |
Definition at line 59 of file qgstextmasksettings.cpp.
| QgsTextMaskSettings & QgsTextMaskSettings::operator= | ( | const QgsTextMaskSettings & | other | ) |
Copy constructor.
| other | source QgsTextMaskSettings |
Definition at line 34 of file qgstextmasksettings.cpp.
| bool QgsTextMaskSettings::operator== | ( | const QgsTextMaskSettings & | other | ) | const |
Definition at line 40 of file qgstextmasksettings.cpp.
| QgsPaintEffect * QgsTextMaskSettings::paintEffect | ( | ) | const |
Returns the current paint effect for the mask.
Definition at line 135 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::readXml | ( | const QDomElement & | elem | ) |
Read settings from a DOM element.
Definition at line 197 of file qgstextmasksettings.cpp.
| QSet< QString > QgsTextMaskSettings::referencedFields | ( | const QgsRenderContext & | context | ) | const |
Returns all field names referenced by the configuration (e.g.
from data defined properties).
Definition at line 192 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setEnabled | ( | bool | enabled | ) |
Returns whether the mask is enabled.
Definition at line 69 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setJoinStyle | ( | Qt::PenJoinStyle | style | ) |
Sets the join style used for drawing the buffer.
| style | join style |
Definition at line 120 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setMaskedSymbolLayers | ( | QgsSymbolLayerReferenceList | maskedLayers | ) |
Sets the symbol layers that will be masked by this buffer.
| maskedLayers | list of references to symbol layers |
Definition at line 236 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setOpacity | ( | double | opacity | ) |
Sets the mask's opacity.
| opacity | opacity as a double value between 0 (fully transparent) and 1 (totally opaque) |
Definition at line 130 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setPaintEffect | ( | QgsPaintEffect * | effect | ) |
Sets the current paint effect for the mask.
| effect | paint effect. Ownership is transferred to the mask settings. |
Definition at line 140 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setSize | ( | double | size | ) |
Sets the size of the buffer.
The size units are specified using setSizeUnit().
| size | buffer size |
Definition at line 90 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setSizeMapUnitScale | ( | const QgsMapUnitScale & | scale | ) |
Sets the map unit scale object for the buffer size.
This is only used if the buffer size is set to QgsUnitTypes::RenderMapUnit.
| scale | scale for buffer size |
Definition at line 110 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setSizeUnit | ( | QgsUnitTypes::RenderUnit | unit | ) |
Sets the units used for the buffer size.
| unit | size unit |
Definition at line 100 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::setType | ( | QgsTextMaskSettings::MaskType | type | ) |
Sets the type of mask shape.
| type | shape type |
Definition at line 79 of file qgstextmasksettings.cpp.
| double QgsTextMaskSettings::size | ( | ) | const |
Returns the size of the buffer.
Definition at line 85 of file qgstextmasksettings.cpp.
| QgsMapUnitScale QgsTextMaskSettings::sizeMapUnitScale | ( | ) | const |
Returns the map unit scale object for the buffer size.
This is only used if the buffer size is set to QgsUnitTypes::RenderMapUnit.
Definition at line 105 of file qgstextmasksettings.cpp.
| QgsUnitTypes::RenderUnit QgsTextMaskSettings::sizeUnit | ( | ) | const |
Returns the units for the buffer size.
Definition at line 95 of file qgstextmasksettings.cpp.
| QgsTextMaskSettings::MaskType QgsTextMaskSettings::type | ( | ) | const |
Returns the type of mask shape.
Definition at line 74 of file qgstextmasksettings.cpp.
| void QgsTextMaskSettings::updateDataDefinedProperties | ( | QgsRenderContext & | context, |
| const QgsPropertyCollection & | properties | ||
| ) |
Updates the format by evaluating current values of data defined properties.
Definition at line 145 of file qgstextmasksettings.cpp.
| QDomElement QgsTextMaskSettings::writeXml | ( | QDomDocument & | doc | ) | const |
Write settings into a DOM element.
Definition at line 215 of file qgstextmasksettings.cpp.