18#ifndef QGSAGGREGATECALCULATOR_H
19#define QGSAGGREGATECALCULATOR_H
106 void setParameters(
const AggregateParameters ¶meters );
113 void setFilter(
const QString &filterExpression ) { mFilterExpression = filterExpression; }
127 QString
filter()
const {
return mFilterExpression; }
161 static Qgis::Aggregate stringToAggregate(
const QString &
string,
bool *ok =
nullptr );
174 static QList< QgsAggregateCalculator::AggregateInfo > aggregates();
181 QString mFilterExpression;
193 bool mFidsSet =
false;
195 mutable QString mLastError;
210 static QVariant calculate(
213 QMetaType::Type resultType,
216 const QString &delimiter,
219 QString *error =
nullptr
Statistic
Available generic statistics.
StringStatistic
Available string statistics.
Aggregate
Available aggregates to calculate.
DateTimeStatistic
Available date/time statistics.
void setFilter(const QString &filterExpression)
Sets a filter to limit the features used during the aggregate calculation.
const QgsVectorLayer * layer() const
Returns the associated vector layer.
void setDelimiter(const QString &delimiter)
Sets the delimiter to use for joining values with the StringConcatenate aggregate.
QString lastError() const
Returns the last error encountered during the aggregate calculation.
QString filter() const
Returns the filter which limits the features used during the aggregate calculation.
QString delimiter() const
Returns the delimiter used for joining values with the StringConcatenate aggregate.
QgsAggregateCalculator(const QgsVectorLayer *layer)
Constructor for QgsAggregateCalculator.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Handles parsing and evaluation of expressions (formerly called "search strings").
Wrapper for iterator of features from vector data provider or vector layer.
Represents a list of OrderByClauses, with the most important first and the least important last.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Represents a vector layer which manages a vector based dataset.
QSet< QgsFeatureId > QgsFeatureIds
Structured information about the available aggregates.
QString name
A translated, human readable name.
QString function
The expression function.
QSet< QMetaType::Type > supportedTypes
This aggregate function can only be used with these datatypes.
A bundle of parameters controlling aggregate calculation.
QString filter
Optional filter for calculating aggregate over a subset of features, or an empty string to use all fe...
QString delimiter
Delimiter to use for joining values with the StringConcatenate aggregate.
QgsFeatureRequest::OrderBy orderBy
Optional order by clauses.