7 #include "DlgValidatorAboveZero.h" 9 #include <QDoubleValidator> 17 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgValidatorAboveZero::DlgValidatorAboveZero";
24 QDoubleValidator validator;
25 validator.setLocale (m_locale);
26 QValidator::State state = validator.validate (input,
28 if (state == QValidator::Acceptable) {
30 if (m_locale.toDouble (input) <= 0.0) {
33 state = QValidator::Invalid;
virtual QValidator::State validate(QString &input, int &pos) const
Apply the standard validation with 0 as the exclusive minimum. Call setCoordScale just before calling...
Abstract validator for all numeric formats.
DlgValidatorAboveZero(const QLocale &locale, QObject *parent=0)
Single constructor.