From f7e71d47719ab6094cf4a9fafffa5ea351973522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 13 Jan 2011 08:32:36 +0000 Subject: Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdeui/kpixmapio.cpp | 152 ++++++++++++++++++++++++++-------------------------- 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'kdeui/kpixmapio.cpp') diff --git a/kdeui/kpixmapio.cpp b/kdeui/kpixmapio.cpp index 74c68b82e..4d1e3c06a 100644 --- a/kdeui/kpixmapio.cpp +++ b/kdeui/kpixmapio.cpp @@ -468,7 +468,7 @@ TQImage KPixmapIO::convertFromXImage() cmap, ncells); image.setNumColors(ncells); for (i=0; i> 8)); + image.setColor(i, tqRgb(cmap[i].red, cmap[i].green, cmap[i].blue >> 8)); } else image.create(width, height, 32); @@ -485,12 +485,12 @@ TQImage KPixmapIO::convertFromXImage() case bo16_RGB_565: case bo16_BGR_565: { - Q_INT32 pixel, *src; - QRgb *dst, val; + TQ_INT32 pixel, *src; + TQRgb *dst, val; for (y=0; y> 24) | (d2 << 8); @@ -579,18 +579,18 @@ TQImage KPixmapIO::convertFromXImage() case bo24_BGR: { char *src; - QRgb *dst; + TQRgb *dst; int w1 = width/4; - Q_INT32 d1, d2, d3; + TQ_INT32 d1, d2, d3; for (y=0; y> 24) | (d2 << 8); @@ -637,12 +637,12 @@ void KPixmapIO::convertToXImage(const TQImage &img) if (img.depth() == 32) { - QRgb *src, pixel; - Q_INT32 *dst, val; + TQRgb *src, pixel; + TQ_INT32 *dst, val; for (y=0; y> 9) | + *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 9) | ((pixel & 0xf800) >> 6) | ((pixel & 0xff) >> 3); } } } else { uchar *src; - Q_INT32 val, *dst; - QRgb pixel, *clut = img.colorTable(); + TQ_INT32 val, *dst; + TQRgb pixel, *clut = img.tqcolorTable(); for (y=0; y(img).scanLine(y); + dst = (TQ_INT32 *) (data + y*bpl); for (x=0; x> 9) | + *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 9) | ((pixel & 0xf800) >> 6) | ((pixel & 0xff) >> 3); } } @@ -694,12 +694,12 @@ void KPixmapIO::convertToXImage(const TQImage &img) if (img.depth() == 32) { - QRgb *src, pixel; - Q_INT32 *dst, val; + TQRgb *src, pixel; + TQ_INT32 *dst, val; for (y=0; y> 8) | + *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 8) | ((pixel & 0xfc00) >> 5) | ((pixel & 0xff) >> 3); } } } else { uchar *src; - Q_INT32 val, *dst; - QRgb pixel, *clut = img.colorTable(); + TQ_INT32 val, *dst; + TQRgb pixel, *clut = img.tqcolorTable(); for (y=0; y(img).scanLine(y); + dst = (TQ_INT32 *) (data + y*bpl); for (x=0; x> 8) | + *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 8) | ((pixel & 0xfc00) >> 5) | ((pixel & 0xff) >> 3); } } @@ -752,10 +752,10 @@ void KPixmapIO::convertToXImage(const TQImage &img) { char *dst; int w1 = width/4; - QRgb *src, d1, d2, d3, d4; + TQRgb *src, d1, d2, d3, d4; for (y=0; y> 8) | (d3 << 16); - *((Q_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); + *((TQ_INT32 *)dst) = d1 | (d2 << 24); + *((TQ_INT32 *)dst+1) = (d2 >> 8) | (d3 << 16); + *((TQ_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); dst += 12; } for (x=w1*4; x(img).scanLine(y); dst = (uchar *) data + y*bpl; for (x=0; x> 8) | (d3 << 16); - *((Q_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); + *((TQ_INT32 *)dst) = d1 | (d2 << 24); + *((TQ_INT32 *)dst+1) = (d2 >> 8) | (d3 << 16); + *((TQ_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); dst += 12; } for (x=w1*4; x> 8) | (d3 << 16); - *((Q_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); + *((TQ_INT32 *)dst) = d1 | (d2 << 24); + *((TQ_INT32 *)dst+1) = (d2 >> 8) | (d3 << 16); + *((TQ_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); dst += 12; } for (x=w1*4; x(img).scanLine(y); dst = (uchar *) data + y*bpl; for (x=0; x> 8) | (d3 << 16); - *((Q_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); + *((TQ_INT32 *)dst) = d1 | (d2 << 24); + *((TQ_INT32 *)dst+1) = (d2 >> 8) | (d3 << 16); + *((TQ_INT32 *)dst+2) = (d4 << 8) | (d3 >> 16); dst += 12; } for (x=w1*4; x(img).scanLine(y); + dst = (TQRgb *) (data + y*bpl); for (x=0; x