summaryrefslogtreecommitdiffstats
path: root/src/gvcore/xcursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gvcore/xcursor.cpp')
-rw-r--r--src/gvcore/xcursor.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gvcore/xcursor.cpp b/src/gvcore/xcursor.cpp
index 79df377..d3c3acc 100644
--- a/src/gvcore/xcursor.cpp
+++ b/src/gvcore/xcursor.cpp
@@ -24,9 +24,9 @@
#include "xcursor.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#ifdef GV_HAVE_XCURSOR
#include <X11/Xlib.h>
@@ -37,12 +37,12 @@
namespace Gwenview {
#ifdef GV_HAVE_XCURSOR
-class XCursorFormat : public QImageFormat {
+class XCursorFormat : public TQImageFormat {
public:
XCursorFormat();
- virtual int decode(QImage& img, QImageConsumer* consumer,
+ virtual int decode(TQImage& img, TQImageConsumer* consumer,
const uchar* buffer, int length);
- QByteArray array;
+ TQByteArray array;
int pos;
bool was_seek_error;
};
@@ -89,7 +89,7 @@ XCursorFormat::XCursorFormat()
{
}
-int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
+int XCursorFormat::decode(TQImage& img, TQImageConsumer* cons,
const uchar* buffer, int length)
{
if( length > 0 )
@@ -98,11 +98,11 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
array.resize( old_size + length );
memcpy( array.data() + old_size, buffer, length );
}
-// Qt's image async IO and Xcursor library have so nicely incompatible data reading :-/
+// TQt's image async IO and Xcursor library have so nicely incompatible data reading :-/
// Xcursor can read a file only as a whole. One can provide XcursorFile with functions
// for reading, writing and seeking. And seeking is the stupid part on Xcursor's side,
// as there's no way to suspend reading until more data is available. This means we
-// basically have to read the whole file first. However, Qt's image async IO just keeps
+// basically have to read the whole file first. However, TQt's image async IO just keeps
// feeding data and when there's end of the data it just does nothing and doesn't tell
// the decoder.
// So the trick will be calling XcursorXcFileLoadImage() but whenever there will be
@@ -124,19 +124,19 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
++cur )
{
XcursorImage* cursor = cursors->images[ cur ];
- img = QImage( reinterpret_cast<uchar *>( cursor->pixels ),
- cursor->width, cursor->height, 32, NULL, 0, QImage::BigEndian );
+ img = TQImage( reinterpret_cast<uchar *>( cursor->pixels ),
+ cursor->width, cursor->height, 32, NULL, 0, TQImage::BigEndian );
img.setAlphaBuffer( true );
// Convert the image to non-premultiplied alpha
- Q_UINT32 *pixels = reinterpret_cast<Q_UINT32 *>( img.bits() );
+ TQ_UINT32 *pixels = reinterpret_cast<TQ_UINT32 *>( img.bits() );
for ( int i = 0; i < (img.width() * img.height()); i++ )
{
- float alpha = qAlpha( pixels[i] ) / 255.0;
+ float alpha = tqAlpha( pixels[i] ) / 255.0;
if ( alpha > 0.0 && alpha < 1.0 )
- pixels[i] = qRgba( int( qRed(pixels[i]) / alpha ),
- int( qGreen(pixels[i]) / alpha ),
- int( qBlue(pixels[i]) / alpha ),
- qAlpha(pixels[i]) );
+ pixels[i] = tqRgba( int( tqRed(pixels[i]) / alpha ),
+ int( tqGreen(pixels[i]) / alpha ),
+ int( tqBlue(pixels[i]) / alpha ),
+ tqAlpha(pixels[i]) );
}
// Create a deep copy of the image so the image data is preserved
img = img.copy();
@@ -148,7 +148,7 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
if( cursors->nimage > 1 )
cons->setLooping( 0 );
}
- cons->changed( QRect( QPoint( 0, 0 ), img.size()));
+ cons->changed( TQRect( TQPoint( 0, 0 ), img.size()));
cons->frameDone();
cons->setFramePeriod( cursor->delay );
}
@@ -164,7 +164,7 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
}
#endif
-QImageFormat* XCursorFormatType::decoderFor(
+TQImageFormat* XCursorFormatType::decoderFor(
const uchar* buffer, int length)
{
#ifdef GV_HAVE_XCURSOR