00001 #ifndef TEST_TRANSFORMATION_H
00002 #define TEST_TRANSFORMATION_H
00003
00004 #include "DocumentModelCoords.h"
00005 #include "DocumentModelGeneral.h"
00006 #include <QObject>
00007 #include <QPointF>
00008
00010 class TestTransformation : public QObject
00011 {
00012 Q_OBJECT
00013 public:
00015 explicit TestTransformation(QObject *parent = 0);
00016
00017 private slots:
00018 void cleanupTestCase ();
00019 void initTestCase ();
00020
00021 void testCartesianLinearLinear ();
00022 void testCartesianLinearLog ();
00023 void testCartesianLogLinear ();
00024 void testCartesianLogLog ();
00025 void testPolarLinear ();
00026 void testPolarLogOffset1 ();
00027 void testPolarLogOffset10 ();
00028
00029 private:
00030 DocumentModelCoords modelCoordsDefault() const;
00031 DocumentModelGeneral modelGeneralDefault() const;
00032
00033 double differenceMagnitude (const QPointF &vector1,
00034 const QPointF &vector2) const;
00035 void initTransformation (const QPointF &s0,
00036 const QPointF &s1,
00037 const QPointF &s2,
00038 const QPointF &g0,
00039 const QPointF &g1,
00040 const QPointF &g2,
00041 const DocumentModelCoords &modelCoords,
00042 const DocumentModelGeneral &modelGeneral);
00043
00044 QPointF m_g0Transformed;
00045 QPointF m_g1Transformed;
00046 QPointF m_g2Transformed;
00047 QPointF m_s0Transformed;
00048 QPointF m_s1Transformed;
00049 QPointF m_s2Transformed;
00050 };
00051
00052 #endif // TEST_TRANSFORMATION_H