Engauge Digitizer  2
DlgValidatorNumber.h
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef DLG_VALIDATOR_NUMBER_H
8 #define DLG_VALIDATOR_NUMBER_H
9 
10 #include "CoordScale.h"
11 #include "CoordUnitsNonPolarTheta.h"
12 #include "CoordUnitsPolarTheta.h"
13 #include "DlgValidatorAbstract.h"
14 #include <QLocale>
15 
18 {
19 public:
21  DlgValidatorNumber(CoordScale coordScale,
22  const QLocale &locale,
23  QObject *parent = 0);
24 
26  virtual QValidator::State validate (QString &input,
27  int &pos) const;
28 
29 private:
31 
32  const CoordScale m_coordScale;
33  const QLocale m_locale;
34 };
35 
36 #endif // DLG_VALIDATOR_NUMBER_H
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...
Validator for generic (=simple) numbers.