15 #ifndef QGSFEATUREREQUEST_H
16 #define QGSFEATUREREQUEST_H
70 SubsetOfAttributes = 2,
73 Q_DECLARE_FLAGS( Flags, Flag )
112 FilterType filterType()
const {
if ( mFilter == FilterNone && !mFilterRect.isNull() )
return FilterRect;
else return mFilter; }
173 const Flags&
flags()
const {
return mFlags; }
203 bool acceptFeature(
const QgsFeature& feature );
221 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureRequest::Flags )
233 virtual ~QgsAbstractFeatureSource();
243 void iteratorOpened( QgsAbstractFeatureIterator* it );
244 void iteratorClosed( QgsAbstractFeatureIterator* it );
251 #endif // QGSFEATUREREQUEST_H
Class for parsing and evaluation of expressions (formerly called "search strings").
QgsFeatureIds mFilterFids
Wrapper for iterator of features from vector data provider or vector layer.
const QgsSimplifyMethod & simplifyMethod() const
Get simplification method for geometries that will be fetched.
A rectangle specified with double values.
const Flags & flags() const
QgsSimplifyMethod mSimplifyMethod
QgsExpression * mFilterExpression
const QgsRectangle & filterRect() const
Get the rectangle from which features will be taken.
QgsExpressionContext * expressionContext()
Returns the expression context used to evaluate filter expressions.
const QgsFeatureIds & filterFids() const
Get feature IDs that should be fetched.
Container of fields for a vector layer.
const QgsAttributeList & subsetOfAttributes() const
Return the subset of attributes which at least need to be fetched.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QgsExpressionContext mExpressionContext
QSet< QgsAbstractFeatureIterator * > mActiveIterators
QgsFeatureRequest & disableFilter()
Disables filter conditions.
Internal feature iterator to be implemented within data providers.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
This class wraps a request for features to a vector layer (or directly its vector data provider)...
QList< int > QgsAttributeList
static const QString AllAttributes
A special attribute that if set matches all attributes.
Obsolete, will be ignored. If a filterRect is set it will be used anyway. Filter using a rectangle...
FilterType filterType() const
Return the filter type which is currently set on this request.
Base class that can be used for any class that is capable of returning features.
const QgsFeatureId & filterFid() const
Get the feature ID that should be fetched.
FilterType
Types of filters.
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
Helper template that cares of two things: 1.
QgsExpression * filterExpression() const
Returns the filter expression if set.