diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kimgio | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimgio')
-rw-r--r-- | kimgio/dds.cpp | 60 | ||||
-rw-r--r-- | kimgio/dds.h | 4 | ||||
-rw-r--r-- | kimgio/eps.cpp | 54 | ||||
-rw-r--r-- | kimgio/eps.h | 4 | ||||
-rw-r--r-- | kimgio/exr.cpp | 24 | ||||
-rw-r--r-- | kimgio/exr.h | 6 | ||||
-rw-r--r-- | kimgio/g3r.cpp | 14 | ||||
-rw-r--r-- | kimgio/g3r.h | 6 | ||||
-rw-r--r-- | kimgio/gimp.h | 2 | ||||
-rw-r--r-- | kimgio/hdr.cpp | 18 | ||||
-rw-r--r-- | kimgio/hdr.h | 4 | ||||
-rw-r--r-- | kimgio/ico.cpp | 64 | ||||
-rw-r--r-- | kimgio/ico.h | 6 | ||||
-rw-r--r-- | kimgio/jp2.cpp | 52 | ||||
-rw-r--r-- | kimgio/jp2.h | 4 | ||||
-rw-r--r-- | kimgio/pcx.cpp | 86 | ||||
-rw-r--r-- | kimgio/pcx.h | 10 | ||||
-rw-r--r-- | kimgio/psd.cpp | 20 | ||||
-rw-r--r-- | kimgio/psd.h | 4 | ||||
-rw-r--r-- | kimgio/rgb.cpp | 44 | ||||
-rw-r--r-- | kimgio/rgb.h | 34 | ||||
-rw-r--r-- | kimgio/tga.cpp | 24 | ||||
-rw-r--r-- | kimgio/tga.h | 4 | ||||
-rw-r--r-- | kimgio/tiffr.cpp | 18 | ||||
-rw-r--r-- | kimgio/tiffr.h | 6 | ||||
-rw-r--r-- | kimgio/xcf.cpp | 146 | ||||
-rw-r--r-- | kimgio/xcf.h | 88 | ||||
-rw-r--r-- | kimgio/xview.cpp | 14 | ||||
-rw-r--r-- | kimgio/xview.h | 4 |
29 files changed, 412 insertions, 412 deletions
diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp index d08da6936..caacb2a3c 100644 --- a/kimgio/dds.cpp +++ b/kimgio/dds.cpp @@ -21,8 +21,8 @@ #include "dds.h" -#include <qimage.h> -#include <qdatastream.h> +#include <tqimage.h> +#include <tqdatastream.h> #include <kglobal.h> #include <kdebug.h> @@ -143,7 +143,7 @@ namespace { // Private. uint amask; }; - static QDataStream & operator>> ( QDataStream & s, DDSPixelFormat & pf ) + static TQDataStream & operator>> ( TQDataStream & s, DDSPixelFormat & pf ) { s >> pf.size; s >> pf.flags; @@ -163,7 +163,7 @@ namespace { // Private. uint caps4; }; - static QDataStream & operator>> ( QDataStream & s, DDSCaps & caps ) + static TQDataStream & operator>> ( TQDataStream & s, DDSCaps & caps ) { s >> caps.caps1; s >> caps.caps2; @@ -186,7 +186,7 @@ namespace { // Private. uint notused; }; - static QDataStream & operator>> ( QDataStream & s, DDSHeader & header ) + static TQDataStream & operator>> ( TQDataStream & s, DDSHeader & header ) { s >> header.size; s >> header.flags; @@ -288,7 +288,7 @@ namespace { // Private. } - static bool LoadA8R8G8B8( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadA8R8G8B8( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -305,7 +305,7 @@ namespace { // Private. return true; } - static bool LoadR8G8B8( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadR8G8B8( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -322,7 +322,7 @@ namespace { // Private. return true; } - static bool LoadA1R5G5B5( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadA1R5G5B5( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -343,7 +343,7 @@ namespace { // Private. return true; } - static bool LoadA4R4G4B4( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadA4R4G4B4( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -364,7 +364,7 @@ namespace { // Private. return true; } - static bool LoadR5G6B5( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadR5G6B5( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -384,7 +384,7 @@ namespace { // Private. return true; } - static QDataStream & operator>> ( QDataStream & s, Color565 & c ) + static TQDataStream & operator>> ( TQDataStream & s, Color565 & c ) { return s >> c.u; } @@ -437,7 +437,7 @@ namespace { // Private. }; - static QDataStream & operator>> ( QDataStream & s, BlockDXT & c ) + static TQDataStream & operator>> ( TQDataStream & s, BlockDXT & c ) { return s >> c.col0 >> c.col1 >> c.row[0] >> c.row[1] >> c.row[2] >> c.row[3]; } @@ -446,7 +446,7 @@ namespace { // Private. ushort row[4]; }; - static QDataStream & operator>> ( QDataStream & s, BlockDXTAlphaExplicit & c ) + static TQDataStream & operator>> ( TQDataStream & s, BlockDXTAlphaExplicit & c ) { return s >> c.row[0] >> c.row[1] >> c.row[2] >> c.row[3]; } @@ -512,13 +512,13 @@ namespace { // Private. } }; - static QDataStream & operator>> ( QDataStream & s, BlockDXTAlphaLinear & c ) + static TQDataStream & operator>> ( TQDataStream & s, BlockDXTAlphaLinear & c ) { s >> c.alpha0 >> c.alpha1; return s >> c.bits[0] >> c.bits[1] >> c.bits[2] >> c.bits[3] >> c.bits[4] >> c.bits[5]; } - static bool LoadDXT1( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadDXT1( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -557,7 +557,7 @@ namespace { // Private. return true; } - static bool LoadDXT3( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadDXT3( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -602,14 +602,14 @@ namespace { // Private. return true; } - static bool LoadDXT2( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadDXT2( TQDataStream & s, const DDSHeader & header, TQImage & img ) { if( !LoadDXT3(s, header, img) ) return false; //UndoPremultiplyAlpha(img); return true; } - static bool LoadDXT5( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadDXT5( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -657,14 +657,14 @@ namespace { // Private. return true; } - static bool LoadDXT4( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadDXT4( TQDataStream & s, const DDSHeader & header, TQImage & img ) { if( !LoadDXT5(s, header, img) ) return false; //UndoPremultiplyAlpha(img); return true; } - static bool LoadRXGB( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadRXGB( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -713,7 +713,7 @@ namespace { // Private. return true; } - static bool LoadATI2( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadATI2( TQDataStream & s, const DDSHeader & header, TQImage & img ) { const uint w = header.width; const uint h = header.height; @@ -769,7 +769,7 @@ namespace { // Private. - typedef bool (* TextureLoader)( QDataStream & s, const DDSHeader & header, QImage & img ); + typedef bool (* TextureLoader)( TQDataStream & s, const DDSHeader & header, TQImage & img ); // Get an appropiate texture loader for the given type. static TextureLoader GetTextureLoader( DDSType type ) { @@ -805,7 +805,7 @@ namespace { // Private. // Load a 2d texture. - static bool LoadTexture( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadTexture( TQDataStream & s, const DDSHeader & header, TQImage & img ) { // Create dst image. if( !img.create( header.width, header.height, 32 )) { @@ -875,7 +875,7 @@ namespace { // Private. }; // Load unwrapped cube map. - static bool LoadCubeMap( QDataStream & s, const DDSHeader & header, QImage & img ) + static bool LoadCubeMap( TQDataStream & s, const DDSHeader & header, TQImage & img ) { // Create dst image. #if CUBE_LAYOUT == HORIZONTAL @@ -905,7 +905,7 @@ namespace { // Private. img.fill( 0 ); // Create face image. - QImage face; + TQImage face; if( !face.create( header.width, header.height, 32 )) { return false; } @@ -953,10 +953,10 @@ namespace { // Private. } -KDE_EXPORT void kimgio_dds_read( QImageIO *io ) +KDE_EXPORT void kimgio_dds_read( TQImageIO *io ) { - QDataStream s( io->ioDevice() ); - s.setByteOrder( QDataStream::LittleEndian ); + TQDataStream s( io->ioDevice() ); + s.setByteOrder( TQDataStream::LittleEndian ); // Validate header. uint fourcc; @@ -989,7 +989,7 @@ KDE_EXPORT void kimgio_dds_read( QImageIO *io ) } - QImage img; + TQImage img; bool result; if( IsCubeMap( header ) ) { @@ -1011,7 +1011,7 @@ KDE_EXPORT void kimgio_dds_read( QImageIO *io ) } -KDE_EXPORT void kimgio_dds_write( QImageIO * ) +KDE_EXPORT void kimgio_dds_write( TQImageIO * ) { // TODO Stub! } diff --git a/kimgio/dds.h b/kimgio/dds.h index 0f79a5ad9..6933f2b63 100644 --- a/kimgio/dds.h +++ b/kimgio/dds.h @@ -13,8 +13,8 @@ class QImageIO; extern "C" { -void kimgio_dds_read( QImageIO * ); -void kimgio_dds_write( QImageIO * ); +void kimgio_dds_read( TQImageIO * ); +void kimgio_dds_write( TQImageIO * ); } #endif diff --git a/kimgio/eps.cpp b/kimgio/eps.cpp index b1b3e28f5..5067fb8e1 100644 --- a/kimgio/eps.cpp +++ b/kimgio/eps.cpp @@ -1,10 +1,10 @@ // This library is distributed under the conditions of the GNU LGPL. #include <unistd.h> #include <stdio.h> -#include <qimage.h> -#include <qfile.h> -#include <qpainter.h> -#include <qprinter.h> +#include <tqimage.h> +#include <tqfile.h> +#include <tqpainter.h> +#include <tqprinter.h> #include <kapplication.h> #include <ktempfile.h> #include <kdebug.h> @@ -15,7 +15,7 @@ #define BBOX "%%BoundingBox:" #define BBOX_LEN strlen(BBOX) -static bool seekToCodeStart( QIODevice * io, Q_UINT32 & ps_offset, Q_UINT32 & ps_size ) +static bool seekToCodeStart( TQIODevice * io, Q_UINT32 & ps_offset, Q_UINT32 & ps_size ) { char buf[4]; // We at most need to read 4 bytes at a time ps_offset=0L; @@ -95,7 +95,7 @@ static bool seekToCodeStart( QIODevice * io, Q_UINT32 & ps_offset, Q_UINT32 & ps return true; } -static bool bbox ( QIODevice *io, int *x1, int *y1, int *x2, int *y2) +static bool bbox ( TQIODevice *io, int *x1, int *y1, int *x2, int *y2) { char buf[BUFLEN+1]; @@ -121,19 +121,19 @@ static bool bbox ( QIODevice *io, int *x1, int *y1, int *x2, int *y2) return ret; } -KDE_EXPORT void kimgio_eps_read (QImageIO *image) +KDE_EXPORT void kimgio_eps_read (TQImageIO *image) { kdDebug(399) << "kimgio EPS: starting..." << endl; FILE * ghostfd; int x1, y1, x2, y2; - //QTime dt; + //TQTime dt; //dt.start(); - QString cmdBuf; - QString tmp; + TQString cmdBuf; + TQString tmp; - QIODevice* io = image->ioDevice(); + TQIODevice* io = image->ioDevice(); Q_UINT32 ps_offset, ps_size; // find start of PostScript code @@ -170,7 +170,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image) if (image->parameters()) { // Size forced by the caller - QStringList params = QStringList::split(':', image->parameters()); + TQStringList params = TQStringList::split(':', image->parameters()); if (params.count() >= 2 && x2 != 0.0 && y2 != 0.0) { wantedWidth = params[0].toInt(); @@ -203,7 +203,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image) // run ghostview - ghostfd = popen (QFile::encodeName(cmdBuf), "w"); + ghostfd = popen (TQFile::encodeName(cmdBuf), "w"); if ( ghostfd == 0 ) { kdError(399) << "kimgio EPS: no GhostScript?" << endl; @@ -219,7 +219,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image) io->reset(); // Go back to start of file to give all the file to GhostScript if (ps_offset>0L) // We have an offset io->at(ps_offset); - QByteArray buffer ( io->readAll() ); + TQByteArray buffer ( io->readAll() ); // If we have no MS-DOS EPS file or if the size seems wrong, then choose the buffer size if (ps_size<=0L || ps_size>buffer.size()) @@ -231,7 +231,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image) pclose ( ghostfd ); // load image - QImage myimage; + TQImage myimage; if( myimage.load (tmpFile.name()) ) { image->setImage (myimage); image->setStatus (0); @@ -245,17 +245,17 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image) } // Sven Wiegand <[email protected]> -- eps output filter (from KSnapshot) -KDE_EXPORT void kimgio_eps_write( QImageIO *imageio ) +KDE_EXPORT void kimgio_eps_write( TQImageIO *imageio ) { - QPrinter psOut(QPrinter::PrinterResolution); - QPainter p; + TQPrinter psOut(TQPrinter::PrinterResolution); + TQPainter p; // making some definitions (papersize, output to file, filename): psOut.setCreator( "KDE " KDE_VERSION_STRING ); psOut.setOutputToFile( true ); // Extension must be .eps so that Qt generates EPS file - KTempFile tmpFile(QString::null, ".eps"); + KTempFile tmpFile(TQString::null, ".eps"); tmpFile.setAutoDelete(true); if ( tmpFile.status() != 0) return; @@ -267,20 +267,20 @@ KDE_EXPORT void kimgio_eps_write( QImageIO *imageio ) // painting the pixmap to the "printer" which is a file p.begin( &psOut ); // Qt uses the clip rect for the bounding box - p.setClipRect( 0, 0, imageio->image().width(), imageio->image().height(), QPainter::CoordPainter); - p.drawImage( QPoint( 0, 0 ), imageio->image() ); + p.setClipRect( 0, 0, imageio->image().width(), imageio->image().height(), TQPainter::CoordPainter); + p.drawImage( TQPoint( 0, 0 ), imageio->image() ); p.end(); // Copy file to imageio struct - QFile inFile(tmpFile.name()); + TQFile inFile(tmpFile.name()); inFile.open( IO_ReadOnly ); - QTextStream in( &inFile ); - in.setEncoding( QTextStream::Latin1 ); - QTextStream out( imageio->ioDevice() ); - out.setEncoding( QTextStream::Latin1 ); + TQTextStream in( &inFile ); + in.setEncoding( TQTextStream::Latin1 ); + TQTextStream out( imageio->ioDevice() ); + out.setEncoding( TQTextStream::Latin1 ); - QString szInLine = in.readLine(); + TQString szInLine = in.readLine(); out << szInLine << '\n'; while( !in.atEnd() ){ diff --git a/kimgio/eps.h b/kimgio/eps.h index ecdd82787..78dfdfb1e 100644 --- a/kimgio/eps.h +++ b/kimgio/eps.h @@ -3,8 +3,8 @@ #define _EPS_H extern "C" { -void kimgio_eps_read (QImageIO *image); -void kimgio_eps_write (QImageIO *image); +void kimgio_eps_read (TQImageIO *image); +void kimgio_eps_write (TQImageIO *image); } #endif diff --git a/kimgio/exr.cpp b/kimgio/exr.cpp index e3efe5a6a..e45812700 100644 --- a/kimgio/exr.cpp +++ b/kimgio/exr.cpp @@ -39,13 +39,13 @@ #include <kgenericfactory.h> #include <kdebug.h> -#include <qimage.h> -#include <qcstring.h> -#include <qfile.h> -#include <qdatetime.h> -#include <qdict.h> -#include <qvalidator.h> -#include <qcolor.h> +#include <tqimage.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqdatetime.h> +#include <tqdict.h> +#include <tqvalidator.h> +#include <tqcolor.h> #include "exr.h" @@ -116,14 +116,14 @@ QRgb RgbaToQrgba(struct Rgba imagePixel) char (Imath::clamp ( a * 84.66f, 0.f, 255.f ) ) ); } -KDE_EXPORT void kimgio_exr_read( QImageIO *io ) +KDE_EXPORT void kimgio_exr_read( TQImageIO *io ) { try { int width, height; - // This won't work if io is not QFile ! - RgbaInputFile file (QFile::encodeName(io->fileName())); + // This won't work if io is not TQFile ! + RgbaInputFile file (TQFile::encodeName(io->fileName())); Imath::Box2i dw = file.dataWindow(); width = dw.max.x - dw.min.x + 1; @@ -135,7 +135,7 @@ KDE_EXPORT void kimgio_exr_read( QImageIO *io ) file.setFrameBuffer (&pixels[0][0] - dw.min.x - dw.min.y * width, 1, width); file.readPixels (dw.min.y, dw.max.y); - QImage image(width, height, 32, 0, QImage::BigEndian); + TQImage image(width, height, 32, 0, TQImage::BigEndian); if( image.isNull()) return; @@ -158,7 +158,7 @@ KDE_EXPORT void kimgio_exr_read( QImageIO *io ) } -KDE_EXPORT void kimgio_exr_write(QImageIO *) +KDE_EXPORT void kimgio_exr_write(TQImageIO *) { // TODO: stub } diff --git a/kimgio/exr.h b/kimgio/exr.h index 9a039c6c6..04bd6d956 100644 --- a/kimgio/exr.h +++ b/kimgio/exr.h @@ -1,5 +1,5 @@ /** -* QImageIO Routines to read (and perhaps in the future, write) images +* TQImageIO Routines to read (and perhaps in the future, write) images * in the high definition EXR format. * * Copyright (c) 2003, Brad Hards <[email protected]> @@ -14,8 +14,8 @@ class QImageIO; extern "C" { - void kimgio_exr_read (QImageIO *io); - void kimgio_exr_write (QImageIO *io); + void kimgio_exr_read (TQImageIO *io); + void kimgio_exr_write (TQImageIO *io); } #endif diff --git a/kimgio/g3r.cpp b/kimgio/g3r.cpp index d67aa2da6..1efb07434 100644 --- a/kimgio/g3r.cpp +++ b/kimgio/g3r.cpp @@ -6,15 +6,15 @@ #include <tiffio.h> -#include <qimage.h> -#include <qfile.h> +#include <tqimage.h> +#include <tqfile.h> #include "g3r.h" -KDE_EXPORT void kimgio_g3_read( QImageIO *io ) +KDE_EXPORT void kimgio_g3_read( TQImageIO *io ) { - // This won't work if io is not a QFile ! - TIFF *tiff = TIFFOpen(QFile::encodeName(io->fileName()), "r"); + // This won't work if io is not a TQFile ! + TIFF *tiff = TIFFOpen(TQFile::encodeName(io->fileName()), "r"); if (!tiff) return; @@ -26,7 +26,7 @@ KDE_EXPORT void kimgio_g3_read( QImageIO *io ) return; scanlength = TIFFScanlineSize(tiff); - QImage image(width, height, 1, 0, QImage::BigEndian); + TQImage image(width, height, 1, 0, TQImage::BigEndian); if (image.isNull() || scanlength != image.bytesPerLine()) { @@ -44,7 +44,7 @@ KDE_EXPORT void kimgio_g3_read( QImageIO *io ) } -KDE_EXPORT void kimgio_g3_write(QImageIO *) +KDE_EXPORT void kimgio_g3_write(TQImageIO *) { // TODO: stub } diff --git a/kimgio/g3r.h b/kimgio/g3r.h index df90c5dee..f734a9e82 100644 --- a/kimgio/g3r.h +++ b/kimgio/g3r.h @@ -1,5 +1,5 @@ /** -* QImageIO Routines to read/write g3 (fax) images. +* TQImageIO Routines to read/write g3 (fax) images. * (c) 2000, Matthias H�lzer-Kl�pfel * * This library is distributed under the conditions of the GNU LGPL. @@ -13,8 +13,8 @@ class QImageIO; extern "C" { - void kimgio_g3_read( QImageIO *io ); - void kimgio_g3_write( QImageIO *io ); + void kimgio_g3_read( TQImageIO *io ); + void kimgio_g3_write( TQImageIO *io ); } #endif diff --git a/kimgio/gimp.h b/kimgio/gimp.h index 94a6086d4..114ffdc0f 100644 --- a/kimgio/gimp.h +++ b/kimgio/gimp.h @@ -46,7 +46,7 @@ const uchar OPAQUE_OPACITY = 255; //!< Opaque value for 8-bit alpha component. // From GIMP "apptypes.h" v1.2 -//! Basic GIMP image type. QImage converter may produce a deeper image +//! Basic GIMP image type. TQImage converter may produce a deeper image //! than is specified here. For example, a grayscale image with an //! alpha channel must (currently) use a 32-bit Qt image. diff --git a/kimgio/hdr.cpp b/kimgio/hdr.cpp index edc49f91b..bf8bc5f03 100644 --- a/kimgio/hdr.cpp +++ b/kimgio/hdr.cpp @@ -10,8 +10,8 @@ #include "hdr.h" -#include <qimage.h> -#include <qdatastream.h> +#include <tqimage.h> +#include <tqdatastream.h> #include <kdebug.h> #include <kglobal.h> @@ -33,7 +33,7 @@ namespace { // Private. // read an old style line from the hdr image file // if 'first' is true the first byte is already read - static bool Read_Old_Line (uchar * image, int width, QDataStream & s) + static bool Read_Old_Line (uchar * image, int width, TQDataStream & s) { int rshift = 0; int i; @@ -94,7 +94,7 @@ namespace { // Private. } // Load the HDR image. - static bool LoadHDR( QDataStream & s, const int width, const int height, QImage & img ) + static bool LoadHDR( TQDataStream & s, const int width, const int height, TQImage & img ) { uchar val, code; @@ -104,7 +104,7 @@ namespace { // Private. return false; } - QMemArray<uchar> image( width * 4 ); + TQMemArray<uchar> image( width * 4 ); for (int cline = 0; cline < height; cline++) { @@ -199,7 +199,7 @@ namespace { // Private. } // namespace -KDE_EXPORT void kimgio_hdr_read( QImageIO * io ) +KDE_EXPORT void kimgio_hdr_read( TQImageIO * io ) { int len; char line[MAXLINE]; @@ -242,9 +242,9 @@ KDE_EXPORT void kimgio_hdr_read( QImageIO * io ) return; } - QDataStream s( io->ioDevice() ); + TQDataStream s( io->ioDevice() ); - QImage img; + TQImage img; if( !LoadHDR(s, width, height, img) ) { kdDebug(399) << "Error loading HDR file." << endl; @@ -258,7 +258,7 @@ KDE_EXPORT void kimgio_hdr_read( QImageIO * io ) } -KDE_EXPORT void kimgio_hdr_write( QImageIO * ) +KDE_EXPORT void kimgio_hdr_write( TQImageIO * ) { // intentionally not implemented (since writing low dynamic range data to a HDR file is nonsense.) } diff --git a/kimgio/hdr.h b/kimgio/hdr.h index 34c833f73..327d3d6d2 100644 --- a/kimgio/hdr.h +++ b/kimgio/hdr.h @@ -13,8 +13,8 @@ class QImageIO; extern "C" { -void kimgio_hdr_read( QImageIO * ); -void kimgio_hdr_write( QImageIO * ); +void kimgio_hdr_read( TQImageIO * ); +void kimgio_hdr_write( TQImageIO * ); } #endif diff --git a/kimgio/ico.cpp b/kimgio/ico.cpp index bc1ba388d..01ee37a1b 100644 --- a/kimgio/ico.cpp +++ b/kimgio/ico.cpp @@ -13,11 +13,11 @@ #include <algorithm> #include <vector> -#include <qimage.h> -#include <qbitmap.h> -#include <qapplication.h> -#include <qmemarray.h> -#include <qpaintdevicemetrics.h> +#include <tqimage.h> +#include <tqbitmap.h> +#include <tqapplication.h> +#include <tqmemarray.h> +#include <tqpaintdevicemetrics.h> #include <kdelibs_export.h> @@ -34,7 +34,7 @@ namespace Q_UINT16 count; }; - inline QDataStream& operator >>( QDataStream& s, IcoHeader& h ) + inline TQDataStream& operator >>( TQDataStream& s, IcoHeader& h ) { return s >> h.reserved >> h.type >> h.count; } @@ -59,7 +59,7 @@ namespace }; const Q_UINT32 BMP_INFOHDR::Size; - QDataStream& operator >>( QDataStream &s, BMP_INFOHDR &bi ) + TQDataStream& operator >>( TQDataStream &s, BMP_INFOHDR &bi ) { s >> bi.biSize; if ( bi.biSize == BMP_INFOHDR::Size ) @@ -73,7 +73,7 @@ namespace } #if 0 - QDataStream &operator<<( QDataStream &s, const BMP_INFOHDR &bi ) + TQDataStream &operator<<( TQDataStream &s, const BMP_INFOHDR &bi ) { s << bi.biSize; s << bi.biWidth << bi.biHeight; @@ -99,7 +99,7 @@ namespace Q_UINT32 offset; }; - inline QDataStream& operator >>( QDataStream& s, IconRec& r ) + inline TQDataStream& operator >>( TQDataStream& s, IconRec& r ) { return s >> r.width >> r.height >> r.colors >> r.hotspotX >> r.hotspotY >> r.size >> r.offset; @@ -137,7 +137,7 @@ namespace unsigned colors; }; - bool loadFromDIB( QDataStream& stream, const IconRec& rec, QImage& icon ) + bool loadFromDIB( TQDataStream& stream, const IconRec& rec, TQImage& icon ) { BMP_INFOHDR header; stream >> header; @@ -169,7 +169,7 @@ namespace if ( icon.isNull() ) return false; icon.setAlphaBuffer( true ); - QMemArray< QRgb > colorTable( paletteSize ); + TQMemArray< QRgb > colorTable( paletteSize ); colorTable.fill( QRgb( 0 ) ); for ( unsigned i = 0; i < paletteEntries; ++i ) @@ -241,30 +241,30 @@ namespace } } -extern "C" KDE_EXPORT void kimgio_ico_read( QImageIO* io ) +extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io ) { - QIODevice::Offset offset = io->ioDevice()->at(); + TQIODevice::Offset offset = io->ioDevice()->at(); - QDataStream stream( io->ioDevice() ); - stream.setByteOrder( QDataStream::LittleEndian ); + TQDataStream stream( io->ioDevice() ); + stream.setByteOrder( TQDataStream::LittleEndian ); IcoHeader header; stream >> header; if ( stream.atEnd() || !header.count || ( header.type != IcoHeader::Icon && header.type != IcoHeader::Cursor) ) return; - QPaintDeviceMetrics metrics( QApplication::desktop() ); + TQPaintDeviceMetrics metrics( TQApplication::desktop() ); unsigned requestedSize = 32; unsigned requestedColors = metrics.depth() > 8 ? 0 : metrics.depth(); int requestedIndex = -1; if ( io->parameters() ) { - QStringList params = QStringList::split( ';', io->parameters() ); - QMap< QString, QString > options; - for ( QStringList::ConstIterator it = params.begin(); + TQStringList params = TQStringList::split( ';', io->parameters() ); + TQMap< TQString, TQString > options; + for ( TQStringList::ConstIterator it = params.begin(); it != params.end(); ++it ) { - QStringList tmp = QStringList::split( '=', *it ); + TQStringList tmp = TQStringList::split( '=', *it ); if ( tmp.count() == 2 ) options[ tmp[ 0 ] ] = tmp[ 1 ]; } if ( options[ "index" ].toUInt() ) @@ -296,14 +296,14 @@ extern "C" KDE_EXPORT void kimgio_ico_read( QImageIO* io ) return; io->ioDevice()->at( offset + selected->offset ); - QImage icon; + TQImage icon; if ( loadFromDIB( stream, *selected, icon ) ) { - icon.setText( "X-Index", 0, QString::number( selected - icons.begin() ) ); + icon.setText( "X-Index", 0, TQString::number( selected - icons.begin() ) ); if ( header.type == IcoHeader::Cursor ) { - icon.setText( "X-HotspotX", 0, QString::number( selected->hotspotX ) ); - icon.setText( "X-HotspotY", 0, QString::number( selected->hotspotY ) ); + icon.setText( "X-HotspotX", 0, TQString::number( selected->hotspotX ) ); + icon.setText( "X-HotspotY", 0, TQString::number( selected->hotspotY ) ); } io->setImage(icon); io->setStatus(0); @@ -311,17 +311,17 @@ extern "C" KDE_EXPORT void kimgio_ico_read( QImageIO* io ) } #if 0 -void kimgio_ico_write(QImageIO *io) +void kimgio_ico_write(TQImageIO *io) { if (io->image().isNull()) return; - QByteArray dibData; - QDataStream dib(dibData, IO_ReadWrite); - dib.setByteOrder(QDataStream::LittleEndian); + TQByteArray dibData; + TQDataStream dib(dibData, IO_ReadWrite); + dib.setByteOrder(TQDataStream::LittleEndian); - QImage pixels = io->image(); - QImage mask; + TQImage pixels = io->image(); + TQImage mask; if (io->image().hasAlphaBuffer()) mask = io->image().createAlphaMask(); else @@ -340,8 +340,8 @@ void kimgio_ico_write(QImageIO *io) memmove(dibData.data() + hdrPos, dibData.data() + hdrPos + BMP_WIN + 8, dibData.size() - hdrPos - BMP_WIN - 8); dibData.resize(dibData.size() - BMP_WIN - 8); - QDataStream ico(io->ioDevice()); - ico.setByteOrder(QDataStream::LittleEndian); + TQDataStream ico(io->ioDevice()); + ico.setByteOrder(TQDataStream::LittleEndian); IcoHeader hdr; hdr.reserved = 0; hdr.type = Icon; diff --git a/kimgio/ico.h b/kimgio/ico.h index 4492d4d9d..335cc8237 100644 --- a/kimgio/ico.h +++ b/kimgio/ico.h @@ -8,7 +8,7 @@ * */ -// You can use QImageIO::setParameters() to request a specific +// You can use TQImageIO::setParameters() to request a specific // Icon out of an .ico file: // // Options consist of a name=value pair and are separated by a semicolon. @@ -39,8 +39,8 @@ class QImageIO; extern "C" { - void kimgio_ico_read(QImageIO *); -// void kimgio_ico_write(QImageIO *); + void kimgio_ico_read(TQImageIO *); +// void kimgio_ico_write(TQImageIO *); } #endif diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp index 3e44275d8..71b260375 100644 --- a/kimgio/jp2.cpp +++ b/kimgio/jp2.cpp @@ -13,10 +13,10 @@ #include <stdint.h> #endif #include <ktempfile.h> -#include <qcolor.h> -#include <qcstring.h> -#include <qfile.h> -#include <qimage.h> +#include <tqcolor.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqimage.h> // dirty, but avoids a warning because jasper.h includes jas_config.h. #undef PACKAGE @@ -39,27 +39,27 @@ typedef struct { jas_image_t* -read_image( const QImageIO* io ) +read_image( const TQImageIO* io ) { jas_stream_t* in = 0; - // for QIODevice's other than QFile, a temp. file is used. + // for QIODevice's other than TQFile, a temp. file is used. KTempFile* tempf = 0; - QFile* qf = 0; - if( ( qf = dynamic_cast<QFile*>( io->ioDevice() ) ) ) { - // great, it's a QFile. Let's just take the filename. - in = jas_stream_fopen( QFile::encodeName( qf->name() ), "rb" ); + TQFile* qf = 0; + if( ( qf = dynamic_cast<TQFile*>( io->ioDevice() ) ) ) { + // great, it's a TQFile. Let's just take the filename. + in = jas_stream_fopen( TQFile::encodeName( qf->name() ), "rb" ); } else { - // not a QFile. Copy the whole data to a temp. file. + // not a TQFile. Copy the whole data to a temp. file. tempf = new KTempFile(); if( tempf->status() != 0 ) { delete tempf; return 0; } // if tempf->setAutoDelete( true ); - QFile* out = tempf->file(); + TQFile* out = tempf->file(); // 4096 (=4k) is a common page size. - QByteArray b( 4096 ); + TQByteArray b( 4096 ); Q_LONG size; // 0 or -1 is EOF / error while( ( size = io->ioDevice()->readBlock( b.data(), 4096 ) ) > 0 ) { @@ -69,7 +69,7 @@ read_image( const QImageIO* io ) // flush everything out to disk out->flush(); - in = jas_stream_fopen( QFile::encodeName( tempf->name() ), "rb" ); + in = jas_stream_fopen( TQFile::encodeName( tempf->name() ), "rb" ); } // else if( !in ) { delete tempf; @@ -98,7 +98,7 @@ convert_colorspace( gs_t& gs ) } // convert_colorspace static bool -render_view( gs_t& gs, QImage& qti ) +render_view( gs_t& gs, TQImage& qti ) { if((gs.cmptlut[0] = jas_image_getcmptbytype(gs.altimage, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R))) < 0 || @@ -147,7 +147,7 @@ render_view( gs_t& gs, QImage& qti ) KDE_EXPORT void -kimgio_jp2_read( QImageIO* io ) +kimgio_jp2_read( TQImageIO* io ) { if( jas_init() ) return; @@ -156,7 +156,7 @@ kimgio_jp2_read( QImageIO* io ) if( !convert_colorspace( gs ) ) return; - QImage image; + TQImage image; render_view( gs, image ); if( gs.image ) jas_image_destroy( gs.image ); @@ -168,7 +168,7 @@ kimgio_jp2_read( QImageIO* io ) static jas_image_t* -create_image( const QImage& qi ) +create_image( const TQImage& qi ) { // prepare the component parameters jas_image_cmptparm_t* cmptparms = new jas_image_cmptparm_t[ 3 ]; @@ -198,7 +198,7 @@ create_image( const QImage& qi ) static bool -write_components( jas_image_t* ji, const QImage& qi ) +write_components( jas_image_t* ji, const TQImage& qi ) { const unsigned height = qi.height(); const unsigned width = qi.width(); @@ -231,7 +231,7 @@ write_components( jas_image_t* ji, const QImage& qi ) } // write_components KDE_EXPORT void -kimgio_jp2_write( QImageIO* io ) +kimgio_jp2_write( TQImageIO* io ) { if( jas_init() ) return; @@ -239,9 +239,9 @@ kimgio_jp2_write( QImageIO* io ) // temporary file otherwise. jas_stream_t* stream = 0; - QFile* qf = 0; + TQFile* qf = 0; KTempFile* ktempf = 0; - if( ( qf = dynamic_cast<QFile*>( io->ioDevice() ) ) ) { + if( ( qf = dynamic_cast<TQFile*>( io->ioDevice() ) ) ) { // jas_stream_fdopen works here, but not when reading... stream = jas_stream_fdopen( dup( qf->handle() ), "w" ); } else { @@ -272,8 +272,8 @@ kimgio_jp2_write( QImageIO* io ) // - rate=#B => the resulting file size is about # bytes // - rate=0.0 .. 1.0 => the resulting file size is about the factor times // the uncompressed size - QString rate; - QTextStream ts( &rate, IO_WriteOnly ); + TQString rate; + TQTextStream ts( &rate, IO_WriteOnly ); ts << "rate=" << ( (io->quality() < 0) ? DEFAULT_RATE : io->quality() / 100.0F ); int i = jp2_encode( ji, stream, rate.utf8().data() ); @@ -285,9 +285,9 @@ kimgio_jp2_write( QImageIO* io ) if( ktempf ) { // We've written to a tempfile. Copy the data to the final destination. - QFile* in = ktempf->file(); + TQFile* in = ktempf->file(); - QByteArray b( 4096 ); + TQByteArray b( 4096 ); Q_LONG size; // seek to the beginning of the file. diff --git a/kimgio/jp2.h b/kimgio/jp2.h index d137ac0a3..c71820af5 100644 --- a/kimgio/jp2.h +++ b/kimgio/jp2.h @@ -5,8 +5,8 @@ class QImageIO; extern "C" { - void kimgio_jp2_read( QImageIO* io ); - void kimgio_jp2_write( QImageIO* io ); + void kimgio_jp2_read( TQImageIO* io ); + void kimgio_jp2_write( TQImageIO* io ); } // extern "C" #endif diff --git a/kimgio/pcx.cpp b/kimgio/pcx.cpp index 867829eb6..3d866ad0a 100644 --- a/kimgio/pcx.cpp +++ b/kimgio/pcx.cpp @@ -9,18 +9,18 @@ #include "pcx.h" -#include <qimage.h> +#include <tqimage.h> #include <kdebug.h> -static QDataStream &operator>>( QDataStream &s, RGB &rgb ) +static TQDataStream &operator>>( TQDataStream &s, RGB &rgb ) { s >> rgb.r >> rgb.g >> rgb.b; return s; } -static QDataStream &operator>>( QDataStream &s, Palette &pal ) +static TQDataStream &operator>>( TQDataStream &s, Palette &pal ) { for ( int i=0; i<16; ++i ) s >> pal.rgb[ i ]; @@ -28,7 +28,7 @@ static QDataStream &operator>>( QDataStream &s, Palette &pal ) return s; } -static QDataStream &operator>>( QDataStream &s, PCXHEADER &ph ) +static TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph ) { s >> ph.Manufacturer; s >> ph.Version; @@ -52,14 +52,14 @@ static QDataStream &operator>>( QDataStream &s, PCXHEADER &ph ) return s; } -static QDataStream &operator<<( QDataStream &s, const RGB &rgb ) +static TQDataStream &operator<<( TQDataStream &s, const RGB &rgb ) { s << rgb.r << rgb.g << rgb.b; return s; } -static QDataStream &operator<<( QDataStream &s, const Palette &pal ) +static TQDataStream &operator<<( TQDataStream &s, const Palette &pal ) { for ( int i=0; i<16; ++i ) s << pal.rgb[ i ]; @@ -67,7 +67,7 @@ static QDataStream &operator<<( QDataStream &s, const Palette &pal ) return s; } -static QDataStream &operator<<( QDataStream &s, const PCXHEADER &ph ) +static TQDataStream &operator<<( TQDataStream &s, const PCXHEADER &ph ) { s << ph.Manufacturer; s << ph.Version; @@ -93,13 +93,13 @@ static QDataStream &operator<<( QDataStream &s, const PCXHEADER &ph ) PCXHEADER::PCXHEADER() { // Initialize all data to zero - QByteArray dummy( 128 ); + TQByteArray dummy( 128 ); dummy.fill( 0 ); - QDataStream s( dummy, IO_ReadOnly ); + TQDataStream s( dummy, IO_ReadOnly ); s >> *this; } -static void readLine( QDataStream &s, QByteArray &buf, const PCXHEADER &header ) +static void readLine( TQDataStream &s, TQByteArray &buf, const PCXHEADER &header ) { Q_UINT32 i=0; Q_UINT32 size = buf.size(); @@ -132,11 +132,11 @@ static void readLine( QDataStream &s, QByteArray &buf, const PCXHEADER &header ) } } -static void readImage1( QImage &img, QDataStream &s, const PCXHEADER &header ) +static void readImage1( TQImage &img, TQDataStream &s, const PCXHEADER &header ) { - QByteArray buf( header.BytesPerLine ); + TQByteArray buf( header.BytesPerLine ); - if(!img.create( header.width(), header.height(), 1, 2, QImage::BigEndian )) + if(!img.create( header.width(), header.height(), 1, 2, TQImage::BigEndian )) return; for ( int y=0; y<header.height(); ++y ) @@ -159,10 +159,10 @@ static void readImage1( QImage &img, QDataStream &s, const PCXHEADER &header ) img.setColor( 1, qRgb( 255, 255, 255 ) ); } -static void readImage4( QImage &img, QDataStream &s, const PCXHEADER &header ) +static void readImage4( TQImage &img, TQDataStream &s, const PCXHEADER &header ) { - QByteArray buf( header.BytesPerLine*4 ); - QByteArray pixbuf( header.width() ); + TQByteArray buf( header.BytesPerLine*4 ); + TQByteArray pixbuf( header.width() ); if(!img.create( header.width(), header.height(), 8, 16 )) return; @@ -196,9 +196,9 @@ static void readImage4( QImage &img, QDataStream &s, const PCXHEADER &header ) img.setColor( i, header.ColorMap.color( i ) ); } -static void readImage8( QImage &img, QDataStream &s, const PCXHEADER &header ) +static void readImage8( TQImage &img, TQDataStream &s, const PCXHEADER &header ) { - QByteArray buf( header.BytesPerLine ); + TQByteArray buf( header.BytesPerLine ); if(!img.create( header.width(), header.height(), 8, 256 )) return; @@ -235,11 +235,11 @@ static void readImage8( QImage &img, QDataStream &s, const PCXHEADER &header ) } } -static void readImage24( QImage &img, QDataStream &s, const PCXHEADER &header ) +static void readImage24( TQImage &img, TQDataStream &s, const PCXHEADER &header ) { - QByteArray r_buf( header.BytesPerLine ); - QByteArray g_buf( header.BytesPerLine ); - QByteArray b_buf( header.BytesPerLine ); + TQByteArray r_buf( header.BytesPerLine ); + TQByteArray g_buf( header.BytesPerLine ); + TQByteArray b_buf( header.BytesPerLine ); if(!img.create( header.width(), header.height(), 32 )) return; @@ -262,10 +262,10 @@ static void readImage24( QImage &img, QDataStream &s, const PCXHEADER &header ) } } -KDE_EXPORT void kimgio_pcx_read( QImageIO *io ) +KDE_EXPORT void kimgio_pcx_read( TQImageIO *io ) { - QDataStream s( io->ioDevice() ); - s.setByteOrder( QDataStream::LittleEndian ); + TQDataStream s( io->ioDevice() ); + s.setByteOrder( TQDataStream::LittleEndian ); if ( s.device()->size() < 128 ) { @@ -297,7 +297,7 @@ KDE_EXPORT void kimgio_pcx_read( QImageIO *io ) kdDebug( 399 ) << "BytesPerLine: " << header.BytesPerLine << endl; kdDebug( 399 ) << "NPlanes: " << header.NPlanes << endl; - QImage img; + TQImage img; if ( header.Bpp == 1 && header.NPlanes == 1 ) { @@ -331,7 +331,7 @@ KDE_EXPORT void kimgio_pcx_read( QImageIO *io ) } } -static void writeLine( QDataStream &s, QByteArray &buf ) +static void writeLine( TQDataStream &s, TQByteArray &buf ) { Q_UINT32 i = 0; Q_UINT32 size = buf.size(); @@ -361,9 +361,9 @@ static void writeLine( QDataStream &s, QByteArray &buf ) } } -static void writeImage1( QImage &img, QDataStream &s, PCXHEADER &header ) +static void writeImage1( TQImage &img, TQDataStream &s, PCXHEADER &header ) { - img = img.convertBitOrder( QImage::BigEndian ); + img = img.convertBitOrder( TQImage::BigEndian ); header.Bpp = 1; header.NPlanes = 1; @@ -371,13 +371,13 @@ static void writeImage1( QImage &img, QDataStream &s, PCXHEADER &header ) s << header; - QByteArray buf( header.BytesPerLine ); + TQByteArray buf( header.BytesPerLine ); for ( int y=0; y<header.height(); ++y ) { Q_UINT8 *p = img.scanLine( y ); - // Invert as QImage uses reverse palette for monochrome images? + // Invert as TQImage uses reverse palette for monochrome images? for ( int i=0; i<header.BytesPerLine; ++i ) buf[ i ] = ~p[ i ]; @@ -385,7 +385,7 @@ static void writeImage1( QImage &img, QDataStream &s, PCXHEADER &header ) } } -static void writeImage4( QImage &img, QDataStream &s, PCXHEADER &header ) +static void writeImage4( TQImage &img, TQDataStream &s, PCXHEADER &header ) { header.Bpp = 1; header.NPlanes = 4; @@ -396,7 +396,7 @@ static void writeImage4( QImage &img, QDataStream &s, PCXHEADER &header ) s << header; - QByteArray buf[ 4 ]; + TQByteArray buf[ 4 ]; for ( int i=0; i<4; ++i ) buf[ i ].resize( header.BytesPerLine ); @@ -420,7 +420,7 @@ static void writeImage4( QImage &img, QDataStream &s, PCXHEADER &header ) } } -static void writeImage8( QImage &img, QDataStream &s, PCXHEADER &header ) +static void writeImage8( TQImage &img, TQDataStream &s, PCXHEADER &header ) { header.Bpp = 8; header.NPlanes = 1; @@ -428,7 +428,7 @@ static void writeImage8( QImage &img, QDataStream &s, PCXHEADER &header ) s << header; - QByteArray buf( header.BytesPerLine ); + TQByteArray buf( header.BytesPerLine ); for ( int y=0; y<header.height(); ++y ) { @@ -449,7 +449,7 @@ static void writeImage8( QImage &img, QDataStream &s, PCXHEADER &header ) s << RGB( img.color( i ) ); } -static void writeImage24( QImage &img, QDataStream &s, PCXHEADER &header ) +static void writeImage24( TQImage &img, TQDataStream &s, PCXHEADER &header ) { header.Bpp = 8; header.NPlanes = 3; @@ -457,9 +457,9 @@ static void writeImage24( QImage &img, QDataStream &s, PCXHEADER &header ) s << header; - QByteArray r_buf( header.width() ); - QByteArray g_buf( header.width() ); - QByteArray b_buf( header.width() ); + TQByteArray r_buf( header.width() ); + TQByteArray g_buf( header.width() ); + TQByteArray b_buf( header.width() ); for ( int y=0; y<header.height(); ++y ) { @@ -479,12 +479,12 @@ static void writeImage24( QImage &img, QDataStream &s, PCXHEADER &header ) } } -KDE_EXPORT void kimgio_pcx_write( QImageIO *io ) +KDE_EXPORT void kimgio_pcx_write( TQImageIO *io ) { - QDataStream s( io->ioDevice() ); - s.setByteOrder( QDataStream::LittleEndian ); + TQDataStream s( io->ioDevice() ); + s.setByteOrder( TQDataStream::LittleEndian ); - QImage img = io->image(); + TQImage img = io->image(); int w = img.width(); int h = img.height(); diff --git a/kimgio/pcx.h b/kimgio/pcx.h index 991cf6acb..72753df33 100644 --- a/kimgio/pcx.h +++ b/kimgio/pcx.h @@ -10,16 +10,16 @@ #ifndef PCX_H #define PCX_H -#include <qglobal.h> -#include <qdatastream.h> -#include <qcolor.h> +#include <tqglobal.h> +#include <tqdatastream.h> +#include <tqcolor.h> class QImageIO; extern "C" { - void kimgio_pcx_read( QImageIO * ); - void kimgio_pcx_write( QImageIO * ); + void kimgio_pcx_read( TQImageIO * ); + void kimgio_pcx_write( TQImageIO * ); } class RGB diff --git a/kimgio/psd.cpp b/kimgio/psd.cpp index 202fbacb4..13070a0c2 100644 --- a/kimgio/psd.cpp +++ b/kimgio/psd.cpp @@ -19,8 +19,8 @@ #include "psd.h" -#include <qimage.h> -#include <qdatastream.h> +#include <tqimage.h> +#include <tqdatastream.h> #include <kdebug.h> @@ -52,7 +52,7 @@ namespace { // Private. ushort color_mode; }; - static QDataStream & operator>> ( QDataStream & s, PSDHeader & header ) + static TQDataStream & operator>> ( TQDataStream & s, PSDHeader & header ) { s >> header.signature; s >> header.version; @@ -66,7 +66,7 @@ namespace { // Private. s >> header.color_mode; return s; } - static bool seekBy(QDataStream& s, unsigned int bytes) + static bool seekBy(TQDataStream& s, unsigned int bytes) { char buf[4096]; while (bytes) { @@ -108,7 +108,7 @@ namespace { // Private. } // Load the PSD image. - static bool LoadPSD( QDataStream & s, const PSDHeader & header, QImage & img ) + static bool LoadPSD( TQDataStream & s, const PSDHeader & header, TQImage & img ) { // Create dst image. if( !img.create( header.width, header.height, 32 )) { @@ -238,10 +238,10 @@ namespace { // Private. } // Private -void kimgio_psd_read( QImageIO *io ) +void kimgio_psd_read( TQImageIO *io ) { - QDataStream s( io->ioDevice() ); - s.setByteOrder( QDataStream::BigEndian ); + TQDataStream s( io->ioDevice() ); + s.setByteOrder( TQDataStream::BigEndian ); PSDHeader header; s >> header; @@ -262,7 +262,7 @@ void kimgio_psd_read( QImageIO *io ) return; } - QImage img; + TQImage img; if( !LoadPSD(s, header, img) ) { kdDebug(399) << "Error loading PSD file." << endl; io->setImage( 0 ); @@ -275,7 +275,7 @@ void kimgio_psd_read( QImageIO *io ) } -void kimgio_psd_write( QImageIO * ) +void kimgio_psd_write( TQImageIO * ) { // TODO Stub! } diff --git a/kimgio/psd.h b/kimgio/psd.h index 0b99ef75e..88ee3b5bc 100644 --- a/kimgio/psd.h +++ b/kimgio/psd.h @@ -15,8 +15,8 @@ class QImageIO; extern "C" { -KDE_EXPORT void kimgio_psd_read( QImageIO * ); -KDE_EXPORT void kimgio_psd_write( QImageIO * ); +KDE_EXPORT void kimgio_psd_read( TQImageIO * ); +KDE_EXPORT void kimgio_psd_write( TQImageIO * ); } #endif diff --git a/kimgio/rgb.cpp b/kimgio/rgb.cpp index 2e62f4f6f..71976685a 100644 --- a/kimgio/rgb.cpp +++ b/kimgio/rgb.cpp @@ -24,17 +24,17 @@ #include "rgb.h" -#include <qimage.h> +#include <tqimage.h> #include <kdebug.h> /////////////////////////////////////////////////////////////////////////////// -KDE_EXPORT void kimgio_rgb_read(QImageIO *io) +KDE_EXPORT void kimgio_rgb_read(TQImageIO *io) { SGIImage sgi(io); - QImage img; + TQImage img; if (!sgi.readImage(img)) { io->setImage(0); @@ -47,10 +47,10 @@ KDE_EXPORT void kimgio_rgb_read(QImageIO *io) } -KDE_EXPORT void kimgio_rgb_write(QImageIO *io) +KDE_EXPORT void kimgio_rgb_write(TQImageIO *io) { SGIImage sgi(io); - QImage img = io->image(); + TQImage img = io->image(); if (!sgi.writeImage(img)) io->setStatus(-1); @@ -62,7 +62,7 @@ KDE_EXPORT void kimgio_rgb_write(QImageIO *io) /////////////////////////////////////////////////////////////////////////////// -SGIImage::SGIImage(QImageIO *io) : +SGIImage::SGIImage(TQImageIO *io) : m_io(io), m_starttab(0), m_lengthtab(0) @@ -118,11 +118,11 @@ bool SGIImage::getRow(uchar *dest) } -bool SGIImage::readData(QImage& img) +bool SGIImage::readData(TQImage& img) { QRgb *c; Q_UINT32 *start = m_starttab; - QByteArray lguard(m_xsize); + TQByteArray lguard(m_xsize); uchar *line = (uchar *)lguard.data(); unsigned x, y; @@ -181,7 +181,7 @@ bool SGIImage::readData(QImage& img) } -bool SGIImage::readImage(QImage& img) +bool SGIImage::readImage(TQImage& img) { Q_INT8 u8; Q_INT16 u16; @@ -291,16 +291,16 @@ bool SGIImage::readImage(QImage& img) // TODO remove; for debugging purposes only -void RLEData::print(QString desc) const +void RLEData::print(TQString desc) const { - QString s = desc + ": "; + TQString s = desc + ": "; for (uint i = 0; i < size(); i++) - s += QString::number(at(i)) + ","; + s += TQString::number(at(i)) + ","; kdDebug() << "--- " << s << endl; } -void RLEData::write(QDataStream& s) +void RLEData::write(TQDataStream& s) { for (unsigned i = 0; i < size(); i++) s << at(i); @@ -328,13 +328,13 @@ uint RLEMap::insert(const uchar *d, uint l) return it.data(); m_offset += l; - return QMap<RLEData, uint>::insert(data, m_counter++).data(); + return TQMap<RLEData, uint>::insert(data, m_counter++).data(); } -QPtrVector<RLEData> RLEMap::vector() +TQPtrVector<RLEData> RLEMap::vector() { - QPtrVector<RLEData> v(size()); + TQPtrVector<RLEData> v(size()); for (Iterator it = begin(); it != end(); ++it) v.insert(it.data(), &it.key()); @@ -387,11 +387,11 @@ uint SGIImage::compact(uchar *d, uchar *s) } -bool SGIImage::scanData(const QImage& img) +bool SGIImage::scanData(const TQImage& img) { Q_UINT32 *start = m_starttab; - QCString lineguard(m_xsize * 2); - QCString bufguard(m_xsize); + TQCString lineguard(m_xsize * 2); + TQCString bufguard(m_xsize); uchar *line = (uchar *)lineguard.data(); uchar *buf = (uchar *)bufguard.data(); QRgb *c; @@ -451,7 +451,7 @@ void SGIImage::writeHeader() m_stream << Q_UINT32(0); uint i; - QString desc = m_io->description(); + TQString desc = m_io->description(); kdDebug(399) << "Description: " << desc << endl; desc.truncate(79); @@ -488,7 +488,7 @@ void SGIImage::writeRle() } -void SGIImage::writeVerbatim(const QImage& img) +void SGIImage::writeVerbatim(const TQImage& img) { m_rle = 0; kdDebug(399) << "writing verbatim data" << endl; @@ -531,7 +531,7 @@ void SGIImage::writeVerbatim(const QImage& img) } -bool SGIImage::writeImage(QImage& img) +bool SGIImage::writeImage(TQImage& img) { kdDebug(399) << "writing '" << m_io->fileName() << '\'' << endl; diff --git a/kimgio/rgb.h b/kimgio/rgb.h index 224d22cc8..cd0a897d9 100644 --- a/kimgio/rgb.h +++ b/kimgio/rgb.h @@ -11,37 +11,37 @@ #ifndef KIMG_RGB_H #define KIMG_RGB_H -#include <qmap.h> -#include <qptrvector.h> +#include <tqmap.h> +#include <tqptrvector.h> class QImage; class QImageIO; extern "C" { -void kimgio_rgb_read(QImageIO *); -void kimgio_rgb_write(QImageIO *); +void kimgio_rgb_read(TQImageIO *); +void kimgio_rgb_write(TQImageIO *); } -class RLEData : public QMemArray<uchar> { +class RLEData : public TQMemArray<uchar> { public: RLEData() {} RLEData(const uchar *d, uint l, uint o) : m_offset(o) { duplicate(d, l); } bool operator<(const RLEData&) const; - void write(QDataStream& s); - void print(QString) const; // TODO remove + void write(TQDataStream& s); + void print(TQString) const; // TODO remove uint offset() { return m_offset; } private: uint m_offset; }; -class RLEMap : public QMap<RLEData, uint> { +class RLEMap : public TQMap<RLEData, uint> { public: RLEMap() : m_counter(0), m_offset(0) {} uint insert(const uchar *d, uint l); - QPtrVector<RLEData> vector(); + TQPtrVector<RLEData> vector(); void setBaseOffset(uint o) { m_offset = o; } private: uint m_counter; @@ -51,11 +51,11 @@ private: class SGIImage { public: - SGIImage(QImageIO *); + SGIImage(TQImageIO *); ~SGIImage(); - bool readImage(QImage&); - bool writeImage(QImage&); + bool readImage(TQImage&); + bool writeImage(TQImage&); private: enum { NORMAL, DITHERED, SCREEN, COLORMAP }; // colormap @@ -77,18 +77,18 @@ private: Q_UINT32 *m_starttab; Q_UINT32 *m_lengthtab; QByteArray m_data; - QByteArray::Iterator m_pos; + TQByteArray::Iterator m_pos; RLEMap m_rlemap; - QPtrVector<RLEData> m_rlevector; + TQPtrVector<RLEData> m_rlevector; uint m_numrows; - bool readData(QImage&); + bool readData(TQImage&); bool getRow(uchar *dest); void writeHeader(); void writeRle(); - void writeVerbatim(const QImage&); - bool scanData(const QImage&); + void writeVerbatim(const TQImage&); + bool scanData(const TQImage&); uint compact(uchar *, uchar *); uchar intensity(uchar); }; diff --git a/kimgio/tga.cpp b/kimgio/tga.cpp index 2a227d077..8fb5fbd7f 100644 --- a/kimgio/tga.cpp +++ b/kimgio/tga.cpp @@ -22,8 +22,8 @@ #include <assert.h> -#include <qimage.h> -#include <qdatastream.h> +#include <tqimage.h> +#include <tqdatastream.h> #include <kdebug.h> @@ -74,7 +74,7 @@ namespace { // Private. enum { SIZE = 18 }; // const static int SIZE = 18; }; - static QDataStream & operator>> ( QDataStream & s, TgaHeader & head ) + static TQDataStream & operator>> ( TQDataStream & s, TgaHeader & head ) { s >> head.id_length; s >> head.colormap_type; @@ -169,7 +169,7 @@ namespace { // Private. } }; - static bool LoadTGA( QDataStream & s, const TgaHeader & tga, QImage &img ) + static bool LoadTGA( TQDataStream & s, const TgaHeader & tga, TQImage &img ) { // Create image. if( !img.create( tga.width, tga.height, 32 )) { @@ -313,12 +313,12 @@ namespace { // Private. } // namespace -KDE_EXPORT void kimgio_tga_read( QImageIO *io ) +KDE_EXPORT void kimgio_tga_read( TQImageIO *io ) { //kdDebug(399) << "Loading TGA file!" << endl; - QDataStream s( io->ioDevice() ); - s.setByteOrder( QDataStream::LittleEndian ); + TQDataStream s( io->ioDevice() ); + s.setByteOrder( TQDataStream::LittleEndian ); // Read image header. @@ -343,7 +343,7 @@ KDE_EXPORT void kimgio_tga_read( QImageIO *io ) } - QImage img; + TQImage img; bool result = LoadTGA(s, tga, img); if( result == false ) { @@ -359,12 +359,12 @@ KDE_EXPORT void kimgio_tga_read( QImageIO *io ) } -KDE_EXPORT void kimgio_tga_write( QImageIO *io ) +KDE_EXPORT void kimgio_tga_write( TQImageIO *io ) { - QDataStream s( io->ioDevice() ); - s.setByteOrder( QDataStream::LittleEndian ); + TQDataStream s( io->ioDevice() ); + s.setByteOrder( TQDataStream::LittleEndian ); - const QImage img = io->image(); + const TQImage img = io->image(); const bool hasAlpha = img.hasAlphaBuffer(); for( int i = 0; i < 12; i++ ) s << targaMagic[i]; diff --git a/kimgio/tga.h b/kimgio/tga.h index 85ce1f69f..c9dc3902f 100644 --- a/kimgio/tga.h +++ b/kimgio/tga.h @@ -13,8 +13,8 @@ class QImageIO; extern "C" { -void kimgio_tga_read( QImageIO * ); -void kimgio_tga_write( QImageIO * ); +void kimgio_tga_read( TQImageIO * ); +void kimgio_tga_write( TQImageIO * ); } #endif diff --git a/kimgio/tiffr.cpp b/kimgio/tiffr.cpp index bda4ce354..f8022d2dd 100644 --- a/kimgio/tiffr.cpp +++ b/kimgio/tiffr.cpp @@ -6,8 +6,8 @@ #include <tiffio.h> -#include <qimage.h> -#include <qfile.h> +#include <tqimage.h> +#include <tqfile.h> #include <kdelibs_export.h> #include <assert.h> @@ -16,7 +16,7 @@ static tsize_t tiff_read( thandle_t handle, tdata_t buf, tsize_t size ) { - QIODevice *dev = reinterpret_cast<QIODevice *>( handle ); + TQIODevice *dev = reinterpret_cast<TQIODevice *>( handle ); return dev->readBlock( reinterpret_cast<char *>( buf ), size ); } @@ -27,7 +27,7 @@ static tsize_t tiff_write( thandle_t, tdata_t, tsize_t ) static toff_t tiff_seek( thandle_t handle, toff_t off, int whence ) { - QIODevice *dev = reinterpret_cast<QIODevice *>( handle ); + TQIODevice *dev = reinterpret_cast<TQIODevice *>( handle ); if ( whence == SEEK_CUR ) off += dev->at(); @@ -42,7 +42,7 @@ static toff_t tiff_seek( thandle_t handle, toff_t off, int whence ) static toff_t tiff_size( thandle_t handle ) { - QIODevice *dev = reinterpret_cast<QIODevice *>( handle ); + TQIODevice *dev = reinterpret_cast<TQIODevice *>( handle ); return dev->size(); } @@ -60,7 +60,7 @@ static void tiff_unmap( thandle_t, tdata_t, toff_t ) { } -KDE_EXPORT void kimgio_tiff_read( QImageIO *io ) +KDE_EXPORT void kimgio_tiff_read( TQImageIO *io ) { TIFF *tiff; uint32 width, height; @@ -69,7 +69,7 @@ KDE_EXPORT void kimgio_tiff_read( QImageIO *io ) // FIXME: use qdatastream // open file - tiff = TIFFClientOpen( QFile::encodeName( io->fileName() ), "r", + tiff = TIFFClientOpen( TQFile::encodeName( io->fileName() ), "r", ( thandle_t )io->ioDevice(), tiff_read, tiff_write, tiff_seek, tiff_close, tiff_size, tiff_map, tiff_unmap ); @@ -83,7 +83,7 @@ KDE_EXPORT void kimgio_tiff_read( QImageIO *io ) || TIFFGetField( tiff, TIFFTAG_IMAGELENGTH, &height ) != 1 ) return; - QImage image( width, height, 32 ); + TQImage image( width, height, 32 ); if( image.isNull()) { TIFFClose( tiff ); return; @@ -143,7 +143,7 @@ KDE_EXPORT void kimgio_tiff_read( QImageIO *io ) io->setStatus ( 0 ); } -KDE_EXPORT void kimgio_tiff_write( QImageIO * ) +KDE_EXPORT void kimgio_tiff_write( TQImageIO * ) { // TODO: stub } diff --git a/kimgio/tiffr.h b/kimgio/tiffr.h index 18d39f9bb..b7cad3558 100644 --- a/kimgio/tiffr.h +++ b/kimgio/tiffr.h @@ -1,5 +1,5 @@ /** -* QImageIO Routines to read/write TIFF images. +* TQImageIO Routines to read/write TIFF images. * Sirtaj Singh Kang, Oct 1998. * * This library is distributed under the conditions of the GNU LGPL. @@ -13,8 +13,8 @@ class QImageIO; extern "C" { -void kimgio_tiff_read( QImageIO *io ); -void kimgio_tiff_write( QImageIO *io ); +void kimgio_tiff_read( TQImageIO *io ); +void kimgio_tiff_write( TQImageIO *io ); } #endif diff --git a/kimgio/xcf.cpp b/kimgio/xcf.cpp index c7164d7ba..298d17109 100644 --- a/kimgio/xcf.cpp +++ b/kimgio/xcf.cpp @@ -20,10 +20,10 @@ */ #include <stdlib.h> -#include <qimage.h> -#include <qiodevice.h> -#include <qvaluestack.h> -#include <qvaluevector.h> +#include <tqimage.h> +#include <tqiodevice.h> +#include <tqvaluestack.h> +#include <tqvaluevector.h> #include <kdebug.h> #include "xcf.h" @@ -32,14 +32,14 @@ /////////////////////////////////////////////////////////////////////////////// -KDE_EXPORT void kimgio_xcf_read(QImageIO *io) +KDE_EXPORT void kimgio_xcf_read(TQImageIO *io) { XCFImageFormat xcfif; xcfif.readXCF(io); } -KDE_EXPORT void kimgio_xcf_write(QImageIO *io) +KDE_EXPORT void kimgio_xcf_write(TQImageIO *io) { kdDebug(399) << "XCF: write support not implemented" << endl; io->setStatus(-1); @@ -119,10 +119,10 @@ int XCFImageFormat::add_lut( int a, int b ) { return QMIN( a + b, 255 ); } -void XCFImageFormat::readXCF(QImageIO *io) +void XCFImageFormat::readXCF(TQImageIO *io) { XCFImage xcf_image; - QDataStream xcf_io(io->ioDevice()); + TQDataStream xcf_io(io->ioDevice()); char tag[14]; xcf_io.readRawBytes(tag, sizeof(tag)); @@ -149,7 +149,7 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " << // all the data of all layers before beginning to construct the // merged image). - QValueStack<Q_INT32> layer_offsets; + TQValueStack<Q_INT32> layer_offsets; while (true) { Q_INT32 layer_offset; @@ -201,18 +201,18 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " << * \param xcf_image XCF image data. * \return true if there were no I/O errors. */ -bool XCFImageFormat::loadImageProperties(QDataStream& xcf_io, XCFImage& xcf_image) +bool XCFImageFormat::loadImageProperties(TQDataStream& xcf_io, XCFImage& xcf_image) { while (true) { PropType type; - QByteArray bytes; + TQByteArray bytes; if (!loadProperty(xcf_io, type, bytes)) { kdDebug(399) << "XCF: error loading global image properties" << endl; return false; } - QDataStream property(bytes, IO_ReadOnly); + TQDataStream property(bytes, IO_ReadOnly); switch (type) { case PROP_END: @@ -288,7 +288,7 @@ bool XCFImageFormat::loadImageProperties(QDataStream& xcf_io, XCFImage& xcf_imag * \param type returns with the property type. * \param bytes returns with the property data. * \return true if there were no IO errors. */ -bool XCFImageFormat::loadProperty(QDataStream& xcf_io, PropType& type, QByteArray& bytes) +bool XCFImageFormat::loadProperty(TQDataStream& xcf_io, PropType& type, TQByteArray& bytes) { Q_UINT32 foo; xcf_io >> foo; @@ -375,7 +375,7 @@ bool XCFImageFormat::loadProperty(QDataStream& xcf_io, PropType& type, QByteArra * (if the image is indexed). * \return true if there were no I/O errors. */ -bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image) +bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image) { Layer& layer(xcf_image.layer); delete[] layer.name; @@ -402,7 +402,7 @@ bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image) if (layer.visible == 0) return true; - // If there are any more layers, merge them into the final QImage. + // If there are any more layers, merge them into the final TQImage. xcf_io >> layer.hierarchy_offset >> layer.mask_offset; if (xcf_io.device()->status() != IO_Ok) { @@ -434,8 +434,8 @@ bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image) } // Now we should have enough information to initialize the final - // QImage. The first visible layer determines the attributes - // of the QImage. + // TQImage. The first visible layer determines the attributes + // of the TQImage. if (!xcf_image.initialized) { if( !initializeImage(xcf_image)) @@ -456,18 +456,18 @@ bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image) * \param layer layer to collect the properties. * \return true if there were no I/O errors. */ -bool XCFImageFormat::loadLayerProperties(QDataStream& xcf_io, Layer& layer) +bool XCFImageFormat::loadLayerProperties(TQDataStream& xcf_io, Layer& layer) { while (true) { PropType type; - QByteArray bytes; + TQByteArray bytes; if (!loadProperty(xcf_io, type, bytes)) { kdDebug(399) << "XCF: error loading layer properties" << endl; return false; } - QDataStream property(bytes, IO_ReadOnly); + TQDataStream property(bytes, IO_ReadOnly); switch (type) { case PROP_END: @@ -527,7 +527,7 @@ bool XCFImageFormat::loadLayerProperties(QDataStream& xcf_io, Layer& layer) /*! * Compute the number of tiles in the current layer and allocate - * QImage structures for each of them. + * TQImage structures for each of them. * \param xcf_image contains the current layer. */ bool XCFImageFormat::composeTiles(XCFImage& xcf_image) @@ -564,45 +564,45 @@ bool XCFImageFormat::composeTiles(XCFImage& xcf_image) uint tile_height = (j + 1) * TILE_HEIGHT <= layer.height ? TILE_HEIGHT : layer.height - j * TILE_HEIGHT; - // Try to create the most appropriate QImage (each GIMP layer + // Try to create the most appropriate TQImage (each GIMP layer // type is treated slightly differently) switch (layer.type) { case RGB_GIMAGE: - layer.image_tiles[j][i] = QImage(tile_width, tile_height, 32, 0); + layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 32, 0); if( layer.image_tiles[j][i].isNull()) return false; layer.image_tiles[j][i].setAlphaBuffer(false); break; case RGBA_GIMAGE: - layer.image_tiles[j][i] = QImage(tile_width, tile_height, 32, 0); + layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 32, 0); if( layer.image_tiles[j][i].isNull()) return false; layer.image_tiles[j][i].setAlphaBuffer(true); break; case GRAY_GIMAGE: - layer.image_tiles[j][i] = QImage(tile_width, tile_height, 8, 256); + layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256); if( layer.image_tiles[j][i].isNull()) return false; setGrayPalette(layer.image_tiles[j][i]); break; case GRAYA_GIMAGE: - layer.image_tiles[j][i] = QImage(tile_width, tile_height, 8, 256); + layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256); if( layer.image_tiles[j][i].isNull()) return false; setGrayPalette(layer.image_tiles[j][i]); - layer.alpha_tiles[j][i] = QImage( tile_width, tile_height, 8, 256); + layer.alpha_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256); if( layer.alpha_tiles[j][i].isNull()) return false; setGrayPalette(layer.alpha_tiles[j][i]); break; case INDEXED_GIMAGE: - layer.image_tiles[j][i] = QImage(tile_width, tile_height, 8, + layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 8, xcf_image.num_colors); if( layer.image_tiles[j][i].isNull()) return false; @@ -610,20 +610,20 @@ bool XCFImageFormat::composeTiles(XCFImage& xcf_image) break; case INDEXEDA_GIMAGE: - layer.image_tiles[j][i] = QImage(tile_width, tile_height,8, + layer.image_tiles[j][i] = TQImage(tile_width, tile_height,8, xcf_image.num_colors); if( layer.image_tiles[j][i].isNull()) return false; setPalette(xcf_image, layer.image_tiles[j][i]); - layer.alpha_tiles[j][i] = QImage(tile_width, tile_height, 8, 256); + layer.alpha_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256); if( layer.alpha_tiles[j][i].isNull()) return false; setGrayPalette(layer.alpha_tiles[j][i]); } if (layer.mask_offset != 0) { - layer.mask_tiles[j][i] = QImage(tile_width, tile_height, 8, 256); + layer.mask_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256); if( layer.mask_tiles[j][i].isNull()) return false; setGrayPalette(layer.mask_tiles[j][i]); @@ -635,12 +635,12 @@ bool XCFImageFormat::composeTiles(XCFImage& xcf_image) /*! - * Apply a grayscale palette to the QImage. Note that Qt does not distinguish + * Apply a grayscale palette to the TQImage. Note that Qt does not distinguish * between grayscale and indexed images. A grayscale image is just * an indexed image with a 256-color, grayscale palette. * \param image image to set to a grayscale palette. */ -void XCFImageFormat::setGrayPalette(QImage& image) +void XCFImageFormat::setGrayPalette(TQImage& image) { for (int i = 0; i < 256; i++) image.setColor(i, qRgb(i, i, i)); @@ -648,11 +648,11 @@ void XCFImageFormat::setGrayPalette(QImage& image) /*! - * Copy the indexed palette from the XCF image into the QImage. + * Copy the indexed palette from the XCF image into the TQImage. * \param xcf_image XCF image containing the palette read from the data stream. * \param image image to apply the palette to. */ -void XCFImageFormat::setPalette(XCFImage& xcf_image, QImage& image) +void XCFImageFormat::setPalette(XCFImage& xcf_image, TQImage& image) { for (int i = 0; i < xcf_image.num_colors; i++) image.setColor(i, xcf_image.palette[i]); @@ -660,7 +660,7 @@ void XCFImageFormat::setPalette(XCFImage& xcf_image, QImage& image) /*! - * Copy the bytes from the tile buffer into the image tile QImage, taking into + * Copy the bytes from the tile buffer into the image tile TQImage, taking into * account all the myriad different modes. * \param layer layer containing the tile buffer and the image tile matrix. * \param i column index of current tile. @@ -730,7 +730,7 @@ void XCFImageFormat::assignImageBytes(Layer& layer, uint i, uint j) * \param layer the layer to collect the image. * \return true if there were no I/O errors. */ -bool XCFImageFormat::loadHierarchy(QDataStream& xcf_io, Layer& layer) +bool XCFImageFormat::loadHierarchy(TQDataStream& xcf_io, Layer& layer) { Q_INT32 width; Q_INT32 height; @@ -758,7 +758,7 @@ bool XCFImageFormat::loadHierarchy(QDataStream& xcf_io, Layer& layer) } } while (junk != 0); - QIODevice::Offset saved_pos = xcf_io.device()->at(); + TQIODevice::Offset saved_pos = xcf_io.device()->at(); xcf_io.device()->at(offset); if (!loadLevel(xcf_io, layer, bpp)) @@ -777,7 +777,7 @@ bool XCFImageFormat::loadHierarchy(QDataStream& xcf_io, Layer& layer) * \return true if there were no I/O errors. * \sa loadTileRLE(). */ -bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp) +bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, Q_INT32 bpp) { Q_INT32 width; Q_INT32 height; @@ -801,7 +801,7 @@ bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp) return false; } - QIODevice::Offset saved_pos = xcf_io.device()->at(); + TQIODevice::Offset saved_pos = xcf_io.device()->at(); Q_UINT32 offset2; xcf_io >> offset2; @@ -822,7 +822,7 @@ bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp) return false; // The bytes in the layer tile are juggled differently depending on - // the target QImage. The caller has set layer.assignBytes to the + // the target TQImage. The caller has set layer.assignBytes to the // appropriate routine. layer.assignBytes(layer, i, j); @@ -847,7 +847,7 @@ bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp) * \param layer the layer to collect the mask image. * \return true if there were no I/O errors. */ -bool XCFImageFormat::loadMask(QDataStream& xcf_io, Layer& layer) +bool XCFImageFormat::loadMask(TQDataStream& xcf_io, Layer& layer) { Q_INT32 width; Q_INT32 height; @@ -906,7 +906,7 @@ bool XCFImageFormat::loadMask(QDataStream& xcf_io, Layer& layer) * \return true if there were no I/O errors and no obvious corruption of * the RLE data. */ -bool XCFImageFormat::loadTileRLE(QDataStream& xcf_io, uchar* tile, int image_size, +bool XCFImageFormat::loadTileRLE(TQDataStream& xcf_io, uchar* tile, int image_size, int data_length, Q_INT32 bpp) { uchar* data; @@ -1012,18 +1012,18 @@ bogus_rle: * \param layer layer containing the mask channel to collect the properties. * \return true if there were no I/O errors. */ -bool XCFImageFormat::loadChannelProperties(QDataStream& xcf_io, Layer& layer) +bool XCFImageFormat::loadChannelProperties(TQDataStream& xcf_io, Layer& layer) { while (true) { PropType type; - QByteArray bytes; + TQByteArray bytes; if (!loadProperty(xcf_io, type, bytes)) { kdDebug(399) << "XCF: error loading channel properties" << endl; return false; } - QDataStream property(bytes, IO_ReadOnly); + TQDataStream property(bytes, IO_ReadOnly); switch (type) { case PROP_END: @@ -1059,7 +1059,7 @@ bool XCFImageFormat::loadChannelProperties(QDataStream& xcf_io, Layer& layer) /*! - * Copy the bytes from the tile buffer into the mask tile QImage. + * Copy the bytes from the tile buffer into the mask tile TQImage. * \param layer layer containing the tile buffer and the mask tile matrix. * \param i column index of current tile. * \param j row index of current tile. @@ -1078,10 +1078,10 @@ void XCFImageFormat::assignMaskBytes(Layer& layer, uint i, uint j) /*! - * Construct the QImage which will eventually be returned to the QImage + * Construct the TQImage which will eventually be returned to the QImage * loader. * - * There are a couple of situations which require that the QImage is not + * There are a couple of situations which require that the TQImage is not * exactly the same as The GIMP's representation. The full table is: * \verbatim * Grayscale opaque : 8 bpp indexed @@ -1095,7 +1095,7 @@ void XCFImageFormat::assignMaskBytes(Layer& layer, uint i, uint j) * \endverbatim * Whether the image is translucent or not is determined by the bottom layer's * alpha channel. However, even if the bottom layer lacks an alpha channel, - * it can still have an opacity < 1. In this case, the QImage is promoted + * it can still have an opacity < 1. In this case, the TQImage is promoted * to 32-bit. (Note this is different from the output from the GIMP image * exporter, which seems to ignore this attribute.) * @@ -1109,7 +1109,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image) { // (Aliases to make the code look a little better.) Layer& layer(xcf_image.layer); - QImage& image(xcf_image.image); + TQImage& image(xcf_image.image); switch (layer.type) { case RGB_GIMAGE: @@ -1165,7 +1165,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image) if (xcf_image.num_colors <= 2) { image.create(xcf_image.width, xcf_image.height, 1, xcf_image.num_colors, - QImage::LittleEndian); + TQImage::LittleEndian); if( image.isNull()) return false; image.fill(0); @@ -1173,7 +1173,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image) } else if (xcf_image.num_colors <= 256) { image.create(xcf_image.width, xcf_image.height, 8, xcf_image.num_colors, - QImage::LittleEndian); + TQImage::LittleEndian); if( image.isNull()) return false; image.fill(0); @@ -1191,7 +1191,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image) image.create(xcf_image.width, xcf_image.height, 1, xcf_image.num_colors, - QImage::LittleEndian); + TQImage::LittleEndian); if( image.isNull()) return false; image.fill(0); @@ -1239,7 +1239,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image) void XCFImageFormat::copyLayerToImage(XCFImage& xcf_image) { Layer& layer(xcf_image.layer); - QImage& image(xcf_image.image); + TQImage& image(xcf_image.image); PixelCopyOperation copy = 0; switch (layer.type) { @@ -1318,7 +1318,7 @@ void XCFImageFormat::copyLayerToImage(XCFImage& xcf_image) * \param n y pixel of destination image. */ void XCFImageFormat::copyRGBToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { QRgb src = layer.image_tiles[j][i].pixel(k, l); uchar src_a = layer.opacity; @@ -1348,7 +1348,7 @@ void XCFImageFormat::copyRGBToRGB(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::copyGrayToGray(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { int src = layer.image_tiles[j][i].pixelIndex(k, l); image.setPixel(m, n, src); @@ -1369,7 +1369,7 @@ void XCFImageFormat::copyGrayToGray(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { QRgb src = layer.image_tiles[j][i].pixel(k, l); uchar src_a = layer.opacity; @@ -1391,7 +1391,7 @@ void XCFImageFormat::copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::copyGrayAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { QRgb src = layer.image_tiles[j][i].pixel(k, l); uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l); @@ -1419,7 +1419,7 @@ void XCFImageFormat::copyGrayAToRGB(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::copyIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { int src = layer.image_tiles[j][i].pixelIndex(k, l); image.setPixel(m, n, src); @@ -1438,7 +1438,7 @@ void XCFImageFormat::copyIndexedToIndexed(Layer& layer, uint i, uint j, int k, i * \param n y pixel of destination image. */ void XCFImageFormat::copyIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { uchar src = layer.image_tiles[j][i].pixelIndex(k, l); uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l); @@ -1472,7 +1472,7 @@ image.setPixel(m, n, src); * \param n y pixel of destination image. */ void XCFImageFormat::copyIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { QRgb src = layer.image_tiles[j][i].pixel(k, l); uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l); @@ -1500,7 +1500,7 @@ void XCFImageFormat::copyIndexedAToRGB(Layer& layer, uint i, uint j, int k, int void XCFImageFormat::mergeLayerIntoImage(XCFImage& xcf_image) { Layer& layer(xcf_image.layer); - QImage& image(xcf_image.image); + TQImage& image(xcf_image.image); PixelMergeOperation merge = 0; @@ -1581,7 +1581,7 @@ void XCFImageFormat::mergeLayerIntoImage(XCFImage& xcf_image) * \param n y pixel of destination image. */ void XCFImageFormat::mergeRGBToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { QRgb src = layer.image_tiles[j][i].pixel(k, l); QRgb dst = image.pixel(m, n); @@ -1772,7 +1772,7 @@ void XCFImageFormat::mergeRGBToRGB(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::mergeGrayToGray(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { int src = layer.image_tiles[j][i].pixelIndex(k, l); image.setPixel(m, n, src); @@ -1791,7 +1791,7 @@ void XCFImageFormat::mergeGrayToGray(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::mergeGrayAToGray(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { int src = qGray(layer.image_tiles[j][i].pixel(k, l)); int dst = image.pixelIndex(m, n); @@ -1870,7 +1870,7 @@ void XCFImageFormat::mergeGrayAToGray(Layer& layer, uint i, uint j, int k, int l * \param n y pixel of destination image. */ void XCFImageFormat::mergeGrayToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { QRgb src = layer.image_tiles[j][i].pixel(k, l); uchar src_a = layer.opacity; @@ -1892,7 +1892,7 @@ void XCFImageFormat::mergeGrayToRGB(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::mergeGrayAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { int src = qGray(layer.image_tiles[j][i].pixel(k, l)); int dst = qGray(image.pixel(m, n)); @@ -1981,7 +1981,7 @@ void XCFImageFormat::mergeGrayAToRGB(Layer& layer, uint i, uint j, int k, int l, * \param n y pixel of destination image. */ void XCFImageFormat::mergeIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { int src = layer.image_tiles[j][i].pixelIndex(k, l); image.setPixel(m, n, src); @@ -2000,7 +2000,7 @@ void XCFImageFormat::mergeIndexedToIndexed(Layer& layer, uint i, uint j, int k, * \param n y pixel of destination image. */ void XCFImageFormat::mergeIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { uchar src = layer.image_tiles[j][i].pixelIndex(k, l); uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l); @@ -2032,7 +2032,7 @@ void XCFImageFormat::mergeIndexedAToIndexed(Layer& layer, uint i, uint j, int k, * \param n y pixel of destination image. */ void XCFImageFormat::mergeIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n) + TQImage& image, int m, int n) { QRgb src = layer.image_tiles[j][i].pixel(k, l); uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l); @@ -2060,7 +2060,7 @@ void XCFImageFormat::mergeIndexedAToRGB(Layer& layer, uint i, uint j, int k, int * \param x the global x position of the tile. * \param y the global y position of the tile. */ -void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y ) +void XCFImageFormat::dissolveRGBPixels ( TQImage& image, int x, int y ) { // The apparently spurious rand() calls are to wind the random // numbers up to the same point for each tile. @@ -2092,7 +2092,7 @@ void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y ) * \param x the global x position of the tile. * \param y the global y position of the tile. */ -void XCFImageFormat::dissolveAlphaPixels ( QImage& image, int x, int y ) +void XCFImageFormat::dissolveAlphaPixels ( TQImage& image, int x, int y ) { // The apparently spurious rand() calls are to wind the random // numbers up to the same point for each tile. diff --git a/kimgio/xcf.h b/kimgio/xcf.h index 69b434bd3..3e92f27c2 100644 --- a/kimgio/xcf.h +++ b/kimgio/xcf.h @@ -21,17 +21,17 @@ * */ -#include <qimage.h> -#include <qiodevice.h> -#include <qvaluestack.h> -#include <qvaluevector.h> +#include <tqimage.h> +#include <tqiodevice.h> +#include <tqvaluestack.h> +#include <tqvaluevector.h> #include "gimp.h" extern "C" { -void kimgio_xcf_read(QImageIO *); -void kimgio_xcf_write(QImageIO *); +void kimgio_xcf_read(TQImageIO *); +void kimgio_xcf_write(TQImageIO *); } const float INCHESPERMETER = (100.0 / 2.54); @@ -43,14 +43,14 @@ const float INCHESPERMETER = (100.0 / 2.54); * parallel processing on a tile-by-tile basis. Here, though, * we just read them in en-masse and store them in a matrix. */ -typedef QValueVector<QValueVector<QImage> > Tiles; +typedef TQValueVector<TQValueVector<TQImage> > Tiles; class XCFImageFormat { public: XCFImageFormat(); - void readXCF(QImageIO* image_io); + void readXCF(TQImageIO* image_io); private: @@ -60,7 +60,7 @@ private: * optional alpha channel, there are six possible types altogether. * * Note: there is only ever one instance of this structure. The - * layer info is discarded after it is merged into the final QImage. + * layer info is discarded after it is merged into the final TQImage. */ class Layer { public: @@ -132,13 +132,13 @@ private: Q_INT32 tattoo; //!< (unique identifier?) Q_UINT32 unit; //!< Units of The GIMP (inch, mm, pica, etc...) Q_INT32 num_colors; //!< number of colors in an indexed image - QValueVector<QRgb> palette; //!< indexed image color palette + TQValueVector<QRgb> palette; //!< indexed image color palette int num_layers; //!< number of layers Layer layer; //!< most recently read layer - bool initialized; //!< Is the QImage initialized? - QImage image; //!< final QImage + bool initialized; //!< Is the TQImage initialized? + TQImage image; //!< final QImage XCFImage(void) : initialized(false) {} }; @@ -155,14 +155,14 @@ private: //static int add_lut[256][256]; - this is so lame waste of 256k of memory static int add_lut( int, int ); - //! The bottom-most layer is copied into the final QImage by this + //! The bottom-most layer is copied into the final TQImage by this //! routine. typedef void (*PixelCopyOperation)(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); - //! Higher layers are merged into the the final QImage by this routine. + //! Higher layers are merged into the the final TQImage by this routine. typedef void (*PixelMergeOperation)(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); //! Layer mode static data. typedef struct { @@ -173,59 +173,59 @@ private: //! LayerModeEffects. static const LayerModes layer_modes[]; - bool loadImageProperties(QDataStream& xcf_io, XCFImage& image); - bool loadProperty(QDataStream& xcf_io, PropType& type, QByteArray& bytes); - bool loadLayer(QDataStream& xcf_io, XCFImage& xcf_image); - bool loadLayerProperties(QDataStream& xcf_io, Layer& layer); + bool loadImageProperties(TQDataStream& xcf_io, XCFImage& image); + bool loadProperty(TQDataStream& xcf_io, PropType& type, TQByteArray& bytes); + bool loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image); + bool loadLayerProperties(TQDataStream& xcf_io, Layer& layer); bool composeTiles(XCFImage& xcf_image); - void setGrayPalette(QImage& image); - void setPalette(XCFImage& xcf_image, QImage& image); + void setGrayPalette(TQImage& image); + void setPalette(XCFImage& xcf_image, TQImage& image); static void assignImageBytes(Layer& layer, uint i, uint j); - bool loadHierarchy(QDataStream& xcf_io, Layer& layer); - bool loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp); + bool loadHierarchy(TQDataStream& xcf_io, Layer& layer); + bool loadLevel(TQDataStream& xcf_io, Layer& layer, Q_INT32 bpp); static void assignMaskBytes(Layer& layer, uint i, uint j); - bool loadMask(QDataStream& xcf_io, Layer& layer); - bool loadChannelProperties(QDataStream& xcf_io, Layer& layer); + bool loadMask(TQDataStream& xcf_io, Layer& layer); + bool loadChannelProperties(TQDataStream& xcf_io, Layer& layer); bool initializeImage(XCFImage& xcf_image); - bool loadTileRLE(QDataStream& xcf_io, uchar* tile, int size, + bool loadTileRLE(TQDataStream& xcf_io, uchar* tile, int size, int data_length, Q_INT32 bpp); static void copyLayerToImage(XCFImage& xcf_image); static void copyRGBToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void copyGrayToGray(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void copyGrayAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void copyIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void copyIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void copyIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeLayerIntoImage(XCFImage& xcf_image); static void mergeRGBToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeGrayToGray(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeGrayAToGray(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeGrayToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeGrayAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); static void mergeIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l, - QImage& image, int m, int n); + TQImage& image, int m, int n); - static void dissolveRGBPixels(QImage& image, int x, int y); - static void dissolveAlphaPixels(QImage& image, int x, int y); + static void dissolveRGBPixels(TQImage& image, int x, int y); + static void dissolveAlphaPixels(TQImage& image, int x, int y); }; #endif diff --git a/kimgio/xview.cpp b/kimgio/xview.cpp index d61a60fde..746ddc6bc 100644 --- a/kimgio/xview.cpp +++ b/kimgio/xview.cpp @@ -8,7 +8,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> -#include <qimage.h> +#include <tqimage.h> #include <kdelibs_export.h> @@ -19,12 +19,12 @@ static const int b_255_3[]= {0,85,170,255}, // index*255/3 rg_255_7[]={0,36,72,109,145,182,218,255}; // index *255/7 -KDE_EXPORT void kimgio_xv_read( QImageIO *_imageio ) +KDE_EXPORT void kimgio_xv_read( TQImageIO *_imageio ) { int x=-1; int y=-1; int maxval=-1; - QIODevice *iodev = _imageio->ioDevice(); + TQIODevice *iodev = _imageio->ioDevice(); char str[ BUFSIZE ]; @@ -69,7 +69,7 @@ KDE_EXPORT void kimgio_xv_read( QImageIO *_imageio ) } // Create the image - QImage image( x, y, 8, maxval + 1, QImage::BigEndian ); + TQImage image( x, y, 8, maxval + 1, TQImage::BigEndian ); if( image.isNull()) { free(block); return; @@ -100,13 +100,13 @@ KDE_EXPORT void kimgio_xv_read( QImageIO *_imageio ) return; } -KDE_EXPORT void kimgio_xv_write( QImageIO *imageio ) +KDE_EXPORT void kimgio_xv_write( TQImageIO *imageio ) { - QIODevice& f = *( imageio->ioDevice() ); + TQIODevice& f = *( imageio->ioDevice() ); // Removed "f.open(...)" and "f.close()" (tanghus) - const QImage& image = imageio->image(); + const TQImage& image = imageio->image(); int w = image.width(), h = image.height(); char str[ 1024 ]; diff --git a/kimgio/xview.h b/kimgio/xview.h index 4d9aa9945..f0b518f70 100644 --- a/kimgio/xview.h +++ b/kimgio/xview.h @@ -5,8 +5,8 @@ class QImageIO; extern "C" { -void kimgio_xv_read( QImageIO * ); -void kimgio_xv_write( QImageIO * ); +void kimgio_xv_read( TQImageIO * ); +void kimgio_xv_write( TQImageIO * ); } #endif |