25 const QString expr = mFilters[layer->
id()];
26 if ( !expr.isEmpty() )
41 result->mFilters = mFilters;
47 mFilters[layer->
id()] = filter.
dump();
Handles parsing and evaluation of expressions (formerly called "search strings").
QString dump() const
Returns an expression string, constructed from the internal abstract syntax tree.
Abstract interface for use by classes that filter the features or attributes of a layer.
void setFilter(const QgsVectorLayer *layer, const QgsExpression &expression)
Set a filter for the given layer.
QgsFeatureFilter()=default
Constructor.
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.
void filterFeatures(const QgsVectorLayer *layer, QgsFeatureRequest &filterFeatures) const override
Add additional filters to the feature request to further restrict the features returned by the reques...
QgsFeatureFilterProvider * clone() const override
Create a clone of the feature filter provider.
Wraps a request for features to a vector layer (or directly its vector data provider).
Represents a vector layer which manages a vector based dataset.