summaryrefslogtreecommitdiffstats
path: root/kimgio/pcx.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 /kimgio/pcx.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 'kimgio/pcx.cpp')
-rw-r--r--kimgio/pcx.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kimgio/pcx.cpp b/kimgio/pcx.cpp
index 3d866ad0a..444bc7974 100644
--- a/kimgio/pcx.cpp
+++ b/kimgio/pcx.cpp
@@ -45,7 +45,7 @@ static TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph )
s >> ph.VScreenSize;
// Skip the rest of the header
- Q_UINT8 byte;
+ TQ_UINT8 byte;
while ( s.device()->at() < 128 )
s >> byte;
@@ -83,7 +83,7 @@ static TQDataStream &operator<<( TQDataStream &s, const PCXHEADER &ph )
s << ph.HScreenSize;
s << ph.VScreenSize;
- Q_UINT8 byte = 0;
+ TQ_UINT8 byte = 0;
for ( int i=0; i<54; ++i )
s << byte;
@@ -101,9 +101,9 @@ PCXHEADER::PCXHEADER()
static void readLine( TQDataStream &s, TQByteArray &buf, const PCXHEADER &header )
{
- Q_UINT32 i=0;
- Q_UINT32 size = buf.size();
- Q_UINT8 byte, count;
+ TQ_UINT32 i=0;
+ TQ_UINT32 size = buf.size();
+ TQ_UINT8 byte, count;
if ( header.isCompressed() )
{
@@ -155,8 +155,8 @@ static void readImage1( TQImage &img, TQDataStream &s, const PCXHEADER &header )
}
// Set the color palette
- img.setColor( 0, qRgb( 0, 0, 0 ) );
- img.setColor( 1, qRgb( 255, 255, 255 ) );
+ img.setColor( 0, tqRgb( 0, 0, 0 ) );
+ img.setColor( 1, tqRgb( 255, 255, 255 ) );
}
static void readImage4( TQImage &img, TQDataStream &s, const PCXHEADER &header )
@@ -180,7 +180,7 @@ static void readImage4( TQImage &img, TQDataStream &s, const PCXHEADER &header )
for ( int i=0; i<4; i++ )
{
- Q_UINT32 offset = i*header.BytesPerLine;
+ TQ_UINT32 offset = i*header.BytesPerLine;
for ( unsigned int x=0; x<header.width(); ++x )
if ( buf[ offset + ( x/8 ) ] & ( 128 >> ( x%8 ) ) )
pixbuf[ x ] += ( 1 << i );
@@ -219,18 +219,18 @@ static void readImage8( TQImage &img, TQDataStream &s, const PCXHEADER &header )
p[ x ] = buf[ x ];
}
- Q_UINT8 flag;
+ TQ_UINT8 flag;
s >> flag;
kdDebug( 399 ) << "Palette Flag: " << flag << endl;
if ( flag == 12 && ( header.Version == 5 || header.Version == 2 ) )
{
// Read the palette
- Q_UINT8 r, g, b;
+ TQ_UINT8 r, g, b;
for ( int i=0; i<256; ++i )
{
s >> r >> g >> b;
- img.setColor( i, qRgb( r, g, b ) );
+ img.setColor( i, tqRgb( r, g, b ) );
}
}
}
@@ -258,7 +258,7 @@ static void readImage24( TQImage &img, TQDataStream &s, const PCXHEADER &header
uint *p = ( uint * )img.scanLine( y );
for ( unsigned int x=0; x<header.width(); ++x )
- p[ x ] = qRgb( r_buf[ x ], g_buf[ x ], b_buf[ x ] );
+ p[ x ] = tqRgb( r_buf[ x ], g_buf[ x ], b_buf[ x ] );
}
}
@@ -333,9 +333,9 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io )
static void writeLine( TQDataStream &s, TQByteArray &buf )
{
- Q_UINT32 i = 0;
- Q_UINT32 size = buf.size();
- Q_UINT8 count, data;
+ TQ_UINT32 i = 0;
+ TQ_UINT32 size = buf.size();
+ TQ_UINT8 count, data;
char byte;
while ( i < size )
@@ -375,7 +375,7 @@ static void writeImage1( TQImage &img, TQDataStream &s, PCXHEADER &header )
for ( int y=0; y<header.height(); ++y )
{
- Q_UINT8 *p = img.scanLine( y );
+ TQ_UINT8 *p = img.scanLine( y );
// Invert as TQImage uses reverse palette for monochrome images?
for ( int i=0; i<header.BytesPerLine; ++i )
@@ -403,7 +403,7 @@ static void writeImage4( TQImage &img, TQDataStream &s, PCXHEADER &header )
for ( int y=0; y<header.height(); ++y )
{
- Q_UINT8 *p = img.scanLine( y );
+ TQ_UINT8 *p = img.scanLine( y );
for ( int i=0; i<4; ++i )
buf[ i ].fill( 0 );
@@ -432,7 +432,7 @@ static void writeImage8( TQImage &img, TQDataStream &s, PCXHEADER &header )
for ( int y=0; y<header.height(); ++y )
{
- Q_UINT8 *p = img.scanLine( y );
+ TQ_UINT8 *p = img.scanLine( y );
for ( int i=0; i<header.BytesPerLine; ++i )
buf[ i ] = p[ i ];
@@ -441,7 +441,7 @@ static void writeImage8( TQImage &img, TQDataStream &s, PCXHEADER &header )
}
// Write palette flag
- Q_UINT8 byte = 12;
+ TQ_UINT8 byte = 12;
s << byte;
// Write palette
@@ -468,9 +468,9 @@ static void writeImage24( TQImage &img, TQDataStream &s, PCXHEADER &header )
for ( unsigned int x=0; x<header.width(); ++x )
{
QRgb rgb = *p++;
- r_buf[ x ] = qRed( rgb );
- g_buf[ x ] = qGreen( rgb );
- b_buf[ x ] = qBlue( rgb );
+ r_buf[ x ] = tqRed( rgb );
+ g_buf[ x ] = tqGreen( rgb );
+ b_buf[ x ] = tqBlue( rgb );
}
writeLine( s, r_buf );