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 --- kimgio/pcx.cpp | 68 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'kimgio/pcx.cpp') diff --git a/kimgio/pcx.cpp b/kimgio/pcx.cpp index 3d866ad0a..37361e848 100644 --- a/kimgio/pcx.cpp +++ b/kimgio/pcx.cpp @@ -45,8 +45,8 @@ static TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph ) s >> ph.VScreenSize; // Skip the rest of the header - Q_UINT8 byte; - while ( s.device()->at() < 128 ) + TQ_UINT8 byte; + while ( s.tqdevice()->at() < 128 ) s >> byte; return s; @@ -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() ) { @@ -149,14 +149,14 @@ static void readImage1( TQImage &img, TQDataStream &s, const PCXHEADER &header ) readLine( s, buf, header ); uchar *p = img.scanLine( y ); - unsigned int bpl = QMIN((header.width()+7)/8, header.BytesPerLine); + unsigned int bpl = TQMIN((header.width()+7)/8, header.BytesPerLine); for ( unsigned int x=0; x< bpl; ++x ) p[ x ] = buf[x]; } // 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,10 +180,10 @@ 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> ( x%8 ) ) ) - pixbuf[ x ] += ( 1 << i ); + pixbuf[ x ] = pixbuf.at(x) + ( 1 << i ); } uchar *p = img.scanLine( y ); @@ -214,23 +214,23 @@ static void readImage8( TQImage &img, TQDataStream &s, const PCXHEADER &header ) readLine( s, buf, header ); uchar *p = img.scanLine( y ); - unsigned int bpl = QMIN(header.BytesPerLine, header.width()); + unsigned int bpl = TQMIN(header.BytesPerLine, header.width()); for ( unsigned int x=0; x> 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; xioDevice() ); s.setByteOrder( TQDataStream::LittleEndian ); - if ( s.device()->size() < 128 ) + if ( s.tqdevice()->size() < 128 ) { - io->setStatus( -1 ); + io->setqStatus( -1 ); return; } @@ -279,7 +279,7 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io ) if ( header.Manufacturer != 10 || s.atEnd()) { - io->setStatus( -1 ); + io->setqStatus( -1 ); return; } @@ -323,19 +323,19 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io ) if ( !img.isNull() ) { io->setImage( img ); - io->setStatus( 0 ); + io->setqStatus( 0 ); } else { - io->setStatus( -1 ); + io->setqStatus( -1 ); } } 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 ) @@ -343,7 +343,7 @@ static void writeLine( TQDataStream &s, TQByteArray &buf ) count = 1; byte = buf[ i++ ]; - while ( ( i < size ) && ( byte == buf[ i ] ) && ( count < 63 ) ) + while ( ( i < size ) && ( byte == buf.at(i) ) && ( count < 63 ) ) { ++i; ++count; @@ -375,7 +375,7 @@ static void writeImage1( TQImage &img, TQDataStream &s, PCXHEADER &header ) for ( int y=0; ysetStatus( 0 ); + io->setqStatus( 0 ); } /* vim: et sw=2 ts=2 -- cgit v1.2.1