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