summaryrefslogtreecommitdiffstats
path: root/kdeui/kpixmapio.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kdeui/kpixmapio.cpp
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/kpixmapio.cpp')
-rw-r--r--kdeui/kpixmapio.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kdeui/kpixmapio.cpp b/kdeui/kpixmapio.cpp
index 74c68b82e..3946c58ad 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<ncells; i++)
- image.setColor(i, qRgb(cmap[i].red, cmap[i].green, cmap[i].blue >> 8));
+ image.setColor(i, tqRgb(cmap[i].red, cmap[i].green, cmap[i].blue >> 8));
} else
image.create(width, height, 32);
@@ -485,11 +485,11 @@ TQImage KPixmapIO::convertFromXImage()
case bo16_RGB_565:
case bo16_BGR_565:
{
- Q_INT32 pixel, *src;
+ TQ_INT32 pixel, *src;
QRgb *dst, val;
for (y=0; y<height; y++)
{
- src = (Q_INT32 *) (data + y*bpl);
+ src = (TQ_INT32 *) (data + y*bpl);
dst = (QRgb *) image.scanLine(y);
for (x=0; x<width/2; x++)
{
@@ -516,11 +516,11 @@ TQImage KPixmapIO::convertFromXImage()
case bo16_RGB_555:
case bo16_BGR_555:
{
- Q_INT32 pixel, *src;
+ TQ_INT32 pixel, *src;
QRgb *dst, val;
for (y=0; y<height; y++)
{
- src = (Q_INT32 *) (data + y*bpl);
+ src = (TQ_INT32 *) (data + y*bpl);
dst = (QRgb *) image.scanLine(y);
for (x=0; x<width/2; x++)
{
@@ -549,16 +549,16 @@ TQImage KPixmapIO::convertFromXImage()
char *src;
QRgb *dst;
int w1 = width/4;
- Q_INT32 d1, d2, d3;
+ TQ_INT32 d1, d2, d3;
for (y=0; y<height; y++)
{
src = data + y*bpl;
dst = (QRgb *) image.scanLine(y);
for (x=0; x<w1; x++)
{
- d1 = *((Q_INT32 *)src);
- d2 = *((Q_INT32 *)src + 1);
- d3 = *((Q_INT32 *)src + 2);
+ d1 = *((TQ_INT32 *)src);
+ d2 = *((TQ_INT32 *)src + 1);
+ d3 = *((TQ_INT32 *)src + 2);
src += 12;
*dst++ = d1;
*dst++ = (d1 >> 24) | (d2 << 8);
@@ -581,16 +581,16 @@ TQImage KPixmapIO::convertFromXImage()
char *src;
QRgb *dst;
int w1 = width/4;
- Q_INT32 d1, d2, d3;
+ TQ_INT32 d1, d2, d3;
for (y=0; y<height; y++)
{
src = data + y*bpl;
dst = (QRgb *) image.scanLine(y);
for (x=0; x<w1; x++)
{
- d1 = *((Q_INT32 *)src);
- d2 = *((Q_INT32 *)src + 1);
- d3 = *((Q_INT32 *)src + 2);
+ d1 = *((TQ_INT32 *)src);
+ d2 = *((TQ_INT32 *)src + 1);
+ d3 = *((TQ_INT32 *)src + 2);
src += 12;
*dst++ = d1;
*dst++ = (d1 >> 24) | (d2 << 8);
@@ -638,11 +638,11 @@ void KPixmapIO::convertToXImage(const TQImage &img)
if (img.depth() == 32)
{
QRgb *src, pixel;
- Q_INT32 *dst, val;
+ TQ_INT32 *dst, val;
for (y=0; y<height; y++)
{
src = (QRgb *) img.scanLine(y);
- dst = (Q_INT32 *) (data + y*bpl);
+ dst = (TQ_INT32 *) (data + y*bpl);
for (x=0; x<width/2; x++)
{
pixel = *src++;
@@ -656,19 +656,19 @@ void KPixmapIO::convertToXImage(const TQImage &img)
if (width%2)
{
pixel = *src++;
- *((Q_INT16 *)dst) = ((pixel & 0xf80000) >> 9) |
+ *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 9) |
((pixel & 0xf800) >> 6) | ((pixel & 0xff) >> 3);
}
}
} else
{
uchar *src;
- Q_INT32 val, *dst;
+ TQ_INT32 val, *dst;
QRgb pixel, *clut = img.colorTable();
for (y=0; y<height; y++)
{
src = img.scanLine(y);
- dst = (Q_INT32 *) (data + y*bpl);
+ dst = (TQ_INT32 *) (data + y*bpl);
for (x=0; x<width/2; x++)
{
pixel = clut[*src++];
@@ -682,7 +682,7 @@ void KPixmapIO::convertToXImage(const TQImage &img)
if (width%2)
{
pixel = clut[*src++];
- *((Q_INT16 *)dst) = ((pixel & 0xf80000) >> 9) |
+ *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 9) |
((pixel & 0xf800) >> 6) | ((pixel & 0xff) >> 3);
}
}
@@ -695,11 +695,11 @@ void KPixmapIO::convertToXImage(const TQImage &img)
if (img.depth() == 32)
{
QRgb *src, pixel;
- Q_INT32 *dst, val;
+ TQ_INT32 *dst, val;
for (y=0; y<height; y++)
{
src = (QRgb *) img.scanLine(y);
- dst = (Q_INT32 *) (data + y*bpl);
+ dst = (TQ_INT32 *) (data + y*bpl);
for (x=0; x<width/2; x++)
{
pixel = *src++;
@@ -713,19 +713,19 @@ void KPixmapIO::convertToXImage(const TQImage &img)
if (width%2)
{
pixel = *src++;
- *((Q_INT16 *)dst) = ((pixel & 0xf80000) >> 8) |
+ *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 8) |
((pixel & 0xfc00) >> 5) | ((pixel & 0xff) >> 3);
}
}
} else
{
uchar *src;
- Q_INT32 val, *dst;
+ TQ_INT32 val, *dst;
QRgb pixel, *clut = img.colorTable();
for (y=0; y<height; y++)
{
src = img.scanLine(y);
- dst = (Q_INT32 *) (data + y*bpl);
+ dst = (TQ_INT32 *) (data + y*bpl);
for (x=0; x<width/2; x++)
{
pixel = clut[*src++];
@@ -739,7 +739,7 @@ void KPixmapIO::convertToXImage(const TQImage &img)
if (width%2)
{
pixel = clut[*src++];
- *((Q_INT16 *)dst) = ((pixel & 0xf80000) >> 8) |
+ *((TQ_INT16 *)dst) = ((pixel & 0xf80000) >> 8) |
((pixel & 0xfc00) >> 5) | ((pixel & 0xff) >> 3);
}
}
@@ -763,17 +763,17 @@ void KPixmapIO::convertToXImage(const TQImage &img)
d2 = (*src++ & 0xffffff);
d3 = (*src++ & 0xffffff);
d4 = (*src++ & 0xffffff);
- *((Q_INT32 *)dst) = d1 | (d2 << 24);
- *((Q_INT32 *)dst+1) = (d2 >> 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<width; x++)
{
d1 = *src++;
- *dst++ = qRed(d1);
- *dst++ = qGreen(d1);
- *dst++ = qBlue(d1);
+ *dst++ = tqRed(d1);
+ *dst++ = tqGreen(d1);
+ *dst++ = tqBlue(d1);
}
}
} else
@@ -791,17 +791,17 @@ void KPixmapIO::convertToXImage(const TQImage &img)
d2 = (clut[*src++] & 0xffffff);
d3 = (clut[*src++] & 0xffffff);
d4 = (clut[*src++] & 0xffffff);
- *((Q_INT32 *)dst) = d1 | (d2 << 24);
- *((Q_INT32 *)dst+1) = (d2 >> 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<width; x++)
{
d1 = clut[*src++];
- *dst++ = qRed(d1);
- *dst++ = qGreen(d1);
- *dst++ = qBlue(d1);
+ *dst++ = tqRed(d1);
+ *dst++ = tqGreen(d1);
+ *dst++ = tqBlue(d1);
}
}
}
@@ -824,17 +824,17 @@ void KPixmapIO::convertToXImage(const TQImage &img)
d2 = (*src++ & 0xffffff);
d3 = (*src++ & 0xffffff);
d4 = (*src++ & 0xffffff);
- *((Q_INT32 *)dst) = d1 | (d2 << 24);
- *((Q_INT32 *)dst+1) = (d2 >> 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<width; x++)
{
d1 = *src++;
- *dst++ = qBlue(d1);
- *dst++ = qGreen(d1);
- *dst++ = qRed(d1);
+ *dst++ = tqBlue(d1);
+ *dst++ = tqGreen(d1);
+ *dst++ = tqRed(d1);
}
}
} else
@@ -852,17 +852,17 @@ void KPixmapIO::convertToXImage(const TQImage &img)
d2 = (clut[*src++] & 0xffffff);
d3 = (clut[*src++] & 0xffffff);
d4 = (clut[*src++] & 0xffffff);
- *((Q_INT32 *)dst) = d1 | (d2 << 24);
- *((Q_INT32 *)dst+1) = (d2 >> 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<width; x++)
{
d1 = clut[*src++];
- *dst++ = qBlue(d1);
- *dst++ = qGreen(d1);
- *dst++ = qRed(d1);
+ *dst++ = tqBlue(d1);
+ *dst++ = tqGreen(d1);
+ *dst++ = tqRed(d1);
}
}
}