20 #ifndef QGSLONGLONGVALIDATOR_H 21 #define QGSLONGLONGVALIDATOR_H 37 , b( std::numeric_limits<qint64>::
min() )
38 , t( std::numeric_limits<qint64>::
max() )
61 if ( input ==
"-" || input ==
"+" )
70 if ( entered >= b && entered <= t )
77 return ( entered > t && -entered < b ) ? Invalid : Intermediate;
81 return ( entered < b ) ? Invalid : Intermediate;
86 void setTop( qint64 top ) { t = top; }
88 virtual void setRange( qint64 bottom, qint64 top )
95 qint64
top()
const {
return t; }
104 #endif // QGSLONGLONGVALIDATOR_H
virtual void setRange(qint64 bottom, qint64 top)
void setBottom(qint64 bottom)
double ANALYSIS_EXPORT max(double x, double y)
Returns the maximum of two doubles or the first argument if both are equal.
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QgsLongLongValidator(QObject *parent)
QValidator::State validate(QString &input, int &) const override
double ANALYSIS_EXPORT min(double x, double y)
Returns the minimum of two doubles or the first argument if both are equal.
QgsLongLongValidator(qint64 bottom, qint64 top, QObject *parent)
qlonglong toLongLong(bool *ok, int base) const