QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsFeatureFilterProvider Class Referenceabstract

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

#include <qgsfeaturefilterprovider.h>

Inheritance diagram for QgsFeatureFilterProvider:
Inheritance graph
[legend]

Public Member Functions

 QgsFeatureFilterProvider ()=default
 
virtual ~QgsFeatureFilterProvider ()=default
 
virtual QgsFeatureFilterProviderclone () const =0
 Create a clone of the feature filter provider.
 
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.
 
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.
 

Detailed Description

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.

Definition at line 41 of file qgsfeaturefilterprovider.h.

Constructor & Destructor Documentation

◆ QgsFeatureFilterProvider()

QgsFeatureFilterProvider::QgsFeatureFilterProvider ( )
default

◆ ~QgsFeatureFilterProvider()

virtual QgsFeatureFilterProvider::~QgsFeatureFilterProvider ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual QgsFeatureFilterProvider * QgsFeatureFilterProvider::clone ( ) const
pure virtual

Create a clone of the feature filter provider.

Returns
a new clone

Implemented in QgsAccessControl, QgsDimensionFilter, QgsFeatureFilter, and QgsFeatureFilterProviderGroup.

◆ filterFeatures()

virtual void QgsFeatureFilterProvider::filterFeatures ( const QgsVectorLayer layer,
QgsFeatureRequest featureRequest 
) const
pure virtual

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

Derived classes must implement this method.

Parameters
layerthe layer to filter
featureRequestthe feature request to update

Implemented in QgsAccessControl, QgsDimensionFilter, QgsFeatureFilter, and QgsFeatureFilterProviderGroup.

◆ layerAttributes()

virtual QStringList QgsFeatureFilterProvider::layerAttributes ( const QgsVectorLayer layer,
const QStringList &  attributes 
) const
pure virtual

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

Since
QGIS 3.18

Implemented in QgsAccessControl, QgsDimensionFilter, QgsFeatureFilter, and QgsFeatureFilterProviderGroup.


The documentation for this class was generated from the following file: