summaryrefslogtreecommitdiffstats
path: root/kimgio/rgb.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /kimgio/rgb.cpp
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimgio/rgb.cpp')
-rw-r--r--kimgio/rgb.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kimgio/rgb.cpp b/kimgio/rgb.cpp
index 806dab389..71976685a 100644
--- a/kimgio/rgb.cpp
+++ b/kimgio/rgb.cpp
@@ -121,7 +121,7 @@ bool SGIImage::getRow(uchar *dest)
bool SGIImage::readData(TQImage& img)
{
QRgb *c;
- TQ_UINT32 *start = m_starttab;
+ Q_UINT32 *start = m_starttab;
TQByteArray lguard(m_xsize);
uchar *line = (uchar *)lguard.data();
unsigned x, y;
@@ -136,7 +136,7 @@ bool SGIImage::readData(TQImage& img)
return false;
c = (QRgb *)img.scanLine(m_ysize - y - 1);
for (x = 0; x < m_xsize; x++, c++)
- *c = tqRgb(line[x], line[x], line[x]);
+ *c = qRgb(line[x], line[x], line[x]);
}
if (m_zsize == 1)
@@ -150,7 +150,7 @@ bool SGIImage::readData(TQImage& img)
return false;
c = (QRgb *)img.scanLine(m_ysize - y - 1);
for (x = 0; x < m_xsize; x++, c++)
- *c = tqRgb(tqRed(*c), line[x], line[x]);
+ *c = qRgb(qRed(*c), line[x], line[x]);
}
for (y = 0; y < m_ysize; y++) {
@@ -160,7 +160,7 @@ bool SGIImage::readData(TQImage& img)
return false;
c = (QRgb *)img.scanLine(m_ysize - y - 1);
for (x = 0; x < m_xsize; x++, c++)
- *c = tqRgb(tqRed(*c), tqGreen(*c), line[x]);
+ *c = qRgb(qRed(*c), qGreen(*c), line[x]);
}
if (m_zsize == 3)
@@ -174,7 +174,7 @@ bool SGIImage::readData(TQImage& img)
return false;
c = (QRgb *)img.scanLine(m_ysize - y - 1);
for (x = 0; x < m_xsize; x++, c++)
- *c = tqRgba(tqRed(*c), tqGreen(*c), tqBlue(*c), line[x]);
+ *c = qRgba(qRed(*c), qGreen(*c), qBlue(*c), line[x]);
}
return true;
@@ -183,9 +183,9 @@ bool SGIImage::readData(TQImage& img)
bool SGIImage::readImage(TQImage& img)
{
- TQ_INT8 u8;
- TQ_INT16 u16;
- TQ_INT32 u32;
+ Q_INT8 u8;
+ Q_INT16 u16;
+ Q_INT32 u32;
kdDebug(399) << "reading '" << m_io->fileName() << '\'' << endl;
@@ -256,13 +256,13 @@ bool SGIImage::readImage(TQImage& img)
if (m_rle) {
uint l;
- m_starttab = new TQ_UINT32[m_numrows];
+ m_starttab = new Q_UINT32[m_numrows];
for (l = 0; !m_stream.atEnd() && l < m_numrows; l++) {
m_stream >> m_starttab[l];
- m_starttab[l] -= 512 + m_numrows * 2 * sizeof(TQ_UINT32);
+ m_starttab[l] -= 512 + m_numrows * 2 * sizeof(Q_UINT32);
}
- m_lengthtab = new TQ_UINT32[m_numrows];
+ m_lengthtab = new Q_UINT32[m_numrows];
for (l = 0; l < m_numrows; l++)
m_stream >> m_lengthtab[l];
}
@@ -323,7 +323,7 @@ bool RLEData::operator<(const RLEData& b) const
uint RLEMap::insert(const uchar *d, uint l)
{
RLEData data = RLEData(d, l, m_offset);
- Iterator it = tqfind(data);
+ Iterator it = find(data);
if (it != end())
return it.data();
@@ -389,7 +389,7 @@ uint SGIImage::compact(uchar *d, uchar *s)
bool SGIImage::scanData(const TQImage& img)
{
- TQ_UINT32 *start = m_starttab;
+ Q_UINT32 *start = m_starttab;
TQCString lineguard(m_xsize * 2);
TQCString bufguard(m_xsize);
uchar *line = (uchar *)lineguard.data();
@@ -401,7 +401,7 @@ bool SGIImage::scanData(const TQImage& img)
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- buf[x] = intensity(tqRed(*c++));
+ buf[x] = intensity(qRed(*c++));
len = compact(line, buf);
*start++ = m_rlemap.insert(line, len);
}
@@ -413,7 +413,7 @@ bool SGIImage::scanData(const TQImage& img)
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- buf[x] = intensity(tqGreen(*c++));
+ buf[x] = intensity(qGreen(*c++));
len = compact(line, buf);
*start++ = m_rlemap.insert(line, len);
}
@@ -421,7 +421,7 @@ bool SGIImage::scanData(const TQImage& img)
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- buf[x] = intensity(tqBlue(*c++));
+ buf[x] = intensity(qBlue(*c++));
len = compact(line, buf);
*start++ = m_rlemap.insert(line, len);
}
@@ -433,7 +433,7 @@ bool SGIImage::scanData(const TQImage& img)
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- buf[x] = intensity(tqAlpha(*c++));
+ buf[x] = intensity(qAlpha(*c++));
len = compact(line, buf);
*start++ = m_rlemap.insert(line, len);
}
@@ -444,11 +444,11 @@ bool SGIImage::scanData(const TQImage& img)
void SGIImage::writeHeader()
{
- m_stream << TQ_UINT16(0x01da);
+ m_stream << Q_UINT16(0x01da);
m_stream << m_rle << m_bpc << m_dim;
m_stream << m_xsize << m_ysize << m_zsize;
m_stream << m_pixmin << m_pixmax;
- m_stream << TQ_UINT32(0);
+ m_stream << Q_UINT32(0);
uint i;
TQString desc = m_io->description();
@@ -463,7 +463,7 @@ void SGIImage::writeHeader()
m_stream << m_colormap;
for (i = 0; i < 404; i++)
- m_stream << TQ_UINT8(0);
+ m_stream << Q_UINT8(0);
}
@@ -476,11 +476,11 @@ void SGIImage::writeRle()
// write start table
for (i = 0; i < m_numrows; i++)
- m_stream << TQ_UINT32(m_rlevector[m_starttab[i]]->offset());
+ m_stream << Q_UINT32(m_rlevector[m_starttab[i]]->offset());
// write length table
for (i = 0; i < m_numrows; i++)
- m_stream << TQ_UINT32(m_rlevector[m_starttab[i]]->size());
+ m_stream << Q_UINT32(m_rlevector[m_starttab[i]]->size());
// write data
for (i = 0; i < m_rlevector.size(); i++)
@@ -500,7 +500,7 @@ void SGIImage::writeVerbatim(const TQImage& img)
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- m_stream << TQ_UINT8(tqRed(*c++));
+ m_stream << Q_UINT8(qRed(*c++));
}
if (m_zsize == 1)
@@ -510,13 +510,13 @@ void SGIImage::writeVerbatim(const TQImage& img)
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- m_stream << TQ_UINT8(tqGreen(*c++));
+ m_stream << Q_UINT8(qGreen(*c++));
}
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- m_stream << TQ_UINT8(tqBlue(*c++));
+ m_stream << Q_UINT8(qBlue(*c++));
}
if (m_zsize == 3)
@@ -526,7 +526,7 @@ void SGIImage::writeVerbatim(const TQImage& img)
for (y = 0; y < m_ysize; y++) {
c = reinterpret_cast<QRgb *>(img.scanLine(m_ysize - y - 1));
for (x = 0; x < m_xsize; x++)
- m_stream << TQ_UINT8(tqAlpha(*c++));
+ m_stream << Q_UINT8(qAlpha(*c++));
}
}
@@ -558,8 +558,8 @@ bool SGIImage::writeImage(TQImage& img)
m_numrows = m_ysize * m_zsize;
- m_starttab = new TQ_UINT32[m_numrows];
- m_rlemap.setBaseOffset(512 + m_numrows * 2 * sizeof(TQ_UINT32));
+ m_starttab = new Q_UINT32[m_numrows];
+ m_rlemap.setBaseOffset(512 + m_numrows * 2 * sizeof(Q_UINT32));
if (!scanData(img)) {
kdDebug(399) << "this can't happen" << endl;
@@ -569,7 +569,7 @@ bool SGIImage::writeImage(TQImage& img)
m_rlevector = m_rlemap.vector();
long verbatim_size = m_numrows * m_xsize;
- long rle_size = m_numrows * 2 * sizeof(TQ_UINT32);
+ long rle_size = m_numrows * 2 * sizeof(Q_UINT32);
for (uint i = 0; i < m_rlevector.size(); i++)
rle_size += m_rlevector[i]->size();