QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
|
This class keeps a list of QgsAbstractValidityCheck checks which can be used when performing validity checks. More...
#include <qgsvaliditycheckregistry.h>
Public Member Functions | |
QgsValidityCheckRegistry () | |
QgsValidityCheckRegistry (const QgsValidityCheckRegistry &rh)=delete | |
~QgsValidityCheckRegistry () | |
void | addCheck (QgsAbstractValidityCheck *check) |
Adds a check to the registry. | |
QList< const QgsAbstractValidityCheck * > | checks () const |
Returns the list of available checks. | |
QList< const QgsAbstractValidityCheck * > | checks (int type) const |
Returns the list of all available checks of the matching type. | |
QgsValidityCheckRegistry & | operator= (const QgsValidityCheckRegistry &rh)=delete |
void | removeCheck (QgsAbstractValidityCheck *check) |
Removes a check from the registry. | |
QList< QgsValidityCheckResult > | runChecks (int type, const QgsValidityCheckContext *context, QgsFeedback *feedback) const |
Runs all checks of the specified type and returns a list of results. | |
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().
Definition at line 36 of file qgsvaliditycheckregistry.h.
QgsValidityCheckRegistry::QgsValidityCheckRegistry | ( | ) |
Definition at line 19 of file qgsvaliditycheckregistry.cpp.
QgsValidityCheckRegistry::~QgsValidityCheckRegistry | ( | ) |
Definition at line 23 of file qgsvaliditycheckregistry.cpp.
|
delete |
void QgsValidityCheckRegistry::addCheck | ( | QgsAbstractValidityCheck * | check | ) |
Adds a check to the registry.
Ownership of the check is transferred to the registry.
Definition at line 50 of file qgsvaliditycheckregistry.cpp.
QList< const QgsAbstractValidityCheck * > QgsValidityCheckRegistry::checks | ( | ) | const |
Returns the list of available checks.
Definition at line 28 of file qgsvaliditycheckregistry.cpp.
QList< const QgsAbstractValidityCheck * > QgsValidityCheckRegistry::checks | ( | int | type | ) | const |
Returns the list of all available checks of the matching type.
Definition at line 39 of file qgsvaliditycheckregistry.cpp.
|
delete |
void QgsValidityCheckRegistry::removeCheck | ( | QgsAbstractValidityCheck * | check | ) |
Removes a check from the registry.
The check object is automatically deleted.
Definition at line 55 of file qgsvaliditycheckregistry.cpp.
QList< QgsValidityCheckResult > QgsValidityCheckRegistry::runChecks | ( | int | type, |
const QgsValidityCheckContext * | context, | ||
QgsFeedback * | feedback | ||
) | const |
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.
Definition at line 62 of file qgsvaliditycheckregistry.cpp.