15 #ifndef QGSFEATUREREQUEST_H 16 #define QGSFEATUREREQUEST_H 70 SubsetOfAttributes = 2,
73 Q_DECLARE_FLAGS( Flags,
Flag )
140 bool ascending()
const;
145 void setAscending(
bool ascending );
151 bool nullsFirst()
const;
156 void setNullsFirst(
bool nullsFirst );
218 QString CORE_EXPORT dump()
const;
246 FilterType filterType()
const {
if ( mFilter == FilterNone && !mFilterRect.isNull() )
return FilterRect;
else return mFilter; }
360 long limit()
const {
return mLimit; }
364 const Flags&
flags()
const {
return mFlags; }
394 bool acceptFeature(
const QgsFeature& feature );
413 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureRequest::Flags )
425 virtual ~QgsAbstractFeatureSource();
435 void iteratorOpened( QgsAbstractFeatureIterator* it );
436 void iteratorClosed( QgsAbstractFeatureIterator* it );
443 #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
QgsFeatureId filterFid() const
Get the feature ID that should be fetched.
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.
long limit() const
Returns the maximum number of features to request, or -1 if no limit set.
The OrderByClause class represents an order by clause for a QgsFeatureRequest.
FilterType
Types of filters.
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
CORE_EXPORT OrderBy()
Create a new empty order by.
Represents a list of OrderByClauses, with the most important first and the least important last...
Helper template that cares of two things: 1.
QgsExpression * filterExpression() const
Returns the filter expression if set.