From e16866e072f94410321d70daedbcb855ea878cac Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 6 Nov 2011 15:56:40 -0600 Subject: Actually move the kde files that were renamed in the last commit --- kdeui/tests/kcolortest.cpp | 169 --------------------------------------------- 1 file changed, 169 deletions(-) delete mode 100644 kdeui/tests/kcolortest.cpp (limited to 'kdeui/tests/kcolortest.cpp') diff --git a/kdeui/tests/kcolortest.cpp b/kdeui/tests/kcolortest.cpp deleted file mode 100644 index 46f5b42bc..000000000 --- a/kdeui/tests/kcolortest.cpp +++ /dev/null @@ -1,169 +0,0 @@ - -#include "kcolortest.h" -#include -#include -#include -#include - -bool fullscreen = false, oldway = false, intvsfade = false; -int max = 20; // how many steps - -KColorWidget::KColorWidget(TQWidget *parent, const char *name) - : TQWidget(parent, name) -{ - - if (fullscreen || intvsfade) { - TQPixmap shot = TQPixmap::grabWindow(TQApplication::desktop()->winId()); - original = shot.convertToImage(); - } - else - original = TQImage("testimage.png"); - resize(original.width(), original.height()); -} - -void KColorWidget::paintEvent(TQPaintEvent *) -{ - if(!pixmap.isNull()) - bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); -} - -void KColorWidget::doIntensityLoop() -{ - int count; - - int start, stop; - TQTime t; - - t.start(); - - image = original; image.detach(); - - if (fullscreen){ - start = t.elapsed(); - for(count=0; count < max; ++count){ - if (!oldway) - KImageEffect::intensity(image, -1./max); - else { - uint *qptr=(uint *)image.bits(); - QRgb qrgb; - int size=pixmap.width()*pixmap.height(); - for (int i=0;i 1) { - if (!strcmp(argv[1], "fullscreen")) - { - fullscreen = true; - if (!strcmp(argv[2], "old_way")) - oldway = true; - } - else if (!strcmp(argv[1], "int_vs_fade")) { - intvsfade = fullscreen = true; - oldway = false; - } - else - printf("Usage: %s [int_vs_fade | fullscreen [old_way]]\n ", argv[0]); - } - KApplication *app = new KApplication(argc, argv, "KColorTest"); - KColorWidget w; - app->setMainWidget(&w); - w.show(); - w.doIntensityLoop(); - return(app->exec()); -} -- cgit v1.2.3