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/kowmfreadprivate.h | |
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/kowmfreadprivate.h')
-rw-r--r-- | lib/kwmf/kowmfreadprivate.h | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/lib/kwmf/kowmfreadprivate.h b/lib/kwmf/kowmfreadprivate.h index 4dda478b..ea95e563 100644 --- a/lib/kwmf/kowmfreadprivate.h +++ b/lib/kwmf/kowmfreadprivate.h @@ -20,13 +20,13 @@ #ifndef _KOWMFREADPRIVATE_H_ #define _KOWMFREADPRIVATE_H_ -#include <qpen.h> -#include <qcolor.h> -#include <qfont.h> -#include <qrect.h> -#include <qregion.h> -#include <qbuffer.h> -#include <qstring.h> +#include <tqpen.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqrect.h> +#include <tqregion.h> +#include <tqbuffer.h> +#include <tqstring.h> #include "kowmfstruct.h" #include "kowmfstack.h" @@ -47,7 +47,7 @@ public: /** * Load WMF file. Returns true on success. */ - bool load( const QByteArray& array ); + bool load( const TQByteArray& array ); /** * Plays a metafile in @p readKwmf and returns true on success. @@ -59,142 +59,142 @@ public: /* Metafile painter methods */ /// set window origin - void setWindowOrg( Q_UINT32 size, QDataStream& stream ); + void setWindowOrg( TQ_UINT32 size, TQDataStream& stream ); /// set window extents - void setWindowExt( Q_UINT32 size, QDataStream& stream ); + void setWindowExt( TQ_UINT32 size, TQDataStream& stream ); /// scale window extents - void ScaleWindowExt( Q_UINT32, QDataStream& stream ); + void ScaleWindowExt( TQ_UINT32, TQDataStream& stream ); /// offset in window origin - void OffsetWindowOrg( Q_UINT32, QDataStream& stream ); + void OffsetWindowOrg( TQ_UINT32, TQDataStream& stream ); /****************** Drawing *******************/ /// draw line to coord - void lineTo( Q_UINT32 size, QDataStream& stream ); + void lineTo( TQ_UINT32 size, TQDataStream& stream ); /// move pen to coord - void moveTo( Q_UINT32 size, QDataStream& stream ); + void moveTo( TQ_UINT32 size, TQDataStream& stream ); /// draw ellipse - void ellipse( Q_UINT32 size, QDataStream& stream ); + void ellipse( TQ_UINT32 size, TQDataStream& stream ); /// draw polygon - void polygon( Q_UINT32 size, QDataStream& stream ); + void polygon( TQ_UINT32 size, TQDataStream& stream ); /// draw a list of polygons - void polyPolygon( Q_UINT32 size, QDataStream& stream ); + void polyPolygon( TQ_UINT32 size, TQDataStream& stream ); /// draw series of lines - void polyline( Q_UINT32 size, QDataStream& stream ); + void polyline( TQ_UINT32 size, TQDataStream& stream ); /// draw a rectangle - void rectangle( Q_UINT32 size, QDataStream& stream ); + void rectangle( TQ_UINT32 size, TQDataStream& stream ); /// draw round rectangle - void roundRect( Q_UINT32 size, QDataStream& stream ); + void roundRect( TQ_UINT32 size, TQDataStream& stream ); /// draw arc - void arc( Q_UINT32 size, QDataStream& stream ); + void arc( TQ_UINT32 size, TQDataStream& stream ); /// draw chord - void chord( Q_UINT32 size, QDataStream& stream ); + void chord( TQ_UINT32 size, TQDataStream& stream ); /// draw pie - void pie( Q_UINT32 size, QDataStream& stream ); + void pie( TQ_UINT32 size, TQDataStream& stream ); /// set polygon fill mode - void setPolyFillMode( Q_UINT32 size, QDataStream& stream ); + void setPolyFillMode( TQ_UINT32 size, TQDataStream& stream ); /// set background pen color - void setBkColor( Q_UINT32 size, QDataStream& stream ); + void setBkColor( TQ_UINT32 size, TQDataStream& stream ); /// set background pen mode - void setBkMode( Q_UINT32 size, QDataStream& stream ); + void setBkMode( TQ_UINT32 size, TQDataStream& stream ); /// set a pixel - void setPixel( Q_UINT32 size, QDataStream& stream ); + void setPixel( TQ_UINT32 size, TQDataStream& stream ); /// set raster operation mode - void setRop( Q_UINT32 size, QDataStream& stream ); + void setRop( TQ_UINT32 size, TQDataStream& stream ); /// save device context */ - void saveDC( Q_UINT32 size, QDataStream& stream ); + void saveDC( TQ_UINT32 size, TQDataStream& stream ); /// restore device context - void restoreDC( Q_UINT32 size, QDataStream& stream ); + void restoreDC( TQ_UINT32 size, TQDataStream& stream ); /// clipping region is the intersection of this region and the original region - void intersectClipRect( Q_UINT32 size, QDataStream& stream ); + void intersectClipRect( TQ_UINT32 size, TQDataStream& stream ); /// delete a clipping rectangle of the original region - void excludeClipRect( Q_UINT32 size, QDataStream& stream ); + void excludeClipRect( TQ_UINT32 size, TQDataStream& stream ); /****************** Text *******************/ /// set text color - void setTextColor( Q_UINT32 size, QDataStream& stream ); - /// set text alignment - void setTextAlign( Q_UINT32 size, QDataStream& stream ); + void setTextColor( TQ_UINT32 size, TQDataStream& stream ); + /// set text tqalignment + void setTextAlign( TQ_UINT32 size, TQDataStream& stream ); /// draw text - void textOut( Q_UINT32 size, QDataStream& stream ); - void extTextOut( Q_UINT32 size, QDataStream& stream ); + void textOut( TQ_UINT32 size, TQDataStream& stream ); + void extTextOut( TQ_UINT32 size, TQDataStream& stream ); /****************** Bitmap *******************/ - void SetStretchBltMode( Q_UINT32, QDataStream& stream ); + void SetStretchBltMode( TQ_UINT32, TQDataStream& stream ); /// copies a DIB into a dest location - void dibBitBlt( Q_UINT32 size, QDataStream& stream ); + void dibBitBlt( TQ_UINT32 size, TQDataStream& stream ); /// stretches a DIB into a dest location - void dibStretchBlt( Q_UINT32 size, QDataStream& stream ); - void stretchDib( Q_UINT32 size, QDataStream& stream ); + void dibStretchBlt( TQ_UINT32 size, TQDataStream& stream ); + void stretchDib( TQ_UINT32 size, TQDataStream& stream ); /// create a pattern brush - void dibCreatePatternBrush( Q_UINT32 size, QDataStream& stream ); + void dibCreatePatternBrush( TQ_UINT32 size, TQDataStream& stream ); /****************** Object handle *******************/ /// activate object handle - void selectObject( Q_UINT32 size, QDataStream& stream ); + void selectObject( TQ_UINT32 size, TQDataStream& stream ); /// free object handle - void deleteObject( Q_UINT32 size, QDataStream& stream ); + void deleteObject( TQ_UINT32 size, TQDataStream& stream ); /// create an empty object in the object list void createEmptyObject(); /// create a logical brush - void createBrushIndirect( Q_UINT32 size, QDataStream& stream ); + void createBrushIndirect( TQ_UINT32 size, TQDataStream& stream ); /// create a logical pen - void createPenIndirect( Q_UINT32 size, QDataStream& stream ); + void createPenIndirect( TQ_UINT32 size, TQDataStream& stream ); /// create a logical font - void createFontIndirect( Q_UINT32 size, QDataStream& stream ); + void createFontIndirect( TQ_UINT32 size, TQDataStream& stream ); /****************** misc *******************/ /// end of meta file - void end( Q_UINT32, QDataStream& stream ); + void end( TQ_UINT32, TQDataStream& stream ); /** Calculate header checksum */ - static Q_UINT16 calcCheckSum( WmfPlaceableHeader* ); + static TQ_UINT16 calcCheckSum( WmfPlaceableHeader* ); // function unimplemented - void notyet( Q_UINT32, QDataStream& stream ); - void region( Q_UINT32, QDataStream& stream ); - void palette( Q_UINT32, QDataStream& stream ); - void escape( Q_UINT32, QDataStream& stream ); - void setRelAbs( Q_UINT32, QDataStream& stream ); - void setMapMode( Q_UINT32, QDataStream& stream ); - void extFloodFill( Q_UINT32, QDataStream& stream ); - void startDoc( Q_UINT32, QDataStream& stream ); - void startPage( Q_UINT32, QDataStream& stream ); - void endDoc( Q_UINT32, QDataStream& stream ); - void endPage( Q_UINT32, QDataStream& stream ); - void resetDC( Q_UINT32, QDataStream& stream ); - void bitBlt( Q_UINT32, QDataStream& stream ); - void setDibToDev( Q_UINT32, QDataStream& stream ); - void createBrush( Q_UINT32, QDataStream& stream ); - void createPatternBrush( Q_UINT32, QDataStream& stream ); - void createBitmap( Q_UINT32, QDataStream& stream ); - void createBitmapIndirect( Q_UINT32, QDataStream& stream ); - void createPalette( Q_UINT32, QDataStream& stream ); - void createRegion( Q_UINT32, QDataStream& stream ); + void notyet( TQ_UINT32, TQDataStream& stream ); + void region( TQ_UINT32, TQDataStream& stream ); + void palette( TQ_UINT32, TQDataStream& stream ); + void escape( TQ_UINT32, TQDataStream& stream ); + void setRelAbs( TQ_UINT32, TQDataStream& stream ); + void setMapMode( TQ_UINT32, TQDataStream& stream ); + void extFloodFill( TQ_UINT32, TQDataStream& stream ); + void startDoc( TQ_UINT32, TQDataStream& stream ); + void startPage( TQ_UINT32, TQDataStream& stream ); + void endDoc( TQ_UINT32, TQDataStream& stream ); + void endPage( TQ_UINT32, TQDataStream& stream ); + void resetDC( TQ_UINT32, TQDataStream& stream ); + void bitBlt( TQ_UINT32, TQDataStream& stream ); + void setDibToDev( TQ_UINT32, TQDataStream& stream ); + void createBrush( TQ_UINT32, TQDataStream& stream ); + void createPatternBrush( TQ_UINT32, TQDataStream& stream ); + void createBitmap( TQ_UINT32, TQDataStream& stream ); + void createBitmapIndirect( TQ_UINT32, TQDataStream& stream ); + void createPalette( TQ_UINT32, TQDataStream& stream ); + void createRegion( TQ_UINT32, TQDataStream& stream ); private: //----------------------------------------------------------------------------- - // Utilities and conversion Wmf -> Qt + // Utilities and conversion Wmf -> TQt /** Handle win-object-handles */ bool addHandle( KoWmfHandle* ); void deleteHandle( int ); - /** Convert QINT16 points into QPointArray */ - void pointArray( QDataStream& stream, QPointArray& pa ); + /** Convert TQINT16 points into TQPointArray */ + void pointArray( TQDataStream& stream, TQPointArray& pa ); - /** Convertion between windows color and QColor */ - QColor qtColor( Q_UINT32 color ) const - { return QColor( color & 0xFF, (color>>8) & 0xFF, (color>>16) & 0xFF ); } + /** Convertion between windows color and TQColor */ + TQColor qtColor( TQ_UINT32 color ) const + { return TQColor( color & 0xFF, (color>>8) & 0xFF, (color>>16) & 0xFF ); } /** Convert (x1,y1) and (x2, y2) positions in angle and angleLength */ void xyToAngle( int xStart, int yStart, int xEnd, int yEnd, int& angle, int& aLength ); /** Convert windows rasterOp in QT rasterOp */ - Qt::RasterOp winToQtRaster( Q_UINT16 param ) const; - Qt::RasterOp winToQtRaster( Q_UINT32 param ) const; + TQt::RasterOp winToTQtRaster( TQ_UINT16 param ) const; + TQt::RasterOp winToTQtRaster( TQ_UINT32 param ) const; /** Converts DIB to BMP */ - bool dibToBmp( QImage& bmp, QDataStream& stream, Q_UINT32 size); + bool dibToBmp( TQImage& bmp, TQDataStream& stream, TQ_UINT32 size); public: @@ -205,7 +205,7 @@ public: bool mEnhanced; /// bounding rectangle - QRect mBBox; // placeable file : this is the header + TQRect mBBox; // placeable file : this is the header // standard file : this is the value in setWindowOrg and setWindowExt /// number of points per inch for the default size int mDpi; @@ -218,15 +218,15 @@ private: KoWmfRead *mReadWmf; // current coordinate != mBBox - QRect mWindow; + TQRect mWindow; // current state of the drawing - QColor mTextColor; - Q_UINT16 mTextAlign; + TQColor mTextColor; + TQ_UINT16 mTextAlign; int mTextRotation; bool mWinding; // memory allocation for WMF file - QBuffer* mBuffer; + TQBuffer* mBuffer; int mOffsetFirstRecord; // stack of object handle @@ -240,7 +240,7 @@ private: * static data */ static const struct KoWmfFunc { - void ( KoWmfReadPrivate::*method )( Q_UINT32, QDataStream& ); + void ( KoWmfReadPrivate::*method )( TQ_UINT32, TQDataStream& ); } koWmfFunc[] = { { &KoWmfReadPrivate::end }, // 0 { &KoWmfReadPrivate::setBkColor }, // 1 |