16#ifndef QGSSTRINGSTATISTICALSUMMARY_H
17#define QGSSTRINGSTATISTICALSUMMARY_H
20#include <QVariantList>
79 void calculate(
const QStringList &values );
88 void calculateFromVariants(
const QVariantList &values );
104 void addString(
const QString &
string );
119 void addValue(
const QVariant &value );
138 int count()
const {
return mCount; }
150 QSet< QString > distinctValues()
const;
160 QString
min()
const {
return mMin; }
165 QString
max()
const {
return mMax; }
213 QMap< QString, int > mValues;
224 void testString(
const QString &
string );
QFlags< StringStatistic > StringStatistics
Statistics to be calculated for string values.
StringStatistic
Available string statistics.
Calculator for summary statistics and aggregates for a list of strings.
void setStatistics(Qgis::StringStatistics stats)
Sets flags which specify which statistics will be calculated.
QString max() const
Returns the maximum (non-null) string value.
QString min() const
Returns the minimum (non-null) string value.
int countMissing() const
Returns the number of missing (null) string values.
int count() const
Returns the calculated count of values.
int countDistinct() const
Returns the number of distinct string values.
int minLength() const
Returns the minimum length of strings.
int maxLength() const
Returns the maximum length of strings.
QString majority() const
Returns the most common string.
Qgis::StringStatistics statistics() const
Returns flags which specify which statistics will be calculated.
QString minority() const
Returns the least common string.
double meanLength() const
Returns the mean length of strings.