Class: QgsValidityCheckRegistry¶
-
class
qgis.core.
QgsValidityCheckRegistry
¶ Bases:
sip.wrapper
This class keeps a list of QgsAbstractValidityCheck checks which can be used when performing validity checks.
QgsValidityCheckRegistry is not usually directly created, but rather accessed through
QgsApplication.validityCheckRegistry()
New in version 3.6: Enums
Methods
Adds a
check
to the registry.Returns the list of available checks.
Removes a
check
from the registry.Runs all checks of the specified
type
and returns a list of results.Signals
Attributes
-
addCheck
(self, check: QgsAbstractValidityCheck)¶ Adds a
check
to the registry. Ownership of the check is transferred to the registry.
-
checks
(self) → object¶ Returns the list of available checks.
checks(self, type: int) -> List[QgsAbstractValidityCheck] Returns the list of all available checks of the matching
type
.
-
removeCheck
(self, check: QgsAbstractValidityCheck)¶ Removes a
check
from the registry. The check object is automatically deleted.
-
runChecks
(self, type: int, context: QgsValidityCheckContext, feedback: QgsFeedback) → List[QgsValidityCheckResult]¶ Runs all checks of the specified
type
and returns a list of results.If all checks are “passed” and no warnings or errors are generated, then an empty list will be returned.
The
context
argument gives the wider in which the check is being run.The
feedback
argument is used to give progress reports and to support cancellation of long-running checks.This is a blocking call, which will run all matching checks in the main thread and only return when they have all completed.
-