18 #ifndef QGSAGGREGATECALCULATOR_H 19 #define QGSAGGREGATECALCULATOR_H 21 #include "qgis_core.h" 87 StringConcatenateUnique
138 void setFilter(
const QString &filterExpression ) { mFilterExpression = filterExpression; }
152 QString
filter()
const {
return mFilterExpression; }
159 void setDelimiter(
const QString &delimiter ) { mDelimiter = delimiter; }
176 QVariant calculate(
Aggregate aggregate,
const QString &fieldOrExpression,
185 static Aggregate stringToAggregate(
const QString &
string,
bool *ok =
nullptr );
192 static QList< QgsAggregateCalculator::AggregateInfo > aggregates();
200 QString mFilterExpression;
212 bool mFidsSet =
false;
233 const QString &delimiter,
238 QVariant defaultValue(
Aggregate aggregate )
const;
241 #endif //QGSAGGREGATECALCULATOR_H Class for parsing and evaluation of expressions (formerly called "search strings").
Wrapper for iterator of features from vector data provider or vector layer.
Third quartile (numeric fields only)
Inter quartile range (IQR) (numeric fields only)
QSet< QgsFeatureId > QgsFeatureIds
Median of values (numeric fields only)
QSet< QVariant::Type > supportedTypes
This aggregate function can only be used with these datatypes.
void setDelimiter(const QString &delimiter)
Sets the delimiter to use for joining values with the StringConcatenate aggregate.
Statistic
Enumeration of flags that specify statistics to be calculated.
void setFilter(const QString &filterExpression)
Sets a filter to limit the features used during the aggregate calculation.
First quartile (numeric fields only)
Number of missing (null) values.
Statistic
Enumeration of flags that specify statistics to be calculated.
Utility class for calculating aggregates for a field (or expression) over the features from a vector ...
Structured information about the available aggregates.
Standard deviation of values (numeric fields only)
QString delimiter
Delimiter to use for joining values with the StringConcatenate aggregate.
Minimum length of string (string fields only)
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsFeatureRequest::OrderBy orderBy
Optional order by clauses.
QString name
A translated, human readable name.
Statistic
Enumeration of flags that specify statistics to be calculated.
Create an array of values.
QString filter() const
Returns the filter which limits the features used during the aggregate calculation.
Majority of values (numeric fields only)
Number of distinct values.
QString delimiter() const
Returns the delimiter used for joining values with the StringConcatenate aggregate.
Maximum length of string (string fields only)
QString filter
Optional filter for calculating aggregate over a subset of features, or an empty string to use all fe...
Mean of values (numeric fields only)
Create a multipart geometry from aggregated geometries.
Concatenate values with a joining string (string fields only). Specify the delimiter using setDelimit...
Minority of values (numeric fields only)
Represents a vector layer which manages a vector based data sets.
Range of values (max - min) (numeric and datetime fields only)
Sample standard deviation of values (numeric fields only)
Aggregate
Available aggregates to calculate.
Represents a list of OrderByClauses, with the most important first and the least important last...
A bundle of parameters controlling aggregate calculation.