25 const QString expr = mFilters[layer->
id()];
26 if ( !expr.isEmpty() )
35 result->mFilters = mFilters;
41 mFilters[layer->
id()] = filter.
dump();
Class for parsing and evaluation of expressions (formerly called "search strings").
void filterFeatures(const QgsVectorLayer *layer, QgsFeatureRequest &filterFeatures) const override
Filter the features of the layer.
QString dump() const
Returns an expression string, constructed from the internal abstract syntax tree. ...
QgsFeatureRequest & setFilterExpression(const QString &expression)
Set the filter expression.
QString id() const
Returns the layer's unique ID, which is used to access this layer from QgsProject.
void setFilter(const QgsVectorLayer *layer, const QgsExpression &expression)
Set a filter for the given layer.
This class wraps a request for features to a vector layer (or directly its vector data provider)...
Abstract interface for use by classes that filter the features of a layer.
QgsFeatureFilterProvider * clone() const override
Returns a clone of the object.
QgsFeatureFilter()=default
Constructor.
Represents a vector layer which manages a vector based data sets.