16 #ifndef QGSEXPRESSIONSORTER_H 17 #define QGSEXPRESSIONSORTER_H 23 class QgsExpressionSorter
27 : mPreparedOrderBys( preparedOrderBys )
57 case QVariant::LongLong:
58 case QVariant::ULongLong:
66 case QVariant::Double:
90 case QVariant::DateTime:
142 indexedFeatures.
append( indexedFeature );
145 delete expressionContext->
popScope();
147 qSort( indexedFeatures.
begin(), indexedFeatures.
end(), *this );
162 #endif // QGSEXPRESSIONSORTER_H qlonglong toLongLong(bool *ok) const
bool nullsFirst() const
Set if NULLS should be returned first.
Q_DECL_DEPRECATED QVariant evaluate(const QgsFeature *f)
Evaluate the feature and return the result.
bool ascending() const
Order ascending.
int localeAwareCompare(const QString &other) const
void append(const T &value)
void setFeature(const QgsFeature &feature)
Convenience function for setting a feature for the context.
QDateTime toDateTime() const
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QString tr(const char *sourceText, const char *disambiguation, int n)
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
Compare two doubles (but allow some difference)
void append(const T &value)
Temporarily used structure to cache order by information.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Single scope for storing variables and functions for use within a QgsExpressionContext.
The OrderByClause class represents an order by clause for a QgsFeatureRequest.
const T & at(int i) const
QgsExpression expression() const
The expression.
void appendScope(QgsExpressionContextScope *scope)
Appends a scope to the end of the context.
QVector< QVariant > mIndexes
void replace(int i, const T &value)
double toDouble(bool *ok) const
QgsExpressionContextScope * popScope()
Removes the last scope from the expression context and return it.