QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
A feature filter provider allowing to set filter expressions on a per-layer basis. More...
#include <qgsfeaturefilter.h>
Public Member Functions | |
QgsFeatureFilter ()=default | |
Constructor. More... | |
QgsFeatureFilterProvider * | clone () const override |
Returns a clone of the object. More... | |
void | filterFeatures (const QgsVectorLayer *layer, QgsFeatureRequest &filterFeatures) const override |
Filter the features of the layer. More... | |
QStringList | layerAttributes (const QgsVectorLayer *layer, const QStringList &attributes) const override |
Returns the list of visible attribute names from a list of attributes names for the given layer. More... | |
void | setFilter (const QgsVectorLayer *layer, const QgsExpression &expression) |
Set a filter for the given layer. More... | |
Public Member Functions inherited from QgsFeatureFilterProvider | |
QgsFeatureFilterProvider ()=default | |
Constructor. More... | |
virtual | ~QgsFeatureFilterProvider ()=default |
virtual QgsFeatureFilterProvider * | clone () const =0 |
Create a clone of the feature filter provider. More... | |
virtual void | filterFeatures (const QgsVectorLayer *layer, QgsFeatureRequest &featureRequest) const =0 |
Add additional filters to the feature request to further restrict the features returned by the request. More... | |
virtual QStringList | layerAttributes (const QgsVectorLayer *layer, const QStringList &attributes) const =0 |
Returns the list of visible attribute names from a list of attributes names for the given layer. More... | |
A feature filter provider allowing to set filter expressions on a per-layer basis.
Definition at line 34 of file qgsfeaturefilter.h.
|
default |
Constructor.
|
overridevirtual |
Returns a clone of the object.
Implements QgsFeatureFilterProvider.
Definition at line 38 of file qgsfeaturefilter.cpp.
|
overridevirtual |
Filter the features of the layer.
layer | the layer to control |
filterFeatures | the request to fill |
Implements QgsFeatureFilterProvider.
Definition at line 23 of file qgsfeaturefilter.cpp.
|
overridevirtual |
Returns the list of visible attribute names from a list of attributes names for the given layer.
Implements QgsFeatureFilterProvider.
Definition at line 32 of file qgsfeaturefilter.cpp.
void QgsFeatureFilter::setFilter | ( | const QgsVectorLayer * | layer, |
const QgsExpression & | expression | ||
) |
Set a filter for the given layer.
layer | the layer to filter |
expression | the filter expression |
Definition at line 45 of file qgsfeaturefilter.cpp.