1 #include "DlgValidatorNumber.h"
7 m_coordScale (coordScale)
9 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgValidatorNumber::DlgValidatorNumber";
16 QValidator::State state = QDoubleValidator::validate (input,
18 if (state == QValidator::Acceptable) {
20 if (m_coordScale == COORD_SCALE_LOG) {
21 if (input.toDouble () < 0.0) {
24 state = QValidator::Invalid;
26 }
if (input.toDouble () == 0.0) {
29 state = QValidator::Intermediate;
DlgValidatorNumber(CoordScale coordScale, QObject *parent=0)
Single constructor.
Abstract validator for all numeric formats.
virtual QValidator::State validate(QString &input, int &pos) const
Apply the standard validation with 0 as the exclusive minimum. Call setCoordScale just before calling...