QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
15 #ifndef QGSFEATUREFILTERMODEL_H
16 #define QGSFEATUREFILTERMODEL_H
37 Q_PROPERTY( QStringList identifierFields READ identifierFields WRITE setIdentifierFields NOTIFY identifierFieldsChanged )
42 Q_PROPERTY( QVariantList extraIdentifierValues READ extraIdentifierValues WRITE setExtraIdentifierValues NOTIFY extraIdentifierValuesChanged )
57 Q_DECL_DEPRECATED QString identifierField()
const;
64 QStringList identifierFields()
const;
72 void setIdentifierFields(
const QStringList &identifierFields );
86 QVariantList extraIdentifierValues()
const;
93 void setExtraIdentifierValues(
const QVariantList &extraIdentifierValues );
117 QVariant
entryIdentifier(
const QgsFeatureExpressionValuesGatherer::Entry &entry )
const override;
119 QgsFeatureExpressionValuesGatherer::Entry
createEntry(
const QVariant &identifier )
const override;
121 bool compareEntries(
const QgsFeatureExpressionValuesGatherer::Entry &a,
const QgsFeatureExpressionValuesGatherer::Entry &b )
const override;
127 QStringList mIdentifierFields;
130 #endif // QGSFEATUREFILTERMODEL_H
virtual QVariant nullIdentifier() const =0
Returns a null identifier.
virtual bool compareEntries(const QgsFeatureExpressionValuesGatherer::Entry &a, const QgsFeatureExpressionValuesGatherer::Entry &b) const =0
Returns true if the 2 entries refers to the same feature.
Provides a list of features based on filter conditions.
virtual bool identifierIsNull(const QVariant &identifier) const =0
Returns true if the entry is null The identifier can be either the feature ID or the list of identifi...
Provides a list of features based on filter conditions.
This class wraps a request for features to a vector layer (or directly its vector data provider).
virtual QgsFeatureExpressionValuesGatherer::Entry createEntry(const QVariant &identifier) const =0
Creates an entry with just the identifier so the feature can be retrieved in a next iteration.
void identifierFieldsChanged()
The identifier field should be a unique field that can be used to identify individual features.
virtual QSet< QString > requestedAttributes() const
Returns the attributes to be fetched in the request.
virtual void requestToReloadCurrentFeature(QgsFeatureRequest &request)=0
Update the request to match the current feature to be reloaded.
void extraIdentifierValuesChanged()
Allows specifying one value that does not need to match the filter criteria but will still be availab...
virtual QVariant entryIdentifier(const QgsFeatureExpressionValuesGatherer::Entry &entry) const =0
Returns the identifier of the given entry.
virtual QgsFeatureExpressionValuesGatherer * createValuesGatherer(const QgsFeatureRequest &request) const =0
Creates the value gatherer.
virtual void setExtraIdentifierValueToNull()=0
Allows specifying one value that does not need to match the filter criteria but will still be availab...