diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kolourpaint/pixmapfx/kpeffectinvert.cpp | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolourpaint/pixmapfx/kpeffectinvert.cpp')
-rw-r--r-- | kolourpaint/pixmapfx/kpeffectinvert.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kolourpaint/pixmapfx/kpeffectinvert.cpp b/kolourpaint/pixmapfx/kpeffectinvert.cpp index 67c1d6d0..aaf2c5d7 100644 --- a/kolourpaint/pixmapfx/kpeffectinvert.cpp +++ b/kolourpaint/pixmapfx/kpeffectinvert.cpp @@ -86,30 +86,30 @@ TQPixmap kpEffectInvertCommand::apply (const TQPixmap &pm, int channels) // public static void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels) { - QRgb mask = qRgba ((channels & Red) ? 0xFF : 0, + TQRgb tqmask = tqRgba ((channels & Red) ? 0xFF : 0, (channels & Green) ? 0xFF : 0, (channels & Blue) ? 0xFF : 0, 0/*don't invert alpha*/); #if DEBUG_KP_EFFECT_INVERT kdDebug () << "kpEffectInvertCommand::apply(channels=" << channels - << ") mask=" << (int *) mask + << ") tqmask=" << (int *) tqmask << endl; #endif if (destImagePtr->depth () > 8) { #if 0 - // SYNC: TODO: Qt BUG - invertAlpha argument is inverted!!! - destImagePtr->invertPixels (true/*no invert alpha (Qt 3.2)*/); + // SYNC: TODO: TQt BUG - invertAlpha argument is inverted!!! + destImagePtr->invertPixels (true/*no invert alpha (TQt 3.2)*/); #else - // Above version works for Qt 3.2 at least. + // Above version works for TQt 3.2 at least. // But this version will always work (slower, though) and supports // inverting particular channels. for (int y = 0; y < destImagePtr->height (); y++) { for (int x = 0; x < destImagePtr->width (); x++) { - destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ mask); + destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ tqmask); } } #endif @@ -118,7 +118,7 @@ void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels) { for (int i = 0; i < destImagePtr->numColors (); i++) { - destImagePtr->setColor (i, destImagePtr->color (i) ^ mask); + destImagePtr->setColor (i, destImagePtr->color (i) ^ tqmask); } } } @@ -149,15 +149,15 @@ TQPixmap kpEffectInvertCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQVBoxLayout *topLevelLay = new TQVBoxLayout (this, marginHint (), spacingHint ()); TQWidget *centerWidget = new TQWidget (this); - topLevelLay->addWidget (centerWidget, 0/*stretch*/, Qt::AlignCenter); + topLevelLay->addWidget (centerWidget, 0/*stretch*/, TQt::AlignCenter); TQVBoxLayout *centerWidgetLay = new TQVBoxLayout (centerWidget, |