16 #ifndef QGSSTRINGSTATISTICALSUMMARY_H 17 #define QGSSTRINGSTATISTICALSUMMARY_H 20 #include <QVariantList> 54 All = Count | CountDistinct | CountMissing | Min | Max,
93 void calculateFromVariants(
const QVariantList& values );
108 void addString(
const QString&
string );
122 void addValue(
const QVariant& value );
138 int count()
const {
return mCount; }
177 Statistics mStatistics;
187 void testString(
const QString&
string );
190 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsStringStatisticalSummary::Statistics )
192 #endif // QGSSTRINGSTATISTICALSUMMARY_H int maxLength() const
Returns the maximum length of strings.
Statistics statistics() const
Returns flags which specify which statistics will be calculated.
Statistic
Enumeration of flags that specify statistics to be calculated.
int countMissing() const
Returns the number of missing (null) string values.
QString min() const
Returns the minimum (non-null) string value.
int count() const
Returns the calculated count of values.
int minLength() const
Returns the minimum length of strings.
QSet< QString > distinctValues() const
Returns the set of distinct string values.
int countDistinct() const
Returns the number of distinct string values.
Calculator for summary statistics and aggregates for a list of strings.
QString max() const
Returns the maximum (non-null) string value.
void setStatistics(const Statistics &stats)
Sets flags which specify which statistics will be calculated.