diff options
Diffstat (limited to 'kimgio/pcx.cpp')
-rw-r--r-- | kimgio/pcx.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kimgio/pcx.cpp b/kimgio/pcx.cpp index 444bc7974..3d866ad0a 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 - TQ_UINT8 byte; + Q_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; - TQ_UINT8 byte = 0; + Q_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 ) { - TQ_UINT32 i=0; - TQ_UINT32 size = buf.size(); - TQ_UINT8 byte, count; + Q_UINT32 i=0; + Q_UINT32 size = buf.size(); + Q_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, tqRgb( 0, 0, 0 ) ); - img.setColor( 1, tqRgb( 255, 255, 255 ) ); + img.setColor( 0, qRgb( 0, 0, 0 ) ); + img.setColor( 1, qRgb( 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++ ) { - TQ_UINT32 offset = i*header.BytesPerLine; + Q_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 ]; } - TQ_UINT8 flag; + Q_UINT8 flag; s >> flag; kdDebug( 399 ) << "Palette Flag: " << flag << endl; if ( flag == 12 && ( header.Version == 5 || header.Version == 2 ) ) { // Read the palette - TQ_UINT8 r, g, b; + Q_UINT8 r, g, b; for ( int i=0; i<256; ++i ) { s >> r >> g >> b; - img.setColor( i, tqRgb( r, g, b ) ); + img.setColor( i, qRgb( 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 ] = tqRgb( r_buf[ x ], g_buf[ x ], b_buf[ x ] ); + p[ x ] = qRgb( 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 ) { - TQ_UINT32 i = 0; - TQ_UINT32 size = buf.size(); - TQ_UINT8 count, data; + Q_UINT32 i = 0; + Q_UINT32 size = buf.size(); + Q_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 ) { - TQ_UINT8 *p = img.scanLine( y ); + Q_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 ) { - TQ_UINT8 *p = img.scanLine( y ); + Q_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 ) { - TQ_UINT8 *p = img.scanLine( y ); + Q_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 - TQ_UINT8 byte = 12; + Q_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 ] = tqRed( rgb ); - g_buf[ x ] = tqGreen( rgb ); - b_buf[ x ] = tqBlue( rgb ); + r_buf[ x ] = qRed( rgb ); + g_buf[ x ] = qGreen( rgb ); + b_buf[ x ] = qBlue( rgb ); } writeLine( s, r_buf ); |