1 /* 2 * Copyright (C) 2007 Boudewijn Rempt <boud@kde.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef KISPRESCALED_PROJECTION_TEST_H 20 #define KISPRESCALED_PROJECTION_TEST_H 21 22 #include <QtTest> 23 24 25 class KisPrescaledProjection; 26 class KoZoomHandler; 27 class QString; 28 29 class KisPrescaledProjectionTest : public QObject 30 { 31 Q_OBJECT 32 33 private: 34 35 /** 36 * test the projection through a normal, but complicated scenario. 37 * The prefix is used to save the result qimages and compare them 38 * to the prepared correct images. 39 */ 40 bool testProjectionScenario(KisPrescaledProjection & projection, KoZoomHandler * viewConverter, const QString & name); 41 42 private Q_SLOTS: 43 44 void testCreation(); 45 46 // Doesn't fail yet, but at least writes out several versions 47 // of a scaled image. Make them compare with the results when 48 // we're done and have everything okay for regressions 49 void testScalingUndeferredSmoothingPixelForPixel(); 50 51 void testScalingUndeferredSmoothing(); 52 53 void benchmarkUpdate(); 54 55 void testScrollingZoom100(); 56 void testScrollingZoom50(); 57 void testUpdates(); 58 59 void testQtScaling(); 60 }; 61 62 #endif 63 64