summaryrefslogtreecommitdiffstats
path: root/lib/kwmf/qwmf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kwmf/qwmf.cc')
-rw-r--r--lib/kwmf/qwmf.cc246
1 files changed, 123 insertions, 123 deletions
diff --git a/lib/kwmf/qwmf.cc b/lib/kwmf/qwmf.cc
index 89e2f50f7..a7451b46b 100644
--- a/lib/kwmf/qwmf.cc
+++ b/lib/kwmf/qwmf.cc
@@ -19,12 +19,12 @@
#include <math.h>
#include <assert.h>
-#include <qfileinfo.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qdatastream.h>
-#include <qapplication.h>
-#include <qbuffer.h>
+#include <tqfileinfo.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqdatastream.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
#include <kdebug.h>
bool qwmfDebug = false;
@@ -33,7 +33,7 @@ bool qwmfDebug = false;
#include "wmfstruct.h"
#include "metafuncs.h"
-#define QWMF_DEBUG 0
+#define TQWMF_DEBUG 0
class WmfCmd
@@ -50,59 +50,59 @@ public:
class WinObjHandle
{
public:
- virtual void apply( QPainter& p ) = 0;
+ virtual void apply( TQPainter& p ) = 0;
};
class WinObjBrushHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QBrush brush;
+ virtual void apply( TQPainter& p );
+ TQBrush brush;
virtual ~WinObjBrushHandle() {};
};
class WinObjPenHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QPen pen;
+ virtual void apply( TQPainter& p );
+ TQPen pen;
virtual ~WinObjPenHandle() {};
};
class WinObjPatternBrushHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QBrush brush;
- QPixmap image;
+ virtual void apply( TQPainter& p );
+ TQBrush brush;
+ TQPixmap image;
virtual ~WinObjPatternBrushHandle() {};
};
class WinObjFontHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QFont font;
+ virtual void apply( TQPainter& p );
+ TQFont font;
int rotation;
virtual ~WinObjFontHandle() {};
};
-void WinObjBrushHandle::apply( QPainter& p )
+void WinObjBrushHandle::apply( TQPainter& p )
{
p.setBrush( brush );
}
-void WinObjPenHandle::apply( QPainter& p )
+void WinObjPenHandle::apply( TQPainter& p )
{
p.setPen( pen );
}
-void WinObjPatternBrushHandle::apply( QPainter& p )
+void WinObjPatternBrushHandle::apply( TQPainter& p )
{
p.setBrush( brush );
}
-void WinObjFontHandle::apply( QPainter& p )
+void WinObjFontHandle::apply( TQPainter& p )
{
p.setFont( font );
}
@@ -130,34 +130,34 @@ QWinMetaFile::~QWinMetaFile()
//-----------------------------------------------------------------------------
-bool QWinMetaFile::load( const QString &filename )
+bool QWinMetaFile::load( const TQString &filename )
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.exists() )
{
- kdDebug() << "File " << QFile::encodeName(filename) << " does not exist" << endl;
+ kdDebug() << "File " << TQString(TQFile::encodeName(filename)) << " does not exist" << endl;
return false;
}
if ( !file.open( IO_ReadOnly ) )
{
- kdDebug() << "Cannot open file " << QFile::encodeName(filename) << endl;
+ kdDebug() << "Cannot open file " << TQString(TQFile::encodeName(filename)) << endl;
return false;
}
- QByteArray ba = file.readAll();
+ TQByteArray ba = file.readAll();
file.close();
- QBuffer buffer( ba );
+ TQBuffer buffer( ba );
buffer.open( IO_ReadOnly );
return load( buffer );
}
//-----------------------------------------------------------------------------
-bool QWinMetaFile::load( QBuffer &buffer )
+bool QWinMetaFile::load( TQBuffer &buffer )
{
- QDataStream st;
+ TQDataStream st;
WmfEnhMetaHeader eheader;
WmfMetaHeader header;
WmfPlaceableHeader pheader;
@@ -169,12 +169,12 @@ bool QWinMetaFile::load( QBuffer &buffer )
mTextAlign = 0;
mRotation = 0;
- mTextColor = Qt::black;
+ mTextColor = TQt::black;
if ( mFirstCmd ) delete mFirstCmd;
mFirstCmd = NULL;
st.setDevice( &buffer );
- st.setByteOrder( QDataStream::LittleEndian ); // Great, I love Qt !
+ st.setByteOrder( TQDataStream::LittleEndian ); // Great, I love TQt !
//----- Read placeable metafile header
st >> pheader.key;
@@ -198,7 +198,7 @@ bool QWinMetaFile::load( QBuffer &buffer )
mBBox.setRight( pheader.bbox.right );
mBBox.setBottom( pheader.bbox.bottom );
mHeaderBoundingBox = mBBox;
- if ( QWMF_DEBUG )
+ if ( TQWMF_DEBUG )
{
kdDebug() << endl << "-------------------------------------------------" << endl;
kdDebug() << "WMF Placeable Header ( " << static_cast<int>(sizeof( pheader ) ) << "):" << endl;
@@ -240,7 +240,7 @@ bool QWinMetaFile::load( QBuffer &buffer )
st >> eheader.szlMillimeters.width;
st >> eheader.szlMillimeters.height;
- if ( QWMF_DEBUG )
+ if ( TQWMF_DEBUG )
{
kdDebug() << endl << "-------------------------------------------------" << endl;
kdDebug() << "WMF Extended Header:" << endl;
@@ -265,7 +265,7 @@ bool QWinMetaFile::load( QBuffer &buffer )
st >> header.mtNoObjects;
st >> header.mtMaxRecord;
st >> header.mtNoParameters;
- if ( QWMF_DEBUG ) {
+ if ( TQWMF_DEBUG ) {
kdDebug() << "WMF Header: " << "mtSize=" << header.mtSize << endl;
}
}
@@ -329,7 +329,7 @@ bool QWinMetaFile::load( QBuffer &buffer )
//-----------------------------------------------------------------------------
-bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
+bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
{
int idx, i;
WmfCmd* cmd;
@@ -348,8 +348,8 @@ bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
mWinding = false;
mAbsoluteCoord = absolute;
- mPainter.begin( aTarget );
- if ( QWMF_DEBUG ) {
+ mPainter.tqbegin( const_cast<TQPaintDevice*>(aTarget) );
+ if ( TQWMF_DEBUG ) {
kdDebug() << "Bounding box : " << mBBox.left()
<< " " << mBBox.top() << " " << mBBox.right() << " " << mBBox.bottom() << endl;
}
@@ -364,8 +364,8 @@ bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
idx = cmd->funcIndex;
( this->*metaFuncTab[ idx ].method )( cmd->numParm, cmd->parm );
- if ( QWMF_DEBUG ) {
- QString str = "", param;
+ if ( TQWMF_DEBUG ) {
+ TQString str = "", param;
if ( metaFuncTab[ idx ].name == NULL ) {
str += "UNKNOWN ";
}
@@ -384,12 +384,12 @@ bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
}
}
/*
- // TODO: cleanup this code when QPicture::setBoundingBox() is possible in KOClipart (QT31)
- // because actually QPicture::boundingBox() != mBBox()
+ // TODO: cleanup this code when TQPicture::setBoundingBox() is possible in KOClipart (QT31)
+ // because actually TQPicture::boundingBox() != mBBox()
mWindowsCoord += 1;
if ( mWindowsCoord == 2 ) {
kdDebug() << "DRAW ANGLES " << endl;
- mPainter.setPen( Qt::white );
+ mPainter.setPen( TQt::white );
mPainter.drawPoint( mBBox.left(), mBBox.top() );
mPainter.drawPoint( mBBox.right(), mBBox.bottom() );
}
@@ -405,7 +405,7 @@ bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
void QWinMetaFile::setWindowOrg( long, short* parm )
{
if ( mAbsoluteCoord ) {
- QRect r = mPainter.window();
+ TQRect r = mPainter.window();
mPainter.setWindow( parm[ 1 ], parm[ 0 ], r.width(), r.height() );
}
else {
@@ -423,14 +423,14 @@ void QWinMetaFile::setWindowOrg( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::setWindowExt( long, short* parm )
{
- // negative value allowed for width and height : QABS() forbidden
+ // negative value allowed for width and height : TQABS() forbidden
if ( mAbsoluteCoord ) {
- QRect r = mPainter.window();
+ TQRect r = mPainter.window();
mPainter.setWindow( r.left(), r.top(), parm[ 1 ], parm[ 0 ] );
}
else {
if ( (parm[ 0 ] != 0) && (parm[ 1 ] != 0) ) {
- QRect r = mPainter.window();
+ TQRect r = mPainter.window();
double dx = mInternalWorldMatrix.dx();
double dy = mInternalWorldMatrix.dy();
double sx = mInternalWorldMatrix.m11();
@@ -479,44 +479,44 @@ void QWinMetaFile::ellipse( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::polygon( long, short* parm )
{
- QPointArray* pa;
+ TQPointArray* pa;
pa = pointArray( parm[ 0 ], &parm[ 1 ] );
- mPainter.drawPolygon( *pa, mWinding );
+ mPainter.tqdrawPolygon( *pa, mWinding );
}
//-----------------------------------------------------------------------------
void QWinMetaFile::polyPolygon( long, short* parm )
{
- QRegion region;
+ TQRegion region;
int i, j, startPolygon;
mPainter.save();
// define clipping region
- QRect win = bbox();
+ TQRect win = bbox();
startPolygon = 1+parm[ 0 ];
for ( i=0 ; i < parm[ 0 ] ; i++ ) {
- QPointArray pa1( parm[ 1+i ] );
+ TQPointArray pa1( parm[ 1+i ] );
for ( j=0 ; j < parm[ 1+i ] ; j++) {
pa1.setPoint ( j, parm[ startPolygon ], parm[ startPolygon+1 ] );
startPolygon += 2;
}
- QRegion r( pa1 );
+ TQRegion r( pa1 );
region = region.eor( r );
}
- mPainter.setClipRegion( region, QPainter::CoordPainter );
+ mPainter.setClipRegion( region, TQPainter::CoordPainter );
// fill polygons
mPainter.fillRect( win.left(), win.top(), win.width(), win.height(), mPainter.brush() );
// draw polygon's border if necessary
- if ( mPainter.pen().style() != Qt::NoPen ) {
+ if ( mPainter.pen().style() != TQt::NoPen ) {
mPainter.setClipping( false );
- mPainter.setBrush( Qt::NoBrush );
+ mPainter.setBrush( TQt::NoBrush );
- QPointArray* pa;
+ TQPointArray* pa;
int idxPolygon = 1 + parm[ 0 ];
for ( i=0 ; i < parm[ 0 ] ; i++ ) {
pa = pointArray( parm[ 1+i ], &parm[ idxPolygon ] );
@@ -532,7 +532,7 @@ void QWinMetaFile::polyPolygon( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::polyline( long, short* parm )
{
- QPointArray* pa;
+ TQPointArray* pa;
pa = pointArray( parm[ 0 ], &parm[ 1 ] );
mPainter.drawPolyline( *pa );
@@ -628,7 +628,7 @@ void QWinMetaFile::setBkMode( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::setPixel( long, short* parm )
{
- QPen pen = mPainter.pen();
+ TQPen pen = mPainter.pen();
mPainter.setPen( color( parm ) );
mPainter.drawPoint( parm[ 3 ], parm[ 2 ] );
mPainter.setPen( pen );
@@ -638,7 +638,7 @@ void QWinMetaFile::setPixel( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::setRop( long, short* parm )
{
- mPainter.setRasterOp( winToQtRaster( parm[ 0 ] ) );
+ mPainter.setRasterOp( winToTQtRaster( parm[ 0 ] ) );
}
@@ -661,16 +661,16 @@ void QWinMetaFile::restoreDC( long, short *parm )
void QWinMetaFile::intersectClipRect( long, short* parm )
{
/* TODO: better implementation : need QT 3.0.2
- QRegion region = mPainter.clipRegion();
+ TQRegion region = mPainter.clipRegion();
if ( region.isEmpty() )
region = bbox();
*/
- QRegion region( bbox() );
+ TQRegion region( bbox() );
- QRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
+ TQRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
region = region.intersect( newRegion );
- mPainter.setClipRegion( region, QPainter::CoordPainter );
+ mPainter.setClipRegion( region, TQPainter::CoordPainter );
}
@@ -678,16 +678,16 @@ void QWinMetaFile::intersectClipRect( long, short* parm )
void QWinMetaFile::excludeClipRect( long, short* parm )
{
/* TODO: better implementation : need QT 3.0.2
- QRegion region = mPainter.clipRegion();
+ TQRegion region = mPainter.clipRegion();
if ( region.isEmpty() )
region = bbox();
*/
- QRegion region( bbox() );
+ TQRegion region( bbox() );
- QRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
+ TQRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
region = region.subtract( newRegion );
- mPainter.setClipRegion( region, QPainter::CoordPainter );
+ mPainter.setClipRegion( region, TQPainter::CoordPainter );
}
@@ -738,16 +738,16 @@ void QWinMetaFile::extTextOut( long num, short* parm )
else
ptStr = (char*)&parm[ 4 ];
- QCString text( ptStr, parm[ 2 ] + 1 );
+ TQCString text( ptStr, parm[ 2 ] + 1 );
- QFontMetrics fm( mPainter.font() );
+ TQFontMetrics fm( mPainter.font() );
width = fm.width( text ) + fm.descent(); // because fm.width(text) isn't rigth with Italic text
height = fm.height();
mPainter.save();
if ( mTextAlign & 0x01 ) { // (left, top) position = current logical position
- QPoint pos = mPainter.pos();
+ TQPoint pos = mPainter.pos();
x = pos.x();
y = pos.y();
}
@@ -762,7 +762,7 @@ void QWinMetaFile::extTextOut( long num, short* parm )
mPainter.translate( -parm[ 1 ], -parm[ 0 ] );
}
- // alignment
+ // tqalignment
if ( mTextAlign & 0x06 )
x -= ( width / 2 );
if ( mTextAlign & 0x08 )
@@ -773,14 +773,14 @@ void QWinMetaFile::extTextOut( long num, short* parm )
if ( ( parm[ 2 ] > 1 ) && ( num >= (idxOffset + parm[ 2 ]) ) && ( parm[ 3 ] == 0 ) ) {
// offset for each char
int left = x;
- mPainter.drawText( left, y, width, height, Qt::AlignLeft | Qt::AlignTop, text.mid(0, 1) );
+ mPainter.drawText( left, y, width, height, TQt::AlignLeft | TQt::AlignTop, text.mid(0, 1) );
for ( int i = 1; i < parm[ 2 ] ; i++ ) {
left += parm[ idxOffset + i - 1 ];
- mPainter.drawText( left, y, width, height, Qt::AlignLeft | Qt::AlignTop, text.mid(i, 1) );
+ mPainter.drawText( left, y, width, height, TQt::AlignLeft | TQt::AlignTop, text.mid(i, 1) );
}
}
else {
- mPainter.drawText( x, y, width, height, Qt::AlignLeft | Qt::AlignTop, text );
+ mPainter.drawText( x, y, width, height, TQt::AlignLeft | TQt::AlignTop, text );
}
mPainter.restore();
@@ -795,21 +795,21 @@ void QWinMetaFile::extTextOut( long num, short* parm )
void QWinMetaFile::dibBitBlt( long num, short* parm )
{
if ( num > 9 ) { // DIB image
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 8 ], (num - 8) * 2 ) ) {
long raster = toDWord( parm );
- mPainter.setRasterOp( winToQtRaster( raster ) );
+ mPainter.setRasterOp( winToTQtRaster( raster ) );
// wmf file allow negative width or height
mPainter.save();
if ( parm[ 5 ] < 0 ) { // width < 0 => horizontal flip
- QWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
+ TQWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
if ( parm[ 4 ] < 0 ) { // height < 0 => vertical flip
- QWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
+ TQWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
mPainter.drawImage( parm[ 7 ], parm[ 6 ], bmpSrc, parm[ 3 ], parm[ 2 ], parm[ 5 ], parm[ 4 ] );
@@ -825,25 +825,25 @@ void QWinMetaFile::dibBitBlt( long num, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::dibStretchBlt( long num, short* parm )
{
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 10 ], (num - 10) * 2 ) ) {
long raster = toDWord( parm );
- mPainter.setRasterOp( winToQtRaster( raster ) );
+ mPainter.setRasterOp( winToTQtRaster( raster ) );
// wmf file allow negative width or height
mPainter.save();
if ( parm[ 7 ] < 0 ) { // width < 0 => horizontal flip
- QWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
+ TQWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
if ( parm[ 6 ] < 0 ) { // height < 0 => vertical flip
- QWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
+ TQWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
bmpSrc = bmpSrc.copy( parm[ 5 ], parm[ 4 ], parm[ 3 ], parm[ 2 ] );
- // TODO: scale the bitmap ( QImage::scale(parm[ 7 ], parm[ 6 ]) is actually too slow )
+ // TODO: scale the bitmap ( TQImage::scale(parm[ 7 ], parm[ 6 ]) is actually too slow )
mPainter.drawImage( parm[ 9 ], parm[ 8 ], bmpSrc );
mPainter.restore();
@@ -854,25 +854,25 @@ void QWinMetaFile::dibStretchBlt( long num, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::stretchDib( long num, short* parm )
{
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 11 ], (num - 11) * 2 ) ) {
long raster = toDWord( parm );
- mPainter.setRasterOp( winToQtRaster( raster ) );
+ mPainter.setRasterOp( winToTQtRaster( raster ) );
// wmf file allow negative width or height
mPainter.save();
if ( parm[ 8 ] < 0 ) { // width < 0 => horizontal flip
- QWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
+ TQWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
if ( parm[ 7 ] < 0 ) { // height < 0 => vertical flip
- QWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
+ TQWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
bmpSrc = bmpSrc.copy( parm[ 6 ], parm[ 5 ], parm[ 4 ], parm[ 3 ] );
- // TODO: scale the bitmap ( QImage::scale(parm[ 8 ], parm[ 7 ]) is actually too slow )
+ // TODO: scale the bitmap ( TQImage::scale(parm[ 8 ], parm[ 7 ]) is actually too slow )
mPainter.drawImage( parm[ 10 ], parm[ 9 ], bmpSrc );
mPainter.restore();
@@ -885,7 +885,7 @@ void QWinMetaFile::dibCreatePatternBrush( long num, short* parm )
{
WinObjPatternBrushHandle* handle = new WinObjPatternBrushHandle;
addHandle( handle );
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 2 ], (num - 2) * 2 ) ) {
handle->image = bmpSrc;
@@ -997,7 +997,7 @@ void QWinMetaFile::createPenIndirect( long, short* parm )
// TODO : width of pen proportional to device context width
// DOESN'T WORK
/*
- QRect devRec;
+ TQRect devRec;
devRec = mPainter.xForm( mBBox );
width = ( parm[ 0 ] * devRec.width() ) / mBBox.width() ;
kdDebug() << "CreatePenIndirect: " << endl;
@@ -1015,14 +1015,14 @@ void QWinMetaFile::createFontIndirect( long , short* parm)
WinObjFontHandle* handle = new WinObjFontHandle;
addHandle( handle );
- QString family( (const char*)&parm[ 9 ] );
+ TQString family( (const char*)&parm[ 9 ] );
mRotation = -parm[ 2 ] / 10; // text rotation (in 1/10 degree)
// TODO: memorisation of rotation in object Font
handle->font.setFamily( family );
handle->font.setFixedPitch( ((parm[ 8 ] & 0x01) == 0) );
// TODO: investigation why some test case need -2. (size of font in logical point)
- handle->font.setPointSize( QABS(parm[ 0 ]) - 2 );
+ handle->font.setPointSize( TQABS(parm[ 0 ]) - 2 );
handle->font.setWeight( (parm[ 4 ] >> 3) );
handle->font.setItalic( (parm[ 5 ] & 0x01) );
handle->font.setUnderline( (parm[ 5 ] & 0x100) );
@@ -1074,7 +1074,7 @@ int QWinMetaFile::findFunc( unsigned short aFunc ) const
}
//-----------------------------------------------------------------------------
-QPointArray* QWinMetaFile::pointArray( short num, short* parm )
+TQPointArray* QWinMetaFile::pointArray( short num, short* parm )
{
int i;
@@ -1109,7 +1109,7 @@ unsigned int QWinMetaFile::toDWord( short* parm )
//-----------------------------------------------------------------------------
-QColor QWinMetaFile::color( short* parm )
+TQColor QWinMetaFile::color( short* parm )
{
unsigned int colorRef;
int red, green, blue;
@@ -1119,7 +1119,7 @@ QColor QWinMetaFile::color( short* parm )
green = ( colorRef>>8 ) & 255;
blue = ( colorRef>>16 ) & 255;
- return QColor( red, green, blue );
+ return TQColor( red, green, blue );
}
@@ -1162,25 +1162,25 @@ void QWinMetaFile::deleteHandle( int idx )
}
//-----------------------------------------------------------------------------
-Qt::RasterOp QWinMetaFile::winToQtRaster( short parm ) const
+TQt::RasterOp QWinMetaFile::winToTQtRaster( short parm ) const
{
- static const Qt::RasterOp opTab[] =
+ static const TQt::RasterOp opTab[] =
{
- Qt::CopyROP,
- Qt::ClearROP, Qt::NandROP, Qt::NotAndROP, Qt::NotCopyROP,
- Qt::AndNotROP, Qt::NotROP, Qt::XorROP, Qt::NorROP,
- Qt::AndROP, Qt::NotXorROP, Qt::NopROP, Qt::NotOrROP,
- Qt::CopyROP, Qt::OrNotROP, Qt::OrROP, Qt::SetROP
+ TQt::CopyROP,
+ TQt::ClearROP, TQt::NandROP, TQt::NotAndROP, TQt::NotCopyROP,
+ TQt::AndNotROP, TQt::NotROP, TQt::XorROP, TQt::NorROP,
+ TQt::AndROP, TQt::NotXorROP, TQt::NopROP, TQt::NotOrROP,
+ TQt::CopyROP, TQt::OrNotROP, TQt::OrROP, TQt::SetROP
};
if ( parm > 0 && parm <= 16 )
return opTab[ parm ];
else
- return Qt::CopyROP;
+ return TQt::CopyROP;
}
//-----------------------------------------------------------------------------
-Qt::RasterOp QWinMetaFile::winToQtRaster( long parm ) const
+TQt::RasterOp QWinMetaFile::winToTQtRaster( long parm ) const
{
/* TODO: Ternary raster operations
0x00C000CA dest = (source AND pattern)
@@ -1190,24 +1190,24 @@ Qt::RasterOp QWinMetaFile::winToQtRaster( long parm ) const
static const struct OpTab
{
long winRasterOp;
- Qt::RasterOp qtRasterOp;
+ TQt::RasterOp qtRasterOp;
} opTab[] =
{
- { 0x00CC0020, Qt::CopyROP },
- { 0x00EE0086, Qt::OrROP },
- { 0x008800C6, Qt::AndROP },
- { 0x00660046, Qt::XorROP },
- { 0x00440328, Qt::AndNotROP },
- { 0x00330008, Qt::NotCopyROP },
- { 0x001100A6, Qt::NandROP },
- { 0x00C000CA, Qt::CopyROP },
- { 0x00BB0226, Qt::NotOrROP },
- { 0x00F00021, Qt::CopyROP },
- { 0x00FB0A09, Qt::CopyROP },
- { 0x005A0049, Qt::CopyROP },
- { 0x00550009, Qt::NotROP },
- { 0x00000042, Qt::ClearROP },
- { 0x00FF0062, Qt::SetROP }
+ { 0x00CC0020, TQt::CopyROP },
+ { 0x00EE0086, TQt::OrROP },
+ { 0x008800C6, TQt::AndROP },
+ { 0x00660046, TQt::XorROP },
+ { 0x00440328, TQt::AndNotROP },
+ { 0x00330008, TQt::NotCopyROP },
+ { 0x001100A6, TQt::NandROP },
+ { 0x00C000CA, TQt::CopyROP },
+ { 0x00BB0226, TQt::NotOrROP },
+ { 0x00F00021, TQt::CopyROP },
+ { 0x00FB0A09, TQt::CopyROP },
+ { 0x005A0049, TQt::CopyROP },
+ { 0x00550009, TQt::NotROP },
+ { 0x00000042, TQt::ClearROP },
+ { 0x00FF0062, TQt::SetROP }
};
int i;
@@ -1218,11 +1218,11 @@ Qt::RasterOp QWinMetaFile::winToQtRaster( long parm ) const
if ( i < 15 )
return opTab[ i ].qtRasterOp;
else
- return Qt::CopyROP;
+ return TQt::CopyROP;
}
//-----------------------------------------------------------------------------
-bool QWinMetaFile::dibToBmp( QImage& bmp, const char* dib, long size )
+bool QWinMetaFile::dibToBmp( TQImage& bmp, const char* dib, long size )
{
typedef struct _BMPFILEHEADER {
WORD bmType;
@@ -1234,7 +1234,7 @@ bool QWinMetaFile::dibToBmp( QImage& bmp, const char* dib, long size )
int sizeBmp = size + 14;
- QByteArray pattern( sizeBmp ); // BMP header and DIB data
+ TQByteArray pattern( sizeBmp ); // BMP header and DIB data
pattern.fill(0);
memcpy( &pattern[ 14 ], dib, size );