summaryrefslogtreecommitdiffstats
path: root/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kolourpaint/pixmapfx/kpeffectreducecolors.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-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/kpeffectreducecolors.cpp')
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
index 44fd7ea7..80fadd8d 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
@@ -73,7 +73,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
#endif
- // Hack around Qt's braindead TQImage::convertDepth(1, ...) (with
+ // Hack around TQt's braindead TQImage::convertDepth(1, ...) (with
// dithering off) which produces pathetic results with an image that
// only has 2 colours - sometimes it just gives a completely black
// result. Instead, we simply preserve the 2 colours. One use case
@@ -84,7 +84,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "\tinvoking convert-to-depth 1 hack" << endl;
#endif
- QRgb color0, color1;
+ TQRgb color0, color1;
bool color0Valid = false, color1Valid = false;
bool moreThan2Colors = false;
@@ -101,7 +101,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
{
for (int x = 0; x < image.width (); x++)
{
- QRgb imagePixel = image.pixel (x, y);
+ TQRgb imagePixel = image.pixel (x, y);
if (color0Valid && imagePixel == color0)
monoImage.setPixel (x, y, 0);
@@ -211,7 +211,7 @@ TQString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
}
else
{
- return TQString::null;
+ return TQString();
}
}
@@ -240,12 +240,12 @@ void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, boo
// HACK: The above "image.convertDepth()" erases the Alpha Channel
// (at least for monochrome).
- // tqpixmap.html says "alpha masks on monochrome images are ignored."
+ // tqpixmap.html says "alpha tqmasks on monochrome images are ignored."
//
- // Put the mask back.
+ // Put the tqmask back.
//
- if (destPixmapPtr->mask ())
- pixmap.setMask (*destPixmapPtr->mask ());
+ if (destPixmapPtr->tqmask ())
+ pixmap.setMask (*destPixmapPtr->tqmask ());
*destPixmapPtr = pixmap;
}
@@ -276,9 +276,9 @@ TQPixmap kpEffectReduceColorsCommand::applyColorEffect (const TQPixmap &pixmap)
kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
+ : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name)
{
TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ());