diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kwmf/kowmfpaint.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kwmf/kowmfpaint.cc')
-rw-r--r-- | lib/kwmf/kowmfpaint.cc | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/lib/kwmf/kowmfpaint.cc b/lib/kwmf/kowmfpaint.cc index 7ce8ee8b..97a6e033 100644 --- a/lib/kwmf/kowmfpaint.cc +++ b/lib/kwmf/kowmfpaint.cc @@ -25,7 +25,7 @@ KoWmfPaint::KoWmfPaint() : KoWmfRead() { } -bool KoWmfPaint::play( QPaintDevice& target, bool relativeCoord ) +bool KoWmfPaint::play( TQPaintDevice& target, bool relativeCoord ) { if ( mPainter.isActive() ) return false; mTarget = ⌖ @@ -48,7 +48,7 @@ bool KoWmfPaint::begin() { } else { // some wmf files doesn't call setwindowOrg and setWindowExt, so it's better to do : - QRect rec = boundingRect(); + TQRect rec = boundingRect(); mPainter.setWindow( rec.left(), rec.top(), rec.width(), rec.height() ); } } @@ -58,12 +58,12 @@ bool KoWmfPaint::begin() { bool KoWmfPaint::end() { if ( mRelativeCoord ) { - QRect rec = boundingRect(); + TQRect rec = boundingRect(); // Draw 2 invisible points - // because QPicture::setBoundingRect() doesn't give expected result (QT3.1.2) + // because TQPicture::setBoundingRect() doesn't give expected result (QT3.1.2) // setBoundingRect( boundingRect() ); -// mPainter.setPen( Qt::NoPen ); +// mPainter.setPen( TQt::NoPen ); // mPainter.drawPoint( rec.left(), rec.top() ); // mPainter.drawPoint( rec.right(), rec.bottom() ); } @@ -81,13 +81,13 @@ void KoWmfPaint::restore() { } -void KoWmfPaint::setFont( const QFont &font ) { +void KoWmfPaint::setFont( const TQFont &font ) { mPainter.setFont( font ); } -void KoWmfPaint::setPen( const QPen &pen ) { - QPen p = pen; +void KoWmfPaint::setPen( const TQPen &pen ) { + TQPen p = pen; int width = pen.width(); if ( mTarget->isExtDev() ) { @@ -96,8 +96,8 @@ void KoWmfPaint::setPen( const QPen &pen ) { else { // WMF spec : width of pen in logical coordinate // => width of pen proportional with device context width - QRect devRec = mPainter.xForm( mPainter.window() ); - QRect rec = mPainter.window(); + TQRect devRec = mPainter.xForm( mPainter.window() ); + TQRect rec = mPainter.window(); if ( rec.width() != 0 ) width = ( width * devRec.width() ) / rec.width() ; else @@ -109,17 +109,17 @@ void KoWmfPaint::setPen( const QPen &pen ) { } -const QPen &KoWmfPaint::pen() const { +const TQPen &KoWmfPaint::pen() const { return mPainter.pen(); } -void KoWmfPaint::setBrush( const QBrush &brush ) { +void KoWmfPaint::setBrush( const TQBrush &brush ) { mPainter.setBrush( brush ); } -void KoWmfPaint::setBackgroundColor( const QColor &c ) { +void KoWmfPaint::setBackgroundColor( const TQColor &c ) { mPainter.setBackgroundColor( c ); } @@ -129,7 +129,7 @@ void KoWmfPaint::setBackgroundMode( Qt::BGMode mode ) { } -void KoWmfPaint::setRasterOp( Qt::RasterOp op ) { +void KoWmfPaint::setRasterOp( TQt::RasterOp op ) { mPainter.setRasterOp( op ); } @@ -153,7 +153,7 @@ void KoWmfPaint::setWindowOrg( int left, int top ) { mPainter.translate( -left, -top ); } else { - QRect rec = mPainter.window(); + TQRect rec = mPainter.window(); mPainter.setWindow( left, top, rec.width(), rec.height() ); } } @@ -161,7 +161,7 @@ void KoWmfPaint::setWindowOrg( int left, int top ) { void KoWmfPaint::setWindowExt( int w, int h ) { if ( mRelativeCoord ) { - QRect r = mPainter.window(); + TQRect r = mPainter.window(); double dx = mInternalWorldMatrix.dx(); double dy = mInternalWorldMatrix.dy(); double sx = mInternalWorldMatrix.m11(); @@ -182,24 +182,24 @@ void KoWmfPaint::setWindowExt( int w, int h ) { mPainter.translate( dx, dy ); } else { - QRect rec = mPainter.window(); + TQRect rec = mPainter.window(); mPainter.setWindow( rec.left(), rec.top(), w, h ); } } -void KoWmfPaint::setWorldMatrix( const QWMatrix &wm, bool combine ) { +void KoWmfPaint::setWorldMatrix( const TQWMatrix &wm, bool combine ) { mPainter.setWorldMatrix( wm, combine ); } -void KoWmfPaint::setClipRegion( const QRegion &rec ) { - mPainter.setClipRegion( rec, QPainter::CoordPainter ); +void KoWmfPaint::setClipRegion( const TQRegion &rec ) { + mPainter.setClipRegion( rec, TQPainter::CoordPainter ); } -QRegion KoWmfPaint::clipRegion() { - return mPainter.clipRegion( QPainter::CoordPainter ); +TQRegion KoWmfPaint::clipRegion() { + return mPainter.clipRegion( TQPainter::CoordPainter ); } @@ -243,28 +243,28 @@ void KoWmfPaint::drawChord( int x, int y, int w, int h, int a, int alen ) { } -void KoWmfPaint::drawPolyline( const QPointArray &pa ) { +void KoWmfPaint::drawPolyline( const TQPointArray &pa ) { mPainter.drawPolyline( pa ); } -void KoWmfPaint::drawPolygon( const QPointArray &pa, bool winding ) { - mPainter.drawPolygon( pa, winding ); +void KoWmfPaint::drawPolygon( const TQPointArray &pa, bool winding ) { + mPainter.tqdrawPolygon( pa, winding ); } -void KoWmfPaint::drawPolyPolygon( QPtrList<QPointArray>& listPa, bool winding ) { - QPointArray *pa; +void KoWmfPaint::drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding ) { + TQPointArray *pa; mPainter.save(); - QBrush brush = mPainter.brush(); + TQBrush brush = mPainter.brush(); // define clipping region - QRegion region; + TQRegion region; for ( pa = listPa.first() ; pa ; pa = listPa.next() ) { region = region.eor( *pa ); } - mPainter.setClipRegion( region, QPainter::CoordPainter ); + mPainter.setClipRegion( region, TQPainter::CoordPainter ); // fill polygons if ( brush != Qt::NoBrush ) { @@ -273,10 +273,10 @@ void KoWmfPaint::drawPolyPolygon( QPtrList<QPointArray>& listPa, bool winding ) // draw polygon's border mPainter.setClipping( false ); - if ( mPainter.pen().style() != Qt::NoPen ) { - mPainter.setBrush( Qt::NoBrush ); + if ( mPainter.pen().style() != TQt::NoPen ) { + mPainter.setBrush( TQt::NoBrush ); for ( pa = listPa.first() ; pa ; pa = listPa.next() ) { - mPainter.drawPolygon( *pa, winding ); + mPainter.tqdrawPolygon( *pa, winding ); } } @@ -285,12 +285,12 @@ void KoWmfPaint::drawPolyPolygon( QPtrList<QPointArray>& listPa, bool winding ) } -void KoWmfPaint::drawImage( int x, int y, const QImage &img, int sx, int sy, int sw, int sh ) { +void KoWmfPaint::drawImage( int x, int y, const TQImage &img, int sx, int sy, int sw, int sh ) { mPainter.drawImage( x, y, img, sx, sy, sw, sh ); } -void KoWmfPaint::drawText( int x, int y, int w, int h, int flags, const QString& s, double ) { +void KoWmfPaint::drawText( int x, int y, int w, int h, int flags, const TQString& s, double ) { mPainter.drawText( x, y, w, h, flags, s ); } |