diff options
Diffstat (limited to 'kjsembed/tools/headers/qcanvas.h')
-rw-r--r-- | kjsembed/tools/headers/qcanvas.h | 508 |
1 files changed, 254 insertions, 254 deletions
diff --git a/kjsembed/tools/headers/qcanvas.h b/kjsembed/tools/headers/qcanvas.h index 62a33b65..797c4bd3 100644 --- a/kjsembed/tools/headers/qcanvas.h +++ b/kjsembed/tools/headers/qcanvas.h @@ -1,7 +1,7 @@ /********************************************************************** ** ** -** Definition of QCanvas classes +** Definition of TQCanvas classes ** ** Created : 991211 ** @@ -39,13 +39,13 @@ #define QCANVAS_H #ifndef QT_H -#include "qscrollview.h" -#include "qpixmap.h" -#include "qptrlist.h" -#include "qbrush.h" -#include "qpen.h" -#include "qvaluelist.h" -#include "qpointarray.h" +#include "tqscrollview.h" +#include "tqpixmap.h" +#include "tqptrlist.h" +#include "tqbrush.h" +#include "tqpen.h" +#include "tqvaluelist.h" +#include "tqpointarray.h" #endif // QT_H #if !defined( QT_MODULE_CANVAS ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_CANVAS ) @@ -73,20 +73,20 @@ class QCanvasView; class QCanvasPixmap; -class QM_EXPORT_CANVAS QCanvasItemList : public QValueList<QCanvasItem*> { +class QM_EXPORT_CANVAS TQCanvasItemList : public TQValueList<TQCanvasItem*> { public: void sort(); - void drawUnique( QPainter& painter ); + void drawUnique( TQPainter& painter ); }; class QCanvasItemExtra; -class QM_EXPORT_CANVAS QCanvasItem : public Qt +class QM_EXPORT_CANVAS TQCanvasItem : public Qt { public: - QCanvasItem(QCanvas* canvas); - virtual ~QCanvasItem(); + TQCanvasItem(TQCanvas* canvas); + virtual ~TQCanvasItem(); double x() const { return myx; } @@ -110,13 +110,13 @@ public: double yVelocity() const; virtual void advance(int stage); - virtual bool collidesWith( const QCanvasItem* ) const=0; + virtual bool collidesWith( const TQCanvasItem* ) const=0; - QCanvasItemList collisions(bool exact /* NO DEFAULT */ ) const; + TQCanvasItemList collisions(bool exact /* NO DEFAULT */ ) const; - virtual void setCanvas(QCanvas*); + virtual void setCanvas(TQCanvas*); - virtual void draw(QPainter&)=0; + virtual void draw(TQPainter&)=0; void show(); void hide(); @@ -159,10 +159,10 @@ public: virtual int rtti() const; static int RTTI; - virtual QRect boundingRect() const=0; - virtual QRect boundingRectAdvanced() const; + virtual TQRect boundingRect() const=0; + virtual TQRect boundingRectAdvanced() const; - QCanvas* canvas() const + TQCanvas* canvas() const { return cnv; } protected: @@ -179,22 +179,22 @@ private: friend class QCanvasText; friend class QCanvasLine; - virtual QPointArray chunks() const; + virtual TQPointArray chunks() const; virtual void addToChunks(); virtual void removeFromChunks(); virtual void changeChunks(); - virtual bool collidesWith( const QCanvasSprite*, - const QCanvasPolygonalItem*, - const QCanvasRectangle*, - const QCanvasEllipse*, - const QCanvasText* ) const = 0; + virtual bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const = 0; // End of friend stuff - QCanvas* cnv; - static QCanvas* current_canvas; + TQCanvas* cnv; + static TQCanvas* current_canvas; double myx,myy,myz; - QCanvasItemExtra *ext; - QCanvasItemExtra& extra(); + TQCanvasItemExtra *ext; + TQCanvasItemExtra& extra(); uint ani:1; uint vis:1; uint val:1; @@ -206,23 +206,23 @@ private: class QCanvasData; -class QM_EXPORT_CANVAS QCanvas : public QObject +class QM_EXPORT_CANVAS TQCanvas : public QObject { Q_OBJECT public: - QCanvas( QObject* parent = 0, const char* name = 0 ); - QCanvas(int w, int h); - QCanvas( QPixmap p, int h, int v, int tilewidth, int tileheight ); + TQCanvas( TQObject* parent = 0, const char* name = 0 ); + TQCanvas(int w, int h); + TQCanvas( TQPixmap p, int h, int v, int tilewidth, int tileheight ); - virtual ~QCanvas(); + virtual ~TQCanvas(); - virtual void setTiles( QPixmap tiles, int h, int v, + virtual void setTiles( TQPixmap tiles, int h, int v, int tilewidth, int tileheight ); - virtual void setBackgroundPixmap( const QPixmap& p ); - QPixmap backgroundPixmap() const; + virtual void setBackgroundPixmap( const TQPixmap& p ); + TQPixmap backgroundPixmap() const; - virtual void setBackgroundColor( const QColor& c ); - QColor backgroundColor() const; + virtual void setBackgroundColor( const TQColor& c ); + TQColor backgroundColor() const; virtual void setTile( int x, int y, int tilenum ); int tile( int x, int y ) const @@ -243,17 +243,17 @@ public: { return awidth; } int height() const { return aheight; } - QSize size() const - { return QSize(awidth,aheight); } - QRect rect() const - { return QRect( 0, 0, awidth, aheight ); } + TQSize size() const + { return TQSize(awidth,aheight); } + TQRect rect() const + { return TQRect( 0, 0, awidth, aheight ); } bool onCanvas( int x, int y ) const { return x>=0 && y>=0 && x<awidth && y<aheight; } - bool onCanvas( const QPoint& p ) const + bool onCanvas( const TQPoint& p ) const { return onCanvas(p.x(),p.y()); } bool validChunk( int x, int y ) const { return x>=0 && y>=0 && x<chwidth && y<chheight; } - bool validChunk( const QPoint& p ) const + bool validChunk( const TQPoint& p ) const { return validChunk(p.x(),p.y()); } int chunkSize() const @@ -265,34 +265,34 @@ public: virtual void setChangedChunk(int i, int j); virtual void setChangedChunkContaining(int x, int y); virtual void setAllChanged(); - virtual void setChanged(const QRect& area); - virtual void setUnchanged(const QRect& area); + virtual void setChanged(const TQRect& area); + virtual void setUnchanged(const TQRect& area); // These call setChangedChunk. - void addItemToChunk(QCanvasItem*, int i, int j); - void removeItemFromChunk(QCanvasItem*, int i, int j); - void addItemToChunkContaining(QCanvasItem*, int x, int y); - void removeItemFromChunkContaining(QCanvasItem*, int x, int y); - - QCanvasItemList allItems(); - QCanvasItemList collisions( const QPoint&) const; - QCanvasItemList collisions( const QRect&) const; - QCanvasItemList collisions( const QPointArray& pa, const QCanvasItem* item, + void addItemToChunk(TQCanvasItem*, int i, int j); + void removeItemFromChunk(TQCanvasItem*, int i, int j); + void addItemToChunkContaining(TQCanvasItem*, int x, int y); + void removeItemFromChunkContaining(TQCanvasItem*, int x, int y); + + TQCanvasItemList allItems(); + TQCanvasItemList collisions( const TQPoint&) const; + TQCanvasItemList collisions( const TQRect&) const; + TQCanvasItemList collisions( const TQPointArray& pa, const TQCanvasItem* item, bool exact) const; - void drawArea(const QRect&, QPainter* p, bool double_buffer=FALSE); + void drawArea(const TQRect&, TQPainter* p, bool double_buffer=FALSE); - // These are for QCanvasView to call - virtual void addView(QCanvasView*); - virtual void removeView(QCanvasView*); - void drawCanvasArea(const QRect&, QPainter* p=0, bool double_buffer=TRUE); - void drawViewArea( QCanvasView* view, QPainter* p, const QRect& r, bool dbuf ); + // These are for TQCanvasView to call + virtual void addView(TQCanvasView*); + virtual void removeView(TQCanvasView*); + void drawCanvasArea(const TQRect&, TQPainter* p=0, bool double_buffer=TRUE); + void drawViewArea( TQCanvasView* view, TQPainter* p, const TQRect& r, bool dbuf ); - // These are for QCanvasItem to call - virtual void addItem(QCanvasItem*); - virtual void addAnimation(QCanvasItem*); - virtual void removeItem(QCanvasItem*); - virtual void removeAnimation(QCanvasItem*); + // These are for TQCanvasItem to call + virtual void addItem(TQCanvasItem*); + virtual void addAnimation(TQCanvasItem*); + virtual void removeItem(TQCanvasItem*); + virtual void removeAnimation(TQCanvasItem*); virtual void setAdvancePeriod(int ms); virtual void setUpdatePeriod(int ms); @@ -307,77 +307,77 @@ public slots: virtual void update(); protected: - virtual void drawBackground(QPainter&, const QRect& area); - virtual void drawForeground(QPainter&, const QRect& area); + virtual void drawBackground(TQPainter&, const TQRect& area); + virtual void drawForeground(TQPainter&, const TQRect& area); private: void init(int w, int h, int chunksze=16, int maxclust=100); - QCanvasChunk& chunk(int i, int j) const; - QCanvasChunk& chunkContaining(int x, int y) const; + TQCanvasChunk& chunk(int i, int j) const; + TQCanvasChunk& chunkContaining(int x, int y) const; - QRect changeBounds(const QRect& inarea); - void drawChanges(const QRect& inarea); + TQRect changeBounds(const TQRect& inarea); + void drawChanges(const TQRect& inarea); void ensureOffScrSize( int osw, int osh ); - QPixmap offscr; + TQPixmap offscr; int awidth,aheight; int chunksize; int maxclusters; int chwidth,chheight; - QCanvasChunk* chunks; + TQCanvasChunk* chunks; - QCanvasData* d; + TQCanvasData* d; - void initTiles(QPixmap p, int h, int v, int tilewidth, int tileheight); + void initTiles(TQPixmap p, int h, int v, int tilewidth, int tileheight); ushort *grid; ushort htiles; ushort vtiles; ushort tilew; ushort tileh; bool oneone; - QPixmap pm; - QTimer* update_timer; - QColor bgcolor; + TQPixmap pm; + TQTimer* update_timer; + TQColor bgcolor; bool debug_redraw_areas; bool dblbuf; - friend void qt_unview(QCanvas* c); + friend void qt_unview(TQCanvas* c); #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= - QCanvas( const QCanvas & ); - QCanvas &operator=( const QCanvas & ); + TQCanvas( const TQCanvas & ); + TQCanvas &operator=( const TQCanvas & ); #endif }; class QCanvasViewData; -class QM_EXPORT_CANVAS QCanvasView : public QScrollView +class QM_EXPORT_CANVAS TQCanvasView : public QScrollView { Q_OBJECT public: - QCanvasView(QWidget* parent=0, const char* name=0, WFlags f=0); - QCanvasView(QCanvas* viewing, QWidget* parent=0, const char* name=0, WFlags f=0); - ~QCanvasView(); + TQCanvasView(TQWidget* parent=0, const char* name=0, WFlags f=0); + TQCanvasView(TQCanvas* viewing, TQWidget* parent=0, const char* name=0, WFlags f=0); + ~TQCanvasView(); - QCanvas* canvas() const + TQCanvas* canvas() const { return viewing; } - void setCanvas(QCanvas* v); + void setCanvas(TQCanvas* v); - const QWMatrix &worldMatrix() const; - const QWMatrix &inverseWorldMatrix() const; - bool setWorldMatrix( const QWMatrix & ); + const TQWMatrix &worldMatrix() const; + const TQWMatrix &inverseWorldMatrix() const; + bool setWorldMatrix( const TQWMatrix & ); protected: - void drawContents( QPainter*, int cx, int cy, int cw, int ch ); - QSize sizeHint() const; + void drawContents( TQPainter*, int cx, int cy, int cw, int ch ); + TQSize sizeHint() const; private: - void drawContents( QPainter* ); - QCanvas* viewing; - QCanvasViewData* d; - friend void qt_unview(QCanvas* c); + void drawContents( TQPainter* ); + TQCanvas* viewing; + TQCanvasViewData* d; + friend void qt_unview(TQCanvas* c); private slots: void cMoving(int,int); @@ -385,21 +385,21 @@ private slots: private: #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= - QCanvasView( const QCanvasView & ); - QCanvasView &operator=( const QCanvasView & ); + TQCanvasView( const TQCanvasView & ); + TQCanvasView &operator=( const TQCanvasView & ); #endif }; -class QM_EXPORT_CANVAS QCanvasPixmap : public QPixmap +class QM_EXPORT_CANVAS TQCanvasPixmap : public QPixmap { public: #ifndef QT_NO_IMAGEIO - QCanvasPixmap(const QString& datafilename); + TQCanvasPixmap(const TQString& datafilename); #endif - QCanvasPixmap(const QImage& image); - QCanvasPixmap(const QPixmap&, const QPoint& hotspot); - ~QCanvasPixmap(); + TQCanvasPixmap(const TQImage& image); + TQCanvasPixmap(const TQPixmap&, const TQPoint& hotspot); + ~TQCanvasPixmap(); int offsetX() const { return hotx; } @@ -409,73 +409,73 @@ public: private: #if defined(Q_DISABLE_COPY) - QCanvasPixmap( const QCanvasPixmap & ); - QCanvasPixmap &operator=( const QCanvasPixmap & ); + TQCanvasPixmap( const TQCanvasPixmap & ); + TQCanvasPixmap &operator=( const TQCanvasPixmap & ); #endif - void init(const QImage&); - void init(const QPixmap& pixmap, int hx, int hy); + void init(const TQImage&); + void init(const TQPixmap& pixmap, int hx, int hy); friend class QCanvasSprite; friend class QCanvasPixmapArray; - friend bool qt_testCollision(const QCanvasSprite* s1, const QCanvasSprite* s2); + friend bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2); int hotx,hoty; - QImage* collision_mask; + TQImage* collision_mask; }; class QM_EXPORT_CANVAS QCanvasPixmapArray { public: - QCanvasPixmapArray(); + TQCanvasPixmapArray(); #ifndef QT_NO_IMAGEIO - QCanvasPixmapArray(const QString& datafilenamepattern, int framecount=0); + TQCanvasPixmapArray(const TQString& datafilenamepattern, int framecount=0); #endif // this form is deprecated - QCanvasPixmapArray(QPtrList<QPixmap>, QPtrList<QPoint> hotspots); + TQCanvasPixmapArray(TQPtrList<TQPixmap>, TQPtrList<TQPoint> hotspots); - QCanvasPixmapArray(QValueList<QPixmap>, QPointArray hotspots = QPointArray() ); - ~QCanvasPixmapArray(); + TQCanvasPixmapArray(TQValueList<TQPixmap>, TQPointArray hotspots = TQPointArray() ); + ~TQCanvasPixmapArray(); #ifndef QT_NO_IMAGEIO - bool readPixmaps(const QString& datafilenamepattern, int framecount=0); - bool readCollisionMasks(const QString& filenamepattern); + bool readPixmaps(const TQString& datafilenamepattern, int framecount=0); + bool readCollisionMasks(const TQString& filenamepattern); #endif // deprecated bool operator!(); // Failure check. bool isValid() const; - QCanvasPixmap* image(int i) const + TQCanvasPixmap* image(int i) const { return img ? img[i] : 0; } - void setImage(int i, QCanvasPixmap* p); + void setImage(int i, TQCanvasPixmap* p); uint count() const { return (uint)framecount; } private: #if defined(Q_DISABLE_COPY) - QCanvasPixmapArray( const QCanvasPixmapArray & ); - QCanvasPixmapArray &operator=( const QCanvasPixmapArray & ); + TQCanvasPixmapArray( const TQCanvasPixmapArray & ); + TQCanvasPixmapArray &operator=( const TQCanvasPixmapArray & ); #endif #ifndef QT_NO_IMAGEIO - bool readPixmaps(const QString& datafilenamepattern, int framecount, bool maskonly); + bool readPixmaps(const TQString& datafilenamepattern, int framecount, bool maskonly); #endif void reset(); int framecount; - QCanvasPixmap** img; + TQCanvasPixmap** img; }; -class QM_EXPORT_CANVAS QCanvasSprite : public QCanvasItem +class QM_EXPORT_CANVAS TQCanvasSprite : public QCanvasItem { public: - QCanvasSprite(QCanvasPixmapArray* array, QCanvas* canvas); + TQCanvasSprite(TQCanvasPixmapArray* array, TQCanvas* canvas); - void setSequence(QCanvasPixmapArray* seq); + void setSequence(TQCanvasPixmapArray* seq); - virtual ~QCanvasSprite(); + virtual ~TQCanvasSprite(); void move(double x, double y); virtual void move(double x, double y, int frame); @@ -490,9 +490,9 @@ public: int rtti() const; static int RTTI; - bool collidesWith( const QCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; - QRect boundingRect() const; + TQRect boundingRect() const; // is there a reason for these to be protected? Lars //protected: @@ -509,20 +509,20 @@ public: int topEdge(int ny) const; int rightEdge(int nx) const; int bottomEdge(int ny) const; - QCanvasPixmap* image() const + TQCanvasPixmap* image() const { return images->image(frm); } - virtual QCanvasPixmap* imageAdvanced() const; - QCanvasPixmap* image(int f) const + virtual TQCanvasPixmap* imageAdvanced() const; + TQCanvasPixmap* image(int f) const { return images->image(f); } virtual void advance(int stage); public: - void draw(QPainter& painter); + void draw(TQPainter& painter); private: #if defined(Q_DISABLE_COPY) - QCanvasSprite( const QCanvasSprite & ); - QCanvasSprite &operator=( const QCanvasSprite & ); + TQCanvasSprite( const TQCanvasSprite & ); + TQCanvasSprite &operator=( const TQCanvasSprite & ); #endif void addToChunks(); void removeFromChunks(); @@ -532,46 +532,46 @@ private: ushort anim_val; uint anim_state:2; uint anim_type:14; - bool collidesWith( const QCanvasSprite*, - const QCanvasPolygonalItem*, - const QCanvasRectangle*, - const QCanvasEllipse*, - const QCanvasText* ) const; + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; - friend bool qt_testCollision( const QCanvasSprite* s1, - const QCanvasSprite* s2 ); + friend bool qt_testCollision( const TQCanvasSprite* s1, + const TQCanvasSprite* s2 ); - QCanvasPixmapArray* images; + TQCanvasPixmapArray* images; }; class QPolygonalProcessor; -class QM_EXPORT_CANVAS QCanvasPolygonalItem : public QCanvasItem +class QM_EXPORT_CANVAS TQCanvasPolygonalItem : public QCanvasItem { public: - QCanvasPolygonalItem(QCanvas* canvas); - virtual ~QCanvasPolygonalItem(); + TQCanvasPolygonalItem(TQCanvas* canvas); + virtual ~TQCanvasPolygonalItem(); - bool collidesWith( const QCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; - virtual void setPen(QPen p); - virtual void setBrush(QBrush b); + virtual void setPen(TQPen p); + virtual void setBrush(TQBrush b); - QPen pen() const + TQPen pen() const { return pn; } - QBrush brush() const + TQBrush brush() const { return br; } - virtual QPointArray areaPoints() const=0; - virtual QPointArray areaPointsAdvanced() const; - QRect boundingRect() const; + virtual TQPointArray areaPoints() const=0; + virtual TQPointArray areaPointsAdvanced() const; + TQRect boundingRect() const; int rtti() const; static int RTTI; protected: - void draw(QPainter &); - virtual void drawShape(QPainter &) = 0; + void draw(TQPainter &); + virtual void drawShape(TQPainter &) = 0; bool winding() const; void setWinding(bool); @@ -581,88 +581,88 @@ protected: { return (bool)val; } private: - void scanPolygon( const QPointArray& pa, int winding, - QPolygonalProcessor& process ) const; - QPointArray chunks() const; - - bool collidesWith( const QCanvasSprite*, - const QCanvasPolygonalItem*, - const QCanvasRectangle*, - const QCanvasEllipse*, - const QCanvasText* ) const; - - QBrush br; - QPen pn; + void scanPolygon( const TQPointArray& pa, int winding, + TQPolygonalProcessor& process ) const; + TQPointArray chunks() const; + + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; + + TQBrush br; + TQPen pn; uint wind:1; }; -class QM_EXPORT_CANVAS QCanvasRectangle : public QCanvasPolygonalItem +class QM_EXPORT_CANVAS TQCanvasRectangle : public QCanvasPolygonalItem { public: - QCanvasRectangle(QCanvas* canvas); - QCanvasRectangle(const QRect&, QCanvas* canvas); - QCanvasRectangle(int x, int y, int width, int height, QCanvas* canvas); + TQCanvasRectangle(TQCanvas* canvas); + TQCanvasRectangle(const TQRect&, TQCanvas* canvas); + TQCanvasRectangle(int x, int y, int width, int height, TQCanvas* canvas); - ~QCanvasRectangle(); + ~TQCanvasRectangle(); int width() const; int height() const; void setSize(int w, int h); - QSize size() const - { return QSize(w,h); } - QPointArray areaPoints() const; - QRect rect() const - { return QRect(int(x()),int(y()),w,h); } + TQSize size() const + { return TQSize(w,h); } + TQPointArray areaPoints() const; + TQRect rect() const + { return TQRect(int(x()),int(y()),w,h); } - bool collidesWith( const QCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; int rtti() const; static int RTTI; protected: - void drawShape(QPainter &); - QPointArray chunks() const; + void drawShape(TQPainter &); + TQPointArray chunks() const; private: - bool collidesWith( const QCanvasSprite*, - const QCanvasPolygonalItem*, - const QCanvasRectangle*, - const QCanvasEllipse*, - const QCanvasText* ) const; + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; int w, h; }; -class QM_EXPORT_CANVAS QCanvasPolygon : public QCanvasPolygonalItem +class QM_EXPORT_CANVAS TQCanvasPolygon : public QCanvasPolygonalItem { public: - QCanvasPolygon(QCanvas* canvas); - ~QCanvasPolygon(); - void setPoints(QPointArray); - QPointArray points() const; + TQCanvasPolygon(TQCanvas* canvas); + ~TQCanvasPolygon(); + void setPoints(TQPointArray); + TQPointArray points() const; void moveBy(double dx, double dy); - QPointArray areaPoints() const; + TQPointArray areaPoints() const; int rtti() const; static int RTTI; protected: - void drawShape(QPainter &); - QPointArray poly; + void drawShape(TQPainter &); + TQPointArray poly; }; -class QM_EXPORT_CANVAS QCanvasSpline : public QCanvasPolygon +class QM_EXPORT_CANVAS TQCanvasSpline : public QCanvasPolygon { public: - QCanvasSpline(QCanvas* canvas); - ~QCanvasSpline(); + TQCanvasSpline(TQCanvas* canvas); + ~TQCanvasSpline(); - void setControlPoints(QPointArray, bool closed=TRUE); - QPointArray controlPoints() const; + void setControlPoints(TQPointArray, bool closed=TRUE); + TQPointArray controlPoints() const; bool closed() const; int rtti() const; @@ -670,47 +670,47 @@ public: private: void recalcPoly(); - QPointArray bez; + TQPointArray bez; bool cl; }; -class QM_EXPORT_CANVAS QCanvasLine : public QCanvasPolygonalItem +class QM_EXPORT_CANVAS TQCanvasLine : public QCanvasPolygonalItem { public: - QCanvasLine(QCanvas* canvas); - ~QCanvasLine(); + TQCanvasLine(TQCanvas* canvas); + ~TQCanvasLine(); void setPoints(int x1, int y1, int x2, int y2); - QPoint startPoint() const - { return QPoint(x1,y1); } - QPoint endPoint() const - { return QPoint(x2,y2); } + TQPoint startPoint() const + { return TQPoint(x1,y1); } + TQPoint endPoint() const + { return TQPoint(x2,y2); } int rtti() const; static int RTTI; - void setPen(QPen p); + void setPen(TQPen p); protected: - void drawShape(QPainter &); - QPointArray areaPoints() const; + void drawShape(TQPainter &); + TQPointArray areaPoints() const; private: int x1,y1,x2,y2; }; -class QM_EXPORT_CANVAS QCanvasEllipse : public QCanvasPolygonalItem +class QM_EXPORT_CANVAS TQCanvasEllipse : public QCanvasPolygonalItem { public: - QCanvasEllipse( QCanvas* canvas ); - QCanvasEllipse( int width, int height, QCanvas* canvas ); - QCanvasEllipse( int width, int height, int startangle, int angle, - QCanvas* canvas ); + TQCanvasEllipse( TQCanvas* canvas ); + TQCanvasEllipse( int width, int height, TQCanvas* canvas ); + TQCanvasEllipse( int width, int height, int startangle, int angle, + TQCanvas* canvas ); - ~QCanvasEllipse(); + ~TQCanvasEllipse(); int width() const; int height() const; @@ -720,22 +720,22 @@ public: { return a1; } int angleLength() const { return a2; } - QPointArray areaPoints() const; + TQPointArray areaPoints() const; - bool collidesWith( const QCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; int rtti() const; static int RTTI; protected: - void drawShape(QPainter &); + void drawShape(TQPainter &); private: - bool collidesWith( const QCanvasSprite*, - const QCanvasPolygonalItem*, - const QCanvasRectangle*, - const QCanvasEllipse*, - const QCanvasText* ) const; + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; int w, h; int a1, a2; }; @@ -743,21 +743,21 @@ private: class QCanvasTextExtra; -class QM_EXPORT_CANVAS QCanvasText : public QCanvasItem +class QM_EXPORT_CANVAS TQCanvasText : public QCanvasItem { public: - QCanvasText(QCanvas* canvas); - QCanvasText(const QString&, QCanvas* canvas); - QCanvasText(const QString&, QFont, QCanvas* canvas); + TQCanvasText(TQCanvas* canvas); + TQCanvasText(const TQString&, TQCanvas* canvas); + TQCanvasText(const TQString&, TQFont, TQCanvas* canvas); - virtual ~QCanvasText(); + virtual ~TQCanvasText(); - void setText( const QString& ); - void setFont( const QFont& ); - void setColor( const QColor& ); - QString text() const; - QFont font() const; - QColor color() const; + void setText( const TQString& ); + void setFont( const TQFont& ); + void setColor( const TQColor& ); + TQString text() const; + TQFont font() const; + TQColor color() const; void moveBy(double dx, double dy); @@ -765,42 +765,42 @@ public: { return flags; } void setTextFlags(int); - QRect boundingRect() const; + TQRect boundingRect() const; - bool collidesWith( const QCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; int rtti() const; static int RTTI; protected: - virtual void draw(QPainter&); + virtual void draw(TQPainter&); private: #if defined(Q_DISABLE_COPY) - QCanvasText( const QCanvasText & ); - QCanvasText &operator=( const QCanvasText & ); + TQCanvasText( const TQCanvasText & ); + TQCanvasText &operator=( const TQCanvasText & ); #endif void addToChunks(); void removeFromChunks(); void changeChunks(); void setRect(); - QRect brect; - QString txt; + TQRect brect; + TQString txt; int flags; - QFont fnt; - QColor col; - QCanvasTextExtra* extra; - - bool collidesWith( const QCanvasSprite*, - const QCanvasPolygonalItem*, - const QCanvasRectangle*, - const QCanvasEllipse*, - const QCanvasText* ) const; + TQFont fnt; + TQColor col; + TQCanvasTextExtra* extra; + + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; }; #define Q_DEFINED_QCANVAS -#include "qwinexport.h" +#include "tqwinexport.h" #endif // QT_NO_CANVAS #endif // QCANVAS_H |