20#ifndef QGSDOUBLEVALIDATOR_H
21#define QGSDOUBLEVALIDATOR_H
29#include <QRegularExpressionValidator>
31class QRegularExpression;
101 QValidator::State
validate( QString &input,
int & )
const override SIP_SKIP;
107 QValidator::State
validate( QString &input )
const;
121 static double toDouble(
const QString &input );
152 double bottom()
const {
return mMinimum; }
158 double top()
const {
return mMaximum; }
A custom validator which allows entry of doubles in a locale-tolerant way.
static double toDouble(const QString &input, bool *ok)
Converts input string to double value.
QgsDoubleValidator(QObject *parent)
Constructor for QgsDoubleValidator.
double top() const
Returns top range limit.
virtual void setRange(double bottom, double top)
Set bottom and top range limits.
QValidator::State validate(QString &input, int &) const override
void setTop(double top)
Set top range limit.
void setMaxDecimals(int maxDecimals)
Sets the number of decimals accepted by the validator to maxDecimals.
double bottom() const
Returns top range limit.
void setBottom(double bottom)
Set top range limit.