18#ifndef QGSAGGREGATECALCULATOR_H
19#define QGSAGGREGATECALCULATOR_H
108 void setParameters(
const AggregateParameters ¶meters );
115 void setFilter(
const QString &filterExpression ) { mFilterExpression = filterExpression; }
129 QString
filter()
const {
return mFilterExpression; }
136 void setDelimiter(
const QString &delimiter ) { mDelimiter = delimiter; }
155 QVariant calculate(
Qgis::Aggregate aggregate,
const QString &fieldOrExpression,
164 static Qgis::Aggregate stringToAggregate(
const QString &
string,
bool *ok =
nullptr );
177 static QList< QgsAggregateCalculator::AggregateInfo > aggregates();
185 QString mFilterExpression;
197 bool mFidsSet =
false;
199 mutable QString mLastError;
220 const QString &delimiter,
Statistic
Available generic statistics.
StringStatistic
Available string statistics.
Aggregate
Available aggregates to calculate.
DateTimeStatistic
Available date/time statistics.
Utility class for calculating aggregates for a field (or expression) over the features from a vector ...
void setFilter(const QString &filterExpression)
Sets a filter to limit the features used during the aggregate calculation.
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.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Class for 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 data sets.
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.