23 qDeleteAll( mGeometryCheckFactories );
37 QList<QgsGeometryCheckFactory *> factories;
40 if ( factory->checkType() == type && ( factory->flags() & flags ) == flags && factory->isCompatible( layer ) )
48 mGeometryCheckFactories.insert( checkFactory->
id(), checkFactory );
Base configuration for geometry checks.
A factory for geometry checks.
virtual QgsGeometryCheck * createGeometryCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration) const =0
Creates a new geometry check with context and configuration.
virtual QString id() const =0
The unique id for this geometry check.
QgsGeometryCheck * geometryCheck(const QString &checkId, QgsGeometryCheckContext *context, const QVariantMap &geometryCheckConfig)
Create a new geometryCheck of type checkId Pass the context and geometryCheckConfiguration to the new...
void registerGeometryCheck(QgsGeometryCheckFactory *checkFactory)
Registers a new geometry check factory.
~QgsGeometryCheckRegistry()
Destructor.
QList< QgsGeometryCheckFactory * > geometryCheckFactories(QgsVectorLayer *layer, QgsGeometryCheck::CheckType type, QgsGeometryCheck::Flags flags=QgsGeometryCheck::Flags()) const
Returns all geometry check factories that are compatible with layer and have all of the flags set.
This class implements a geometry check.
CheckType
The type of a check.
Represents a vector layer which manages a vector based data sets.