QGIS API Documentation
3.6.0-Noosa (5873452)
|
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 cannot be copied. More... | |
~QgsValidityCheckRegistry () | |
void | addCheck (QgsAbstractValidityCheck *check) |
Adds a check to the registry. More... | |
QList< const QgsAbstractValidityCheck * > | checks () const |
Returns the list of available checks. More... | |
QList< const QgsAbstractValidityCheck * > | checks (int type) const |
Returns the list of all available checks of the matching type. More... | |
QgsValidityCheckRegistry & | operator= (const QgsValidityCheckRegistry &rh)=delete |
QgsValidityCheckRegistry cannot be copied. More... | |
void | removeCheck (QgsAbstractValidityCheck *check) |
Removes a check from the registry. More... | |
QList< QgsValidityCheckResult > | runChecks (int type, const QgsValidityCheckContext *context, QgsFeedback *feedback) const |
Runs all checks of the specified type and returns a list of results. More... | |
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 |
QgsValidityCheckRegistry cannot be copied.
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 |
QgsValidityCheckRegistry cannot be copied.
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 cancelation 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.