25 const QString expr = mFilters[layer->
id()];
26 if ( !expr.isEmpty() )
41 result->mFilters = mFilters;
47 mFilters[layer->
id()] = filter.
dump();
Class for 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
Filter the features of the layer.
QgsFeatureFilterProvider * clone() const override
Returns a clone of the object.
This class wraps a request for features to a vector layer (or directly its vector data provider).
QString id() const
Returns the layer's unique ID, which is used to access this layer from QgsProject.
Represents a vector layer which manages a vector based data sets.