Class: QgsFeatureFilter

class qgis.server.QgsFeatureFilter

Bases: qgis._core.QgsFeatureFilterProvider

Constructor

QgsFeatureFilter(QgsFeatureFilter)

A feature filter provider allowing to set filter expressions on a per-layer basis.

New in version 3.0: Enums

Methods

clone Returns a clone of the object
filterFeatures Filter the features of the layer
setFilter Set a filter for the given layer.

Signals

Attributes

clone(self) → QgsFeatureFilterProvider

Returns a clone of the object

Returns:A clone
filterFeatures(self, layer: QgsVectorLayer, filterFeatures: QgsFeatureRequest)

Filter the features of the layer

Parameters:
  • layer – the layer to control
  • filterFeatures – the request to fill
setFilter(self, layer: QgsVectorLayer, expression: QgsExpression)

Set a filter for the given layer.

Parameters:
  • layer – the layer to filter
  • expression – the filter expression