Class: QgsFeatureFilterProvider

class qgis.core.QgsFeatureFilterProvider

Bases: sip.wrapper

Abstract interface for use by classes that filter the features or attributes of a layer.

A QgsFeatureFilterProvider provides a method for modifying a QgsFeatureRequest in place to apply additional filters to the request, since QGIS 3.18 a method to filter allowed attributes is also available.

New in version 2.14:

Methods

clone

Create a clone of the feature filter provider

filterFeatures

Add additional filters to the feature request to further restrict the features returned by the request.

layerAttributes

Returns the list of visible attribute names from a list of attributes names for the given layer

clone(self) QgsFeatureFilterProvider

Create a clone of the feature filter provider

Return type:

QgsFeatureFilterProvider

Returns:

a new clone

filterFeatures(self, layer: QgsVectorLayer, featureRequest: QgsFeatureRequest)

Add additional filters to the feature request to further restrict the features returned by the request. Derived classes must implement this method.

Parameters:
layerAttributes(self, layer: QgsVectorLayer, attributes: Iterable[str]) List[str]

Returns the list of visible attribute names from a list of attributes names for the given layer

New in version 3.18.

Parameters:
Return type:

List[str]