16#ifndef QGSSELECTIVEMASKINGSOURCE_H
17#define QGSSELECTIVEMASKINGSOURCE_H
25using namespace Qt::StringLiterals;
56 bool isValid()
const {
return !mLayerId.isEmpty(); }
63 QString
layerId()
const {
return mLayerId; }
101 SIP_PYOBJECT __repr__();
103 if ( !sipCpp->isValid() )
105 sipRes = PyUnicode_FromString(
"<QgsSelectiveMaskSource: invalid>" );
107 else if ( sipCpp->sourceId().isEmpty() )
109 const QString str = u
"<QgsSelectiveMaskSource: %1 (%2)>"_s.arg(
112 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
116 const QString str = u
"<QgsSelectiveMaskSource: %1 - %2 (%3)>"_s.arg(
120 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
SelectiveMaskSourceType
Selective masking source types.
@ SymbolLayer
A mask generated from a symbol layer.
QString layerId() const
Returns the source layer id.
QgsSelectiveMaskSource()=default
Constructor for an invalid QgsSelectiveMaskSource.
void setSourceId(const QString &id)
Sets the symbol layer or label rule id.
void setLayerId(const QString &id)
Sets the source layer id.
bool isValid() const
Returns true if the source is valid (i.e.
bool operator!=(const QgsSelectiveMaskSource &other) const =default
Qgis::SelectiveMaskSourceType sourceType() const
Returns the type of masking source.
void setSourceType(Qgis::SelectiveMaskSourceType type)
Sets the source type.
QString sourceId() const
Returns the symbol layer or label rule ID.
bool operator==(const QgsSelectiveMaskSource &other) const =default
QString qgsEnumValueToKey(const T &value, bool *returnOk=nullptr)
Returns the value for the given key of an enum.