20 #ifndef QGSLONGLONGVALIDATOR_H 21 #define QGSLONGLONGVALIDATOR_H 34 , b( std::numeric_limits<qint64>::
min() )
35 , t( std::numeric_limits<qint64>::
max() )
58 if ( input ==
"-" || input ==
"+" )
67 if ( entered >= b && entered <= t )
74 return ( entered > t && -entered < b ) ? Invalid : Intermediate;
78 return ( entered < b ) ? Invalid : Intermediate;
83 void setTop( qint64 top ) { t = top; }
85 virtual void setRange( qint64 bottom, qint64 top )
92 qint64
top()
const {
return t; }
101 #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