Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
TestTransformation.h
1 #ifndef TEST_TRANSFORMATION_H
2 #define TEST_TRANSFORMATION_H
3 
4 #include "DocumentModelCoords.h"
5 #include <QObject>
6 #include <QPointF>
7 
9 class TestTransformation : public QObject
10 {
11  Q_OBJECT
12 public:
14  explicit TestTransformation(QObject *parent = 0);
15 
16 private slots:
17  void cleanupTestCase ();
18  void initTestCase ();
19 
20  void testCartesianLinearLinear ();
21  void testCartesianLinearLog ();
22  void testCartesianLogLinear ();
23  void testCartesianLogLog ();
24  void testPolarLinear ();
25  void testPolarLogOffset1 ();
26  void testPolarLogOffset10 ();
27 
28 private:
29  DocumentModelCoords modelCoordsDefault() const;
30 
31  double differenceMagnitude (const QPointF &vector1,
32  const QPointF &vector2) const;
33  void initTransformation (const QPointF &s0,
34  const QPointF &s1,
35  const QPointF &s2,
36  const QPointF &g0,
37  const QPointF &g1,
38  const QPointF &g2,
39  const DocumentModelCoords &modelCoords);
40 
41  QPointF m_g0Transformed;
42  QPointF m_g1Transformed;
43  QPointF m_g2Transformed;
44  QPointF m_s0Transformed;
45  QPointF m_s1Transformed;
46  QPointF m_s2Transformed;
47 };
48 
49 #endif // TEST_TRANSFORMATION_H
TestTransformation(QObject *parent=0)
Single constructor.
Unit test of transformation class. Checking mostly involves verifying forward/reverse are inverses of...
Model for DlgSettingsCoords and CmdSettingsCoords.