diff options
Diffstat (limited to 'krita/plugins/viewplugins/performancetest')
5 files changed, 308 insertions, 306 deletions
diff --git a/krita/plugins/viewplugins/performancetest/dlg_perftest.cc b/krita/plugins/viewplugins/performancetest/dlg_perftest.cc index 1d9a045e..f65507b6 100644 --- a/krita/plugins/viewplugins/performancetest/dlg_perftest.cc +++ b/krita/plugins/viewplugins/performancetest/dlg_perftest.cc @@ -26,10 +26,10 @@ using namespace std; -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <klocale.h> #include <knuminput.h> @@ -39,9 +39,9 @@ using namespace std; #include "wdg_perftest.h" -DlgPerfTest::DlgPerfTest( QWidget * parent, +DlgPerfTest::DlgPerfTest( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Performance Test"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Performance Test"), Ok | Cancel, Ok) { m_lock = false; @@ -49,13 +49,13 @@ DlgPerfTest::DlgPerfTest( QWidget * parent, Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); - connect(m_page->btnSelectAll, SIGNAL(clicked()), this, SLOT(selectAllClicked())); - connect(m_page->btnDeselectAll, SIGNAL(clicked()), this, SLOT(deselectAllClicked())); + connect(m_page->btnSelectAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectAllClicked())); + connect(m_page->btnDeselectAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(deselectAllClicked())); } DlgPerfTest::~DlgPerfTest() diff --git a/krita/plugins/viewplugins/performancetest/dlg_perftest.h b/krita/plugins/viewplugins/performancetest/dlg_perftest.h index 7cb4f159..39f5cb41 100644 --- a/krita/plugins/viewplugins/performancetest/dlg_perftest.h +++ b/krita/plugins/viewplugins/performancetest/dlg_perftest.h @@ -27,10 +27,11 @@ class WdgPerfTest; class DlgPerfTest: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgPerfTest(QWidget * parent = 0, + DlgPerfTest(TQWidget * tqparent = 0, const char* name = 0); ~DlgPerfTest(); diff --git a/krita/plugins/viewplugins/performancetest/perftest.cc b/krita/plugins/viewplugins/performancetest/perftest.cc index 1c5ede34..2380037a 100644 --- a/krita/plugins/viewplugins/performancetest/perftest.cc +++ b/krita/plugins/viewplugins/performancetest/perftest.cc @@ -22,13 +22,13 @@ #include <stdlib.h> -#include <qslider.h> -#include <qpoint.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qtextedit.h> -#include <qdatetime.h> +#include <tqslider.h> +#include <tqpoint.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqtextedit.h> +#include <tqdatetime.h> #include <klocale.h> #include <kiconloader.h> @@ -41,7 +41,7 @@ #include <kgenericfactory.h> #include <knuminput.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_meta_registry.h" #include <kis_resourceserver.h> @@ -78,17 +78,17 @@ typedef KGenericFactory<PerfTest> PerfTestFactory; K_EXPORT_COMPONENT_FACTORY( kritaperftest, PerfTestFactory( "krita" ) ) -PerfTest::PerfTest(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +PerfTest::PerfTest(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(PerfTestFactory::instance()); setXMLFile(locate("data","kritaplugins/perftest.rc"), true); - (void) new KAction(i18n("&Performance Test..."), 0, 0, this, SLOT(slotPerfTest()), actionCollection(), "perf_test"); + (void) new KAction(i18n("&Performance Test..."), 0, 0, this, TQT_SLOT(slotPerfTest()), actionCollection(), "perf_test"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; } } @@ -108,111 +108,111 @@ void PerfTest::slotPerfTest() dlgPerfTest->setCaption(i18n("Performance Test")); - QString report = QString(""); + TQString report = TQString(""); - if (dlgPerfTest->exec() == QDialog::Accepted) { + if (dlgPerfTest->exec() == TQDialog::Accepted) { - Q_INT32 testCount = (Q_INT32)qRound(dlgPerfTest->page()->intTestCount->value()); + TQ_INT32 testCount = (TQ_INT32)tqRound(dlgPerfTest->page()->intTestCount->value()); if (dlgPerfTest->page()->chkBitBlt->isChecked()) { kdDebug() << "bltTest:\n"; - QString s = bltTest(testCount); + TQString s = bltTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkFill->isChecked()) { kdDebug() << "Filltest\n"; - QString s= fillTest(testCount); + TQString s= fillTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkGradient->isChecked()) { kdDebug() << "Gradienttest\n"; - QString s = gradientTest(testCount); + TQString s = gradientTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkPixel->isChecked()) { kdDebug() << "Pixeltest\n"; - QString s = pixelTest(testCount); + TQString s = pixelTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkShape->isChecked()) { kdDebug() << "Shapetest\n"; - QString s = shapeTest(testCount); + TQString s = tqshapeTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkLayer->isChecked()) { kdDebug() << "LayerTest\n"; - QString s = layerTest(testCount); + TQString s = layerTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkScale->isChecked()) { kdDebug() << "Scaletest\n"; - QString s = scaleTest(testCount); + TQString s = scaleTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkRotate->isChecked()) { kdDebug() << "Rotatetest\n"; - QString s = rotateTest(testCount); + TQString s = rotateTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkRender->isChecked()) { kdDebug() << "Rendertest\n"; - QString s = renderTest(testCount); + TQString s = renderTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkSelection->isChecked()) { kdDebug() << "Selectiontest\n"; - QString s = selectionTest(testCount); + TQString s = selectionTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkColorConversion->isChecked()) { kdDebug() << "Colorconversiontest\n"; - QString s = colorConversionTest(testCount); + TQString s = colorConversionTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkFilter-> isChecked()) { kdDebug() << "filtertest\n"; - QString s = filterTest(testCount); + TQString s = filterTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkReadBytes->isChecked()) { kdDebug() << "Readbytes test\n"; - QString s = readBytesTest(testCount); + TQString s = readBytesTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkWriteBytes-> isChecked()) { kdDebug() << "Writebytes test\n"; - QString s = writeBytesTest(testCount); + TQString s = writeBytesTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkIterators->isChecked()) { kdDebug() << "Iterators test\n"; - QString s = iteratorTest(testCount); + TQString s = iteratorTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkPaintView->isChecked()) { kdDebug() << "paintview test\n"; - QString s = paintViewTest(testCount); + TQString s = paintViewTest(testCount); report = report.append(s); kdDebug() << s << "\n"; } if (dlgPerfTest->page()->chkPaintViewFPS->isChecked()) { kdDebug() << "paint current view (fps) test\n"; - QString s = paintViewFPSTest(); + TQString s = paintViewFPSTest(); report = report.append(s); kdDebug() << s << "\n"; } @@ -220,7 +220,7 @@ void PerfTest::slotPerfTest() Q_CHECK_PTR(d); d->setCaption("Performance test results"); - QTextEdit * e = new QTextEdit(d); + TQTextEdit * e = new TQTextEdit(d); Q_CHECK_PTR(e); d->setMainWidget(e); e->setText(report); @@ -233,9 +233,9 @@ void PerfTest::slotPerfTest() delete dlgPerfTest; } -QString PerfTest::bltTest(Q_UINT32 testCount) +TQString PerfTest::bltTest(TQ_UINT32 testCount) { - QString report = QString("* bitBlt test\n"); + TQString report = TQString("* bitBlt test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -265,15 +265,15 @@ QString PerfTest::bltTest(Q_UINT32 testCount) } -QString PerfTest::doBlit(const KisCompositeOp& op, +TQString PerfTest::doBlit(const KisCompositeOp& op, KisID cspace, - Q_UINT8 opacity, - Q_UINT32 testCount, + TQ_UINT8 opacity, + TQ_UINT32 testCount, KisImageSP img) { - QTime t; - QString report; + TQTime t; + TQString report; // ------------------------------------------------------------------------------ // Small @@ -282,21 +282,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(small); KisFillPainter pf(small.data()) ; - pf.fillRect(0, 0, 32, 32, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 32, 32, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); KisPainter p(img->activeDevice()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, small.data(),0,0,32, 32); } p.end(); - report = report.append(QString(" %1 blits of rectangles < tilesize with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles < tilesize with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ @@ -305,21 +305,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(medium); pf.begin(medium.data()) ; - pf.fillRect(0, 0, 64 * 3, 64 * 3, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 64 * 3, 64 * 3, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, medium.data(),0,0,96, 96); } p.end(); - report = report.append(QString(" %1 blits of rectangles 3 * tilesize with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles 3 * tilesize with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ @@ -328,21 +328,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(big); pf.begin(big.data()) ; - pf.fillRect(0, 0, 800, 800, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 800, 800, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, big.data(),0,0,800,800); } p.end(); - report = report.append(QString(" %1 blits of rectangles 800 x 800 with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles 800 x 800 with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ @@ -351,21 +351,21 @@ QString PerfTest::doBlit(const KisCompositeOp& op, KisPaintDeviceSP outside = new KisPaintDevice(KisMetaRegistry::instance()->csRegistry()->getColorSpace(cspace,""), "outside blit"); Q_CHECK_PTR(outside); pf.begin(outside.data()) ; - pf.fillRect(0, 0, 500, 500, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + pf.fillRect(0, 0, 500, 500, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(600, 600, op, outside.data(),0,0,500,500); } p.end(); - report = report.append(QString(" %1 blits of rectangles 500 x 500 at 600,600 with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles 500 x 500 at 600,600 with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); // ------------------------------------------------------------------------------ // Small with varied source opacity @@ -374,31 +374,31 @@ QString PerfTest::doBlit(const KisCompositeOp& op, Q_CHECK_PTR(small_with_alpha); pf.begin(small_with_alpha.data()) ; - pf.fillRect(0, 0, 32, 32, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_TRANSPARENT); - pf.fillRect(4, 4, 24, 24, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); - pf.fillRect(8, 8, 16, 16, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE); + pf.fillRect(0, 0, 32, 32, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_TRANSPARENT); + pf.fillRect(4, 4, 24, 24, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + pf.fillRect(8, 8, 16, 16, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE); pf.end(); t.restart(); p.begin(img->activeDevice().data()); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.bitBlt(0, 0, op, small_with_alpha.data(), 0, 0, 32, 32); } p.end(); - report = report.append(QString(" %1 blits of rectangles < tilesize with source alpha, with opacity %2 and composite op %3: %4ms\n") - .arg(testCount) - .arg(opacity) - .arg(op.id().name()) - .arg(t.elapsed())); + report = report.append(TQString(" %1 blits of rectangles < tilesize with source alpha, with opacity %2 and composite op %3: %4ms\n") + .tqarg(testCount) + .tqarg(opacity) + .tqarg(op.id().name()) + .tqarg(t.elapsed())); return report; } -QString PerfTest::fillTest(Q_UINT32 testCount) +TQString PerfTest::fillTest(TQ_UINT32 testCount) { - QString report = QString("* Fill test\n"); + TQString report = TQString("* Fill test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -413,91 +413,91 @@ QString PerfTest::fillTest(Q_UINT32 testCount) // Rect fill KisFillPainter p(l.data()); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(0, 0, 1000, 1000); } - report = report.append(QString(" Erased 1000 x 1000 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Erased 1000 x 1000 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(50, 50, 500, 500); } - report = report.append(QString(" Erased 500 x 500 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Erased 500 x 500 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(-50, -50, 1100, 1100); } - report = report.append(QString(" Erased rect bigger than layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Erased rect bigger than layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Opaque Rect fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); } - report = report.append(QString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(50, 50, 500, 500, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(50, 50, 500, 500, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); } - report = report.append(QString(" Opaque fill 500 x 500 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 500 x 500 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(-50, -50, 1100, 1100, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(-50, -50, 1100, 1100, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); } - report = report.append(QString(" Opaque fill rect bigger than layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill rect bigger than layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Transparent rect fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); } - report = report.append(QString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 1000 x 1000 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(50, 50, 500, 500, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(50, 50, 500, 500, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); } - report = report.append(QString(" Opaque fill 500 x 500 layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill 500 x 500 layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - p.fillRect(-50, -50, 1100, 1100, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + p.fillRect(-50, -50, 1100, 1100, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8()), OPACITY_OPAQUE / 2); } - report = report.append(QString(" Opaque fill rect bigger than layer %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque fill rect bigger than layer %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Colour fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(0, 0, 1000, 1000); // p.paintEllipse(500, 1000, 100, 0, 0); - p.setPaintColor(KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.setPaintColor(KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.setFillThreshold(15); p.setCompositeOp(COMPOSITE_OVER); p.fillColor(0,0); } - report = report.append(QString(" Opaque floodfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque floodfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); // Pattern fill t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { p.eraseRect(0, 0, 1000, 1000); // p.paintEllipse(500, 1000, 100, 0, 0); - p.setPaintColor(KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.setPaintColor(KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); KisResourceServerBase* r = KisResourceServerRegistry::instance()->get("PatternServer"); Q_CHECK_PTR(r); p.setPattern((KisPattern*)r->resources().first()); @@ -505,7 +505,7 @@ QString PerfTest::fillTest(Q_UINT32 testCount) p.setCompositeOp(COMPOSITE_OVER); p.fillPattern(0,0); } - report = report.append(QString(" Opaque patternfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" Opaque patternfill of whole circle (incl. erase and painting of circle) %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); @@ -517,14 +517,14 @@ QString PerfTest::fillTest(Q_UINT32 testCount) } -QString PerfTest::gradientTest(Q_UINT32 testCount) +TQString PerfTest::gradientTest(TQ_UINT32 testCount) { - return QString("Gradient test\n"); + return TQString("Gradient test\n"); } -QString PerfTest::pixelTest(Q_UINT32 testCount) +TQString PerfTest::pixelTest(TQ_UINT32 testCount) { - QString report = QString("* pixel/setpixel test\n"); + TQString report = TQString("* pixel/setpixel test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -537,30 +537,30 @@ QString PerfTest::pixelTest(Q_UINT32 testCount) KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - QColor c = Qt::black; - Q_UINT8 opacity = OPACITY_OPAQUE; - for (Q_UINT32 i = 0; i < testCount; ++i) { - for (Q_UINT32 x = 0; x < 1000; ++x) { - for (Q_UINT32 y = 0; y < 1000; ++y) { + TQColor c = TQt::black; + TQ_UINT8 opacity = OPACITY_OPAQUE; + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 x = 0; x < 1000; ++x) { + for (TQ_UINT32 y = 0; y < 1000; ++y) { l->pixel(x, y, &c, &opacity); } } } - report = report.append(QString(" read 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" read 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); - c= Qt::black; + c= TQt::black; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for (Q_UINT32 x = 0; x < 1000; ++x) { - for (Q_UINT32 y = 0; y < 1000; ++y) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 x = 0; x < 1000; ++x) { + for (TQ_UINT32 y = 0; y < 1000; ++y) { l->setPixel(x, y, c, 128); } } } - report = report.append(QString(" written 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" written 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } @@ -571,31 +571,31 @@ QString PerfTest::pixelTest(Q_UINT32 testCount) } -QString PerfTest::shapeTest(Q_UINT32 testCount) +TQString PerfTest::tqshapeTest(TQ_UINT32 testCount) { - return QString("Shape test\n"); + return TQString("Shape test\n"); } -QString PerfTest::layerTest(Q_UINT32 testCount) +TQString PerfTest::layerTest(TQ_UINT32 testCount) { - return QString("Layer test\n"); + return TQString("Layer test\n"); } -QString PerfTest::scaleTest(Q_UINT32 testCount) +TQString PerfTest::scaleTest(TQ_UINT32 testCount) { - return QString("Scale test\n"); + return TQString("Scale test\n"); } -QString PerfTest::rotateTest(Q_UINT32 testCount) +TQString PerfTest::rotateTest(TQ_UINT32 testCount) { - QString report = QString("* Rotate test\n"); + TQString report = TQString("* Rotate test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); for (KisIDList::Iterator it = l.begin(); it != l.end(); ++it) { doc->undoAdapter()->setUndo( false ); - QTime t; + TQTime t; for (uint i = 0; i < testCount; ++i) { for (double angle = 0; angle < 360; ++angle) { @@ -606,24 +606,24 @@ QString PerfTest::rotateTest(Q_UINT32 testCount) delete img; } } - report = report.append(QString(" rotated 1000 x 1000 pixels over 360 degrees, degree by degree, %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" rotated 1000 x 1000 pixels over 360 degrees, degree by degree, %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } return report; } -QString PerfTest::renderTest(Q_UINT32 restCount) +TQString PerfTest::renderTest(TQ_UINT32 restCount) { - return QString("Render test\n"); + return TQString("Render test\n"); } -QString PerfTest::selectionTest(Q_UINT32 testCount) +TQString PerfTest::selectionTest(TQ_UINT32 testCount) { - return QString("Selection test\n"); + return TQString("Selection test\n"); } -QString PerfTest::colorConversionTest(Q_UINT32 testCount) +TQString PerfTest::colorConversionTest(TQ_UINT32 testCount) { - QString report = QString("* Colorspace conversion test\n"); + TQString report = TQString("* Colorspace conversion test\n"); KisDoc * doc = m_view->canvasSubject()->document(); KisIDList l = KisMetaRegistry::instance()->csRegistry()->listKeys(); @@ -631,7 +631,7 @@ QString PerfTest::colorConversionTest(Q_UINT32 testCount) KisImage * img = doc->newImage("cs-" + (*it).name(), 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(*it,"")); - QTime t; + TQTime t; KisIDList l2 = KisMetaRegistry::instance()->csRegistry()->listKeys(); for (KisIDList::Iterator it2 = l2.begin(); it2 != l2.end(); ++it2) { @@ -643,7 +643,7 @@ QString PerfTest::colorConversionTest(Q_UINT32 testCount) img2->convertTo(KisMetaRegistry::instance()->csRegistry()->getColorSpace(*it2,"")); delete img2; } - report = report.append(QString(" converted from " + (*it).name() + " to " + (*it2).name() + " 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" converted from " + (*it).name() + " to " + (*it2).name() + " 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } @@ -654,10 +654,10 @@ QString PerfTest::colorConversionTest(Q_UINT32 testCount) } -QString PerfTest::filterTest(Q_UINT32 testCount) +TQString PerfTest::filterTest(TQ_UINT32 testCount) { - QString report = QString("* Filter test\n"); + TQString report = TQString("* Filter test\n"); KisIDList filters = KisFilterRegistry::instance()->listKeys(); KisDoc * doc = m_view->canvasSubject()->document(); @@ -669,19 +669,19 @@ QString PerfTest::filterTest(Q_UINT32 testCount) KisImageSP img = doc->newImage("filter-" + (*it).name(), 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(*it,"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; for (KisIDList::Iterator it = filters.begin(); it != filters.end(); ++it) { KisFilterSP f = KisFilterRegistry::instance()->get(*it); t.restart(); kdDebug() << "test filter " << f->id().name() << " on " << img->colorSpace()->id().name() << endl; - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { f->enableProgress(); - f->process(l.data(), l.data(), f->configuration(f->createConfigurationWidget(m_view, l.data())), QRect(0, 0, 1000, 1000)); + f->process(l.data(), l.data(), f->configuration(f->createConfigurationWidget(m_view, l.data())), TQRect(0, 0, 1000, 1000)); f->disableProgress(); } - report = report.append(QString(" filtered " + (*it).name() + "1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" filtered " + (*it).name() + "1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); } @@ -690,72 +690,72 @@ QString PerfTest::filterTest(Q_UINT32 testCount) } -QString PerfTest::readBytesTest(Q_UINT32 testCount) +TQString PerfTest::readBytesTest(TQ_UINT32 testCount) { - QString report = QString("* Read bytes test\n\n"); + TQString report = TQString("* Read bytes test\n\n"); // On default tiles KisDoc * doc = m_view->canvasSubject()->document(); KisImageSP img = doc->newImage("Readbytes ", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - Q_UINT8 * newData = new Q_UINT8[1000 * 1000 * l->pixelSize()]; + for (TQ_UINT32 i = 0; i < testCount; ++i) { + TQ_UINT8 * newData = new TQ_UINT8[1000 * 1000 * l->pixelSize()]; Q_CHECK_PTR(newData); l->readBytes(newData, 0, 0, 1000, 1000); delete[] newData; } - report = report.append(QString(" read 1000 x 1000 pixels %1 times from empty image: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" read 1000 x 1000 pixels %1 times from empty image: %2\n").tqarg(testCount).tqarg(t.elapsed())); // On tiles with data KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - Q_UINT8 * newData = new Q_UINT8[1000 * 1000 * l->pixelSize()]; + for (TQ_UINT32 i = 0; i < testCount; ++i) { + TQ_UINT8 * newData = new TQ_UINT8[1000 * 1000 * l->pixelSize()]; Q_CHECK_PTR(newData); l->readBytes(newData, 0, 0, 1000, 1000); delete[] newData; } - report = report.append(QString(" read 1000 x 1000 pixels %1 times from filled image: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" read 1000 x 1000 pixels %1 times from filled image: %2\n").tqarg(testCount).tqarg(t.elapsed())); return report; } -QString PerfTest::writeBytesTest(Q_UINT32 testCount) +TQString PerfTest::writeBytesTest(TQ_UINT32 testCount) { - QString report = QString("* Write bytes test"); + TQString report = TQString("* Write bytes test"); // On default tiles KisDoc * doc = m_view->canvasSubject()->document(); KisImageSP img = doc->newImage("Writebytes ", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - Q_UINT8 * data = new Q_UINT8[1000 * 1000 * l->pixelSize()]; + TQ_UINT8 * data = new TQ_UINT8[1000 * 1000 * l->pixelSize()]; Q_CHECK_PTR(data); l->readBytes(data, 0, 0, 1000, 1000); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { l->writeBytes(data, 0, 0, 1000, 1000); } delete[] data; - report = report.append(QString(" written 1000 x 1000 pixels %1 times: %2\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" written 1000 x 1000 pixels %1 times: %2\n").tqarg(testCount).tqarg(t.elapsed())); return report; @@ -764,19 +764,19 @@ QString PerfTest::writeBytesTest(Q_UINT32 testCount) /////// Iterator tests -QString hlineRODefault(KisDoc * doc, Q_UINT32 testCount) +TQString hlineRODefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, false); while(! hiter.isDone()) @@ -788,27 +788,27 @@ QString hlineRODefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString hlineRO(KisDoc * doc, Q_UINT32 testCount) +TQString hlineRO(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, false); while(! hiter.isDone()) @@ -820,22 +820,22 @@ QString hlineRO(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString hlineWRDefault(KisDoc * doc, Q_UINT32 testCount) +TQString hlineWRDefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, true); while(! hiter.isDone()) @@ -847,26 +847,26 @@ QString hlineWRDefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString hlineWR(KisDoc * doc, Q_UINT32 testCount) +TQString hlineWR(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { int adv; - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(0, y2, 1000, true); while(! hiter.isDone()) @@ -878,21 +878,21 @@ QString hlineWR(KisDoc * doc, Q_UINT32 testCount) } - return QString(" hline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" hline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineRODefault(KisDoc * doc, Q_UINT32 testCount) +TQString vlineRODefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisVLineIterator hiter = l->createVLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -903,25 +903,25 @@ QString vlineRODefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineRO(KisDoc * doc, Q_UINT32 testCount) +TQString vlineRO(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisVLineIterator hiter = l->createVLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -932,21 +932,21 @@ QString vlineRO(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineWRDefault(KisDoc * doc, Q_UINT32 testCount) +TQString vlineWRDefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisVLineIterator hiter = l->createVLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -957,24 +957,24 @@ QString vlineWRDefault(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString vlineWR(KisDoc * doc, Q_UINT32 testCount) +TQString vlineWR(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - for(Q_INT32 y2 = 0; y2 < 0 + 1000; y2++) + for (TQ_UINT32 i = 0; i < testCount; ++i) { + for(TQ_INT32 y2 = 0; y2 < 0 + 1000; y2++) { KisHLineIterator hiter = l->createHLineIterator(y2, 0, 1000, true); while(! hiter.isDone()) @@ -985,19 +985,19 @@ QString vlineWR(KisDoc * doc, Q_UINT32 testCount) } - return QString(" vline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" vline iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectRODefault(KisDoc * doc, Q_UINT32 testCount) +TQString rectRODefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); ; - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, false); while(! r.isDone()) { @@ -1005,24 +1005,24 @@ QString rectRODefault(KisDoc * doc, Q_UINT32 testCount) } } - return QString(" rect iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated read-only 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectRO(KisDoc * doc, Q_UINT32 testCount) +TQString rectRO(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, false); while(! r.isDone()) { @@ -1030,21 +1030,21 @@ QString rectRO(KisDoc * doc, Q_UINT32 testCount) } } - return QString(" rect iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated read-only 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectWRDefault(KisDoc * doc, Q_UINT32 testCount) +TQString rectWRDefault(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, true); while(! r.isDone()) { @@ -1052,25 +1052,25 @@ QString rectWRDefault(KisDoc * doc, Q_UINT32 testCount) } } - return QString(" rect iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated writable 1000 x 1000 pixels %1 times over default tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString rectWR(KisDoc * doc, Q_UINT32 testCount) +TQString rectWR(KisDoc * doc, TQ_UINT32 testCount) { KisImageSP img = doc->newImage("", 1000, 1000, KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA", ""),"")); KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 1000, 1000, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 1000, 1000, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { + for (TQ_UINT32 i = 0; i < testCount; ++i) { KisRectIterator r = l->createRectIterator(0, 0, 1000, 1000, true); while(! r.isDone()) { @@ -1079,13 +1079,13 @@ QString rectWR(KisDoc * doc, Q_UINT32 testCount) } - return QString(" rect iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").arg(testCount).arg(t.elapsed()); + return TQString(" rect iterated writable 1000 x 1000 pixels %1 times over existing tile: %2\n").tqarg(testCount).tqarg(t.elapsed()); } -QString PerfTest::iteratorTest(Q_UINT32 testCount) +TQString PerfTest::iteratorTest(TQ_UINT32 testCount) { - QString report = "Iterator test"; + TQString report = "Iterator test"; KisDoc * doc = m_view->canvasSubject()->document(); @@ -1109,9 +1109,9 @@ QString PerfTest::iteratorTest(Q_UINT32 testCount) } -QString PerfTest::paintViewTest(Q_UINT32 testCount) +TQString PerfTest::paintViewTest(TQ_UINT32 testCount) { - QString report = QString("* paintView test\n\n"); + TQString report = TQString("* paintView test\n\n"); KisDoc * doc = m_view->canvasSubject()->document(); @@ -1122,56 +1122,56 @@ QString PerfTest::paintViewTest(Q_UINT32 testCount) KisPaintDeviceSP l = img->activeDevice(); KisFillPainter p(l.data()); - p.fillRect(0, 0, 512, 512, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 512, 512, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); - QTime t; + TQTime t; t.restart(); #if USE_CALLGRIND CALLGRIND_ZERO_STATS(); #endif - for (Q_UINT32 i = 0; i < testCount; ++i) { - m_view->getCanvasController()->updateCanvas(QRect(0, 0, 512, 512)); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + m_view->getCanvasController()->updateCanvas(TQRect(0, 0, 512, 512)); } #if USE_CALLGRIND CALLGRIND_DUMP_STATS(); #endif - report = report.append(QString(" painted a 512 x 512 image %1 times: %2 ms\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" painted a 512 x 512 image %1 times: %2 ms\n").tqarg(testCount).tqarg(t.elapsed())); img->newLayer("layer 2", OPACITY_OPAQUE); l = img->activeDevice(); p.begin(l.data()); - p.fillRect(0, 0, 512, 512, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 512, 512, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); img->newLayer("layer 3", OPACITY_OPAQUE); l = img->activeDevice(); p.begin(l.data()); - p.fillRect(0, 0, 512, 512, KisColor(Qt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); + p.fillRect(0, 0, 512, 512, KisColor(TQt::black, KisMetaRegistry::instance()->csRegistry()->getRGB8())); p.end(); t.restart(); - for (Q_UINT32 i = 0; i < testCount; ++i) { - m_view->getCanvasController()->updateCanvas(QRect(0, 0, 512, 512)); + for (TQ_UINT32 i = 0; i < testCount; ++i) { + m_view->getCanvasController()->updateCanvas(TQRect(0, 0, 512, 512)); } - report = report.append(QString(" painted a 512 x 512 image with 3 layers %1 times: %2 ms\n").arg(testCount).arg(t.elapsed())); + report = report.append(TQString(" painted a 512 x 512 image with 3 layers %1 times: %2 ms\n").tqarg(testCount).tqarg(t.elapsed())); return report; } -QString PerfTest::paintViewFPSTest() +TQString PerfTest::paintViewFPSTest() { - QString report = QString("* paintView (fps) test\n\n"); + TQString report = TQString("* paintView (fps) test\n\n"); - QTime t; + TQTime t; t.restart(); #if USE_CALLGRIND @@ -1190,7 +1190,7 @@ QString PerfTest::paintViewFPSTest() CALLGRIND_DUMP_STATS(); #endif - report = report.append(QString(" painted current view at %1 frames per second\n").arg(numViewsPainted)); + report = report.append(TQString(" painted current view at %1 frames per second\n").tqarg(numViewsPainted)); return report; } diff --git a/krita/plugins/viewplugins/performancetest/perftest.h b/krita/plugins/viewplugins/performancetest/perftest.h index 6a3365c5..807c0aee 100644 --- a/krita/plugins/viewplugins/performancetest/perftest.h +++ b/krita/plugins/viewplugins/performancetest/perftest.h @@ -31,8 +31,9 @@ class KisID; class PerfTest : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - PerfTest(QObject *parent, const char *name, const QStringList &); + PerfTest(TQObject *tqparent, const char *name, const TQStringList &); virtual ~PerfTest(); private slots: @@ -41,28 +42,28 @@ private slots: private: - QString bltTest(Q_UINT32 testCount); - QString fillTest(Q_UINT32 testCount); - QString gradientTest(Q_UINT32 testCount); - QString pixelTest(Q_UINT32 testCount); - QString shapeTest(Q_UINT32 testCount); - QString layerTest(Q_UINT32 testCount); - QString scaleTest(Q_UINT32 testCount); - QString rotateTest(Q_UINT32 testCount); - QString renderTest(Q_UINT32 restCount); - QString selectionTest(Q_UINT32 testCount); - QString colorConversionTest(Q_UINT32 testCount); - QString filterTest(Q_UINT32 testCount); - QString readBytesTest(Q_UINT32 testCount); - QString writeBytesTest(Q_UINT32 testCount); - QString iteratorTest(Q_UINT32 testCount); - QString paintViewTest(Q_UINT32 testCount); - QString paintViewFPSTest(); + TQString bltTest(TQ_UINT32 testCount); + TQString fillTest(TQ_UINT32 testCount); + TQString gradientTest(TQ_UINT32 testCount); + TQString pixelTest(TQ_UINT32 testCount); + TQString tqshapeTest(TQ_UINT32 testCount); + TQString layerTest(TQ_UINT32 testCount); + TQString scaleTest(TQ_UINT32 testCount); + TQString rotateTest(TQ_UINT32 testCount); + TQString renderTest(TQ_UINT32 restCount); + TQString selectionTest(TQ_UINT32 testCount); + TQString colorConversionTest(TQ_UINT32 testCount); + TQString filterTest(TQ_UINT32 testCount); + TQString readBytesTest(TQ_UINT32 testCount); + TQString writeBytesTest(TQ_UINT32 testCount); + TQString iteratorTest(TQ_UINT32 testCount); + TQString paintViewTest(TQ_UINT32 testCount); + TQString paintViewFPSTest(); - QString doBlit(const KisCompositeOp& op, + TQString doBlit(const KisCompositeOp& op, KisID cspace, - Q_UINT8 opacity, - Q_UINT32 testCount, + TQ_UINT8 opacity, + TQ_UINT32 testCount, KisImageSP img); private: diff --git a/krita/plugins/viewplugins/performancetest/wdg_perftest.ui b/krita/plugins/viewplugins/performancetest/wdg_perftest.ui index 4f9ca4a0..7dc14f17 100644 --- a/krita/plugins/viewplugins/performancetest/wdg_perftest.ui +++ b/krita/plugins/viewplugins/performancetest/wdg_perftest.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>WdgPerfTest</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgPerfTest</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>grpPerfTest</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblTests</cstring> </property> @@ -41,7 +41,7 @@ <cstring>intWidth</cstring> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>chkBitBlt</cstring> </property> @@ -52,7 +52,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>chkFill</cstring> </property> @@ -63,7 +63,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>chkGradient</cstring> </property> @@ -74,7 +74,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>chkPixel</cstring> </property> @@ -85,7 +85,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="5" column="0"> + <widget class="TQCheckBox" row="5" column="0"> <property name="name"> <cstring>chkShape</cstring> </property> @@ -96,7 +96,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="6" column="0"> + <widget class="TQCheckBox" row="6" column="0"> <property name="name"> <cstring>chkLayer</cstring> </property> @@ -107,7 +107,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="7" column="0"> + <widget class="TQCheckBox" row="7" column="0"> <property name="name"> <cstring>chkScale</cstring> </property> @@ -118,7 +118,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="8" column="0"> + <widget class="TQCheckBox" row="8" column="0"> <property name="name"> <cstring>chkRotate</cstring> </property> @@ -129,7 +129,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="9" column="0"> + <widget class="TQCheckBox" row="9" column="0"> <property name="name"> <cstring>chkRender</cstring> </property> @@ -140,7 +140,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="10" column="0"> + <widget class="TQCheckBox" row="10" column="0"> <property name="name"> <cstring>chkSelection</cstring> </property> @@ -151,7 +151,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="11" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="11" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>chkColorConversion</cstring> </property> @@ -162,7 +162,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="12" column="0"> + <widget class="TQCheckBox" row="12" column="0"> <property name="name"> <cstring>chkFilter</cstring> </property> @@ -187,7 +187,7 @@ <number>1000000</number> </property> </widget> - <widget class="QCheckBox" row="13" column="0"> + <widget class="TQCheckBox" row="13" column="0"> <property name="name"> <cstring>chkReadBytes</cstring> </property> @@ -198,7 +198,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="14" column="0"> + <widget class="TQCheckBox" row="14" column="0"> <property name="name"> <cstring>chkWriteBytes</cstring> </property> @@ -209,7 +209,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="15" column="0"> + <widget class="TQCheckBox" row="15" column="0"> <property name="name"> <cstring>chkIterators</cstring> </property> @@ -220,7 +220,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="16" column="0"> + <widget class="TQCheckBox" row="16" column="0"> <property name="name"> <cstring>chkPaintView</cstring> </property> @@ -231,15 +231,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="18" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="18" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>btnSelectAll</cstring> </property> @@ -247,7 +247,7 @@ <string>&Select All</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>btnDeselectAll</cstring> </property> @@ -257,7 +257,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="17" column="0"> + <widget class="TQCheckBox" row="17" column="0"> <property name="name"> <cstring>chkPaintViewFPS</cstring> </property> @@ -275,7 +275,7 @@ <tabstops> <tabstop>intTestCount</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> |