Class: QgsFeatureFilterProvider¶
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.
Class Hierarchy¶
Subclasses¶
A helper class that centralizes restrictions given by all the access control filter plugins.  | 
|
A feature filter provider allowing to set filter expressions on a per-layer basis.  | 
|
A filter filter provider grouping several filter providers.  | 
Methods
Create a clone of the feature filter provider  | 
|
Add additional filters to the feature request to further restrict the features returned by the request.  | 
|
Returns the list of visible attribute names from a list of attributes names for the given layer  | 
- class qgis.core.QgsFeatureFilterProvider[source]¶
 Bases:
object- clone(self) QgsFeatureFilterProvider | None[source]¶
 Create a clone of the feature filter provider
- Return type:
 Optional[QgsFeatureFilterProvider]
- Returns:
 a new clone
- filterFeatures(self, layer: QgsVectorLayer | None, featureRequest: QgsFeatureRequest)[source]¶
 Add additional filters to the feature request to further restrict the features returned by the request. Derived classes must implement this method.
- Parameters:
 layer (Optional[QgsVectorLayer]) – the layer to filter
featureRequest (QgsFeatureRequest) – the feature request to update
- layerAttributes(self, layer: QgsVectorLayer | None, attributes: Iterable[str | None]) List[str][source]¶
 Returns the list of visible attribute names from a list of
attributesnames for the givenlayerAdded in version 3.18.
- Parameters:
 layer (Optional[QgsVectorLayer])
attributes (Iterable[Optional[str]])
- Return type:
 List[str]