Engauge Digitizer  2
TestValidators.h
1 #ifndef TEST_VALIDATORS_H
2 #define TEST_VALIDATORS_H
3 
4 #include "DlgValidatorDateTime.h"
5 #include "DlgValidatorDegreesMinutesSeconds.h"
6 #include "DlgValidatorNumber.h"
7 #include <QObject>
8 
10 class TestValidators : public QObject
11 {
12  Q_OBJECT
13 public:
15  explicit TestValidators(QObject *parent = 0);
16 
17 signals:
18 
19 private slots:
20  void cleanupTestCase ();
21  void initTestCase ();
22 
23  void testDateTimeDate ();
24  void testDateTimeDateTime ();
25  void testDateTimeDateTimePm ();
26  void testDateTimeTime ();
27  void testDegreesMinutesSecondsDegrees ();
28  void testDegreesMinutesSecondsDegreesMinutes ();
29  void testDegreesMinutesSecondsDegreesMinutesSeconds ();
30  void testNumberInteger ();
31  void testNumberReal ();
32  void testNumberRealBad ();
33 
34 private:
35 
36  bool stateDateTime (const QString &string,
37  QValidator::State expectedState);
38  bool stateDegreesMinutesSeconds (const QString &string,
39  QValidator::State expectedState);
40  bool stateNumber (const QString &string,
41  QValidator::State expectedState);
42 
43  DlgValidatorDateTime *m_validatorDateTime;
44  DlgValidatorDegreesMinutesSeconds *m_validatorDegreesMinutesSeconds;
45  DlgValidatorNumber *m_validatorNumber;
46 };
47 
48 #endif // TEST_VALIDATORS_H
Validator for numeric value expressed as date and/or time.
TestValidators(QObject *parent=0)
Single constructor.
Validator for angles in real degrees, integer degrees and real minutes, or integer degrees with integ...
Unit tests of validators.
Validator for generic (=simple) numbers.