Class: QgsSelectiveMaskingSourceSet

Represents a named set of selective masking sources (QgsSelectiveMaskSource).

Added in version 4.0.

Methods

append

Appends a source to the set.

id

Returns a unique identifier for the set.

isEmpty

Returns True if the set is empty.

isValid

Returns True if the source set is valid, or False if it is invalid (default constructed).

name

Returns the set's unique name.

readXml

Sets the set's state from a DOM element.

setId

Sets the unique identifier for the set.

setName

Sets the set's unique name.

setSources

Sets the list of selective mask sources for this set.

size

Returns the number of sources in the set.

sources

Returns the list of selective mask sources configured in this set.

writeXml

Writes the set's state to a DOM element.

class qgis.core.QgsSelectiveMaskingSourceSet[source]

Bases: object

__init__()

Constructor for an empty (invalid) QgsSelectiveMaskingSourceSet.

__init__(a0: QgsSelectiveMaskingSourceSet)
Parameters:

a0 (QgsSelectiveMaskingSourceSet)

append(self, source: QgsSelectiveMaskSource)[source]

Appends a source to the set.

Parameters:

source (QgsSelectiveMaskSource)

id(self) str[source]

Returns a unique identifier for the set.

This id must be unique in the whole project. It is automatically generated when a new QgsSelectiveMaskingSourceSet is constructed.

See also

setId()

Return type:

str

isEmpty(self) bool[source]

Returns True if the set is empty.

Return type:

bool

isValid(self) bool[source]

Returns True if the source set is valid, or False if it is invalid (default constructed).

Return type:

bool

name(self) str[source]

Returns the set’s unique name.

See also

setName()

Return type:

str

readXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool[source]

Sets the set’s state from a DOM element.

See also

writeXml()

Parameters:
Return type:

bool

setId(self, id: str | None)[source]

Sets the unique identifier for the set.

This id must be unique in the whole project. A default random one is automatically generated when a new QgsSelectiveMaskingSourceSet is constructed.

See also

id()

Parameters:

id (Optional[str])

setName(self, name: str | None)[source]

Sets the set’s unique name.

See also

name()

Parameters:

name (Optional[str])

setSources(self, sources: Iterable[QgsSelectiveMaskSource])[source]

Sets the list of selective mask sources for this set.

See also

sources()

Parameters:

sources (Iterable[QgsSelectiveMaskSource])

size(self) int[source]

Returns the number of sources in the set.

Return type:

int

sources(self) list[QgsSelectiveMaskSource]

Returns the list of selective mask sources configured in this set.

See also

setSources()

Return type:

list[QgsSelectiveMaskSource]

writeXml(self, document: QDomDocument, context: QgsReadWriteContext) QDomElement[source]

Writes the set’s state to a DOM element.

See also

readXml()

Parameters:
Return type:

QDomElement