Class: QgsSelectiveMaskingSourceSetManager¶
Manages storage of a set of selective masking source sets.
QgsSelectiveMaskingSourceSetManager handles the storage,
serializing and deserializing of selective masking source sets. Usually
this class is not constructed directly, but rather accessed through a
QgsProject via
QgsProject.selectiveMaskingSourceSetManager().
QgsSelectiveMaskingSourceSetManager retains ownership of all
the sets contained in the manager.
Added in version 4.0.
Class Hierarchy¶
Base classes¶
Manages storage of a set of objects attached to a |
|
Methods
Adds a set to the manager. |
|
Removes and deletes all sets from the manager. |
|
Generates a unique title for a new set, which does not clash with any already contained by the manager. |
|
Reads the manager's state from a DOM element, restoring all sets present in the XML document. |
|
Removes the set with matching name from the manager. |
|
Renames a set in the manager from oldName to newName. |
|
Returns the set with a matching id, or an invalid set if no matching sets were found. |
|
Returns the set with a matching name, or an invalid set if no matching sets were found. |
|
Returns a list of all sets contained in the manager. |
|
Updates the definition of a set already in the manager. |
|
Returns a DOM element representing the state of the manager. |
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL |
|
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL |
|
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL |
|
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL |
|
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL |
|
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL |
- class qgis.core.QgsSelectiveMaskingSourceSetManager[source]¶
Bases:
QgsProjectStoredObjectManagerBase- __init__(project: QgsProject | None = None)
Constructor for QgsSelectiveMaskingSourceSetManager. The project will become the parent object for this manager.
- Parameters:
project (Optional[QgsProject] = None)
- addSet(self, set: QgsSelectiveMaskingSourceSet) bool[source]¶
Adds a
setto the manager.Returns
Trueif the addition was successful, orFalseif the set could not be added (eg as a result of a duplicate set name).See also
See also
- Parameters:
- Return type:
bool
- signal changed[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- generateUniqueTitle(self) str[source]¶
Generates a unique title for a new set, which does not clash with any already contained by the manager.
- Return type:
str
- readXml(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) bool[source]¶
Reads the manager’s state from a DOM element, restoring all sets present in the XML document.
See also
- Parameters:
element (QDomElement)
doc (QDomDocument)
context (QgsReadWriteContext)
- Return type:
bool
- removeSet(self, name: str | None) bool[source]¶
Removes the set with matching
namefrom the manager.Returns
Trueif the removal was successful, orFalseif the removal failed (eg as a result of removing a set which is not contained in the manager).See also
See also
See also
See also
- Parameters:
name (Optional[str])
- Return type:
bool
- renameSet(self, oldName: str | None, newName: str | None) bool[source]¶
Renames a set in the manager from
oldNametonewName.Returns
Trueif the rename was successful, orFalseif it failed (eg no set existed with matching name, or a duplicate new name was used).
- signal setAboutToBeAdded[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal setAboutToBeRemoved[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal setAdded[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- setById(self, id: str | None) QgsSelectiveMaskingSourceSet[source]¶
Returns the set with a matching
id, or an invalid set if no matching sets were found.- Parameters:
id (Optional[str])
- Return type:
- setByName(self, name: str | None) QgsSelectiveMaskingSourceSet[source]¶
Returns the set with a matching
name, or an invalid set if no matching sets were found.- Parameters:
name (Optional[str])
- Return type:
- signal setRemoved[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal setRenamed[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- sets(self) list[QgsSelectiveMaskingSourceSet]¶
Returns a list of all sets contained in the manager.
- Return type:
- updateSet(self, set: QgsSelectiveMaskingSourceSet) bool[source]¶
Updates the definition of a
setalready in the manager.The definition of the existing set with matching ID will be replaced with the updated set.
- Parameters:
- Return type:
bool
- writeXml(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement[source]¶
Returns a DOM element representing the state of the manager.
See also
- Parameters:
doc (QDomDocument)
context (QgsReadWriteContext)
- Return type:
QDomElement