diff options
Diffstat (limited to 'kjsembed/tools/headers/qcanvas.h')
-rw-r--r-- | kjsembed/tools/headers/qcanvas.h | 544 |
1 files changed, 272 insertions, 272 deletions
diff --git a/kjsembed/tools/headers/qcanvas.h b/kjsembed/tools/headers/qcanvas.h index b89fd795..bdf46d83 100644 --- a/kjsembed/tools/headers/qcanvas.h +++ b/kjsembed/tools/headers/qcanvas.h @@ -1,7 +1,7 @@ /********************************************************************** ** ** -** Definition of TTQCanvas classes +** Definition of TQCanvas classes ** ** Created : 991211 ** @@ -59,34 +59,34 @@ #ifndef QT_NO_CANVAS -class TTQCanvasSprite; -class TTQCanvasPolygonalItem; -class TTQCanvasRectangle; -class TTQCanvasPolygon; -class TTQCanvasEllipse; -class TTQCanvasText; -class TTQCanvasLine; -class TTQCanvasChunk; -class TTQCanvas; -class TTQCanvasItem; -class TTQCanvasView; -class TTQCanvasPixmap; +class TQCanvasSprite; +class TQCanvasPolygonalItem; +class TQCanvasRectangle; +class TQCanvasPolygon; +class TQCanvasEllipse; +class TQCanvasText; +class TQCanvasLine; +class TQCanvasChunk; +class TQCanvas; +class TQCanvasItem; +class TQCanvasView; +class TQCanvasPixmap; -class TQM_EXPORT_CANVAS TTQCanvasItemList : public TTQValueList<TTQCanvasItem*> { +class TQM_EXPORT_CANVAS TQCanvasItemList : public TQValueList<TQCanvasItem*> { public: void sort(); - void drawUnique( TTQPainter& painter ); + void drawUnique( TQPainter& painter ); }; -class TTQCanvasItemExtra; +class TQCanvasItemExtra; -class TQM_EXPORT_CANVAS TTQCanvasItem : public Qt +class TQM_EXPORT_CANVAS TQCanvasItem : public Qt { public: - TTQCanvasItem(TTQCanvas* canvas); - virtual ~TTQCanvasItem(); + 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 TTQCanvasItem* ) const=0; + virtual bool collidesWith( const TQCanvasItem* ) const=0; - TTQCanvasItemList collisions(bool exact /* NO DEFAULT */ ) const; + TQCanvasItemList collisions(bool exact /* NO DEFAULT */ ) const; - virtual void setCanvas(TTQCanvas*); + virtual void setCanvas(TQCanvas*); - virtual void draw(TTQPainter&)=0; + virtual void draw(TQPainter&)=0; void show(); void hide(); @@ -159,10 +159,10 @@ public: virtual int rtti() const; static int RTTI; - virtual TTQRect boundingRect() const=0; - virtual TTQRect boundingRectAdvanced() const; + virtual TQRect boundingRect() const=0; + virtual TQRect boundingRectAdvanced() const; - TTQCanvas* canvas() const + TQCanvas* canvas() const { return cnv; } protected: @@ -171,30 +171,30 @@ protected: private: // For friendly subclasses... - friend class TTQCanvasPolygonalItem; - friend class TTQCanvasSprite; - friend class TTQCanvasRectangle; - friend class TTQCanvasPolygon; - friend class TTQCanvasEllipse; - friend class TTQCanvasText; - friend class TTQCanvasLine; + friend class TQCanvasPolygonalItem; + friend class TQCanvasSprite; + friend class TQCanvasRectangle; + friend class TQCanvasPolygon; + friend class TQCanvasEllipse; + friend class TQCanvasText; + friend class TQCanvasLine; - virtual TTQPointArray chunks() const; + virtual TQPointArray chunks() const; virtual void addToChunks(); virtual void removeFromChunks(); virtual void changeChunks(); - virtual bool collidesWith( const TTQCanvasSprite*, - const TTQCanvasPolygonalItem*, - const TTQCanvasRectangle*, - const TTQCanvasEllipse*, - const TTQCanvasText* ) const = 0; + virtual bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const = 0; // End of friend stuff - TTQCanvas* cnv; - static TTQCanvas* current_canvas; + TQCanvas* cnv; + static TQCanvas* current_canvas; double myx,myy,myz; - TTQCanvasItemExtra *ext; - TTQCanvasItemExtra& extra(); + TQCanvasItemExtra *ext; + TQCanvasItemExtra& extra(); uint ani:1; uint vis:1; uint val:1; @@ -204,25 +204,25 @@ private: }; -class TTQCanvasData; +class TQCanvasData; -class TQM_EXPORT_CANVAS TTQCanvas : public TQObject +class TQM_EXPORT_CANVAS TQCanvas : public TQObject { Q_OBJECT public: - TTQCanvas( TTQObject* parent = 0, const char* name = 0 ); - TTQCanvas(int w, int h); - TTQCanvas( TTQPixmap 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 ~TTQCanvas(); + virtual ~TQCanvas(); - virtual void setTiles( TTQPixmap tiles, int h, int v, + virtual void setTiles( TQPixmap tiles, int h, int v, int tilewidth, int tileheight ); - virtual void setBackgroundPixmap( const TTQPixmap& p ); - TTQPixmap backgroundPixmap() const; + virtual void setBackgroundPixmap( const TQPixmap& p ); + TQPixmap backgroundPixmap() const; - virtual void setBackgroundColor( const TTQColor& c ); - TTQColor 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; } - TTQSize size() const - { return TTQSize(awidth,aheight); } - TTQRect rect() const - { return TTQRect( 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 TTQPoint& 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 TTQPoint& 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 TTQRect& area); - virtual void setUnchanged(const TTQRect& area); + virtual void setChanged(const TQRect& area); + virtual void setUnchanged(const TQRect& area); // These call setChangedChunk. - void addItemToChunk(TTQCanvasItem*, int i, int j); - void removeItemFromChunk(TTQCanvasItem*, int i, int j); - void addItemToChunkContaining(TTQCanvasItem*, int x, int y); - void removeItemFromChunkContaining(TTQCanvasItem*, int x, int y); - - TTQCanvasItemList allItems(); - TTQCanvasItemList collisions( const TTQPoint&) const; - TTQCanvasItemList collisions( const TTQRect&) const; - TTQCanvasItemList collisions( const TTQPointArray& pa, const TTQCanvasItem* 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 TTQRect&, TTQPainter* p, bool double_buffer=FALSE); + void drawArea(const TQRect&, TQPainter* p, bool double_buffer=FALSE); - // These are for TTQCanvasView to call - virtual void addView(TTQCanvasView*); - virtual void removeView(TTQCanvasView*); - void drawCanvasArea(const TTQRect&, TTQPainter* p=0, bool double_buffer=TRUE); - void drawViewArea( TTQCanvasView* view, TTQPainter* p, const TTQRect& 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 TTQCanvasItem to call - virtual void addItem(TTQCanvasItem*); - virtual void addAnimation(TTQCanvasItem*); - virtual void removeItem(TTQCanvasItem*); - virtual void removeAnimation(TTQCanvasItem*); + // 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(TTQPainter&, const TTQRect& area); - virtual void drawForeground(TTQPainter&, const TTQRect& 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); - TTQCanvasChunk& chunk(int i, int j) const; - TTQCanvasChunk& chunkContaining(int x, int y) const; + TQCanvasChunk& chunk(int i, int j) const; + TQCanvasChunk& chunkContaining(int x, int y) const; - TTQRect changeBounds(const TTQRect& inarea); - void drawChanges(const TTQRect& inarea); + TQRect changeBounds(const TQRect& inarea); + void drawChanges(const TQRect& inarea); void ensureOffScrSize( int osw, int osh ); - TTQPixmap offscr; + TQPixmap offscr; int awidth,aheight; int chunksize; int maxclusters; int chwidth,chheight; - TTQCanvasChunk* chunks; + TQCanvasChunk* chunks; - TTQCanvasData* d; + TQCanvasData* d; - void initTiles(TTQPixmap 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; - TTQPixmap pm; - TTQTimer* update_timer; - TTQColor bgcolor; + TQPixmap pm; + TQTimer* update_timer; + TQColor bgcolor; bool debug_redraw_areas; bool dblbuf; - friend void qt_unview(TTQCanvas* c); + friend void qt_unview(TQCanvas* c); #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= - TTQCanvas( const TTQCanvas & ); - TTQCanvas &operator=( const TTQCanvas & ); + TQCanvas( const TQCanvas & ); + TQCanvas &operator=( const TQCanvas & ); #endif }; -class TTQCanvasViewData; +class TQCanvasViewData; -class TQM_EXPORT_CANVAS TTQCanvasView : public TQScrollView +class TQM_EXPORT_CANVAS TQCanvasView : public TQScrollView { Q_OBJECT public: - TTQCanvasView(TTQWidget* parent=0, const char* name=0, WFlags f=0); - TTQCanvasView(TTQCanvas* viewing, TTQWidget* parent=0, const char* name=0, WFlags f=0); - ~TTQCanvasView(); + 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(); - TTQCanvas* canvas() const + TQCanvas* canvas() const { return viewing; } - void setCanvas(TTQCanvas* v); + void setCanvas(TQCanvas* v); - const TTQWMatrix &worldMatrix() const; - const TTQWMatrix &inverseWorldMatrix() const; - bool setWorldMatrix( const TTQWMatrix & ); + const TQWMatrix &worldMatrix() const; + const TQWMatrix &inverseWorldMatrix() const; + bool setWorldMatrix( const TQWMatrix & ); protected: - void drawContents( TTQPainter*, int cx, int cy, int cw, int ch ); - TTQSize sizeHint() const; + void drawContents( TQPainter*, int cx, int cy, int cw, int ch ); + TQSize sizeHint() const; private: - void drawContents( TTQPainter* ); - TTQCanvas* viewing; - TTQCanvasViewData* d; - friend void qt_unview(TTQCanvas* 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= - TTQCanvasView( const TTQCanvasView & ); - TTQCanvasView &operator=( const TTQCanvasView & ); + TQCanvasView( const TQCanvasView & ); + TQCanvasView &operator=( const TQCanvasView & ); #endif }; -class TQM_EXPORT_CANVAS TTQCanvasPixmap : public TQPixmap +class TQM_EXPORT_CANVAS TQCanvasPixmap : public TQPixmap { public: #ifndef QT_NO_IMAGEIO - TTQCanvasPixmap(const TTQString& datafilename); + TQCanvasPixmap(const TQString& datafilename); #endif - TTQCanvasPixmap(const TTQImage& image); - TTQCanvasPixmap(const TTQPixmap&, const TTQPoint& hotspot); - ~TTQCanvasPixmap(); + 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) - TTQCanvasPixmap( const TTQCanvasPixmap & ); - TTQCanvasPixmap &operator=( const TTQCanvasPixmap & ); + TQCanvasPixmap( const TQCanvasPixmap & ); + TQCanvasPixmap &operator=( const TQCanvasPixmap & ); #endif - void init(const TTQImage&); - void init(const TTQPixmap& pixmap, int hx, int hy); + void init(const TQImage&); + void init(const TQPixmap& pixmap, int hx, int hy); - friend class TTQCanvasSprite; - friend class TTQCanvasPixmapArray; - friend bool qt_testCollision(const TTQCanvasSprite* s1, const TTQCanvasSprite* s2); + friend class TQCanvasSprite; + friend class TQCanvasPixmapArray; + friend bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2); int hotx,hoty; - TTQImage* collision_mask; + TQImage* collision_mask; }; class TQM_EXPORT_CANVAS TQCanvasPixmapArray { public: - TTQCanvasPixmapArray(); + TQCanvasPixmapArray(); #ifndef QT_NO_IMAGEIO - TTQCanvasPixmapArray(const TTQString& datafilenamepattern, int framecount=0); + TQCanvasPixmapArray(const TQString& datafilenamepattern, int framecount=0); #endif // this form is deprecated - TTQCanvasPixmapArray(TTQPtrList<TTQPixmap>, TTQPtrList<TTQPoint> hotspots); + TQCanvasPixmapArray(TQPtrList<TQPixmap>, TQPtrList<TQPoint> hotspots); - TTQCanvasPixmapArray(TTQValueList<TTQPixmap>, TTQPointArray hotspots = TTQPointArray() ); - ~TTQCanvasPixmapArray(); + TQCanvasPixmapArray(TQValueList<TQPixmap>, TQPointArray hotspots = TQPointArray() ); + ~TQCanvasPixmapArray(); #ifndef QT_NO_IMAGEIO - bool readPixmaps(const TTQString& datafilenamepattern, int framecount=0); - bool readCollisionMasks(const TTQString& filenamepattern); + bool readPixmaps(const TQString& datafilenamepattern, int framecount=0); + bool readCollisionMasks(const TQString& filenamepattern); #endif // deprecated bool operator!(); // Failure check. bool isValid() const; - TTQCanvasPixmap* image(int i) const + TQCanvasPixmap* image(int i) const { return img ? img[i] : 0; } - void setImage(int i, TTQCanvasPixmap* p); + void setImage(int i, TQCanvasPixmap* p); uint count() const { return (uint)framecount; } private: #if defined(Q_DISABLE_COPY) - TTQCanvasPixmapArray( const TTQCanvasPixmapArray & ); - TTQCanvasPixmapArray &operator=( const TTQCanvasPixmapArray & ); + TQCanvasPixmapArray( const TQCanvasPixmapArray & ); + TQCanvasPixmapArray &operator=( const TQCanvasPixmapArray & ); #endif #ifndef QT_NO_IMAGEIO - bool readPixmaps(const TTQString& datafilenamepattern, int framecount, bool maskonly); + bool readPixmaps(const TQString& datafilenamepattern, int framecount, bool maskonly); #endif void reset(); int framecount; - TTQCanvasPixmap** img; + TQCanvasPixmap** img; }; -class TQM_EXPORT_CANVAS TTQCanvasSprite : public TQCanvasItem +class TQM_EXPORT_CANVAS TQCanvasSprite : public TQCanvasItem { public: - TTQCanvasSprite(TTQCanvasPixmapArray* array, TTQCanvas* canvas); + TQCanvasSprite(TQCanvasPixmapArray* array, TQCanvas* canvas); - void setSequence(TTQCanvasPixmapArray* seq); + void setSequence(TQCanvasPixmapArray* seq); - virtual ~TTQCanvasSprite(); + 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 TTQCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; - TTQRect 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; - TTQCanvasPixmap* image() const + TQCanvasPixmap* image() const { return images->image(frm); } - virtual TTQCanvasPixmap* imageAdvanced() const; - TTQCanvasPixmap* 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(TTQPainter& painter); + void draw(TQPainter& painter); private: #if defined(Q_DISABLE_COPY) - TTQCanvasSprite( const TTQCanvasSprite & ); - TTQCanvasSprite &operator=( const TTQCanvasSprite & ); + 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 TTQCanvasSprite*, - const TTQCanvasPolygonalItem*, - const TTQCanvasRectangle*, - const TTQCanvasEllipse*, - const TTQCanvasText* ) const; + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; - friend bool qt_testCollision( const TTQCanvasSprite* s1, - const TTQCanvasSprite* s2 ); + friend bool qt_testCollision( const TQCanvasSprite* s1, + const TQCanvasSprite* s2 ); - TTQCanvasPixmapArray* images; + TQCanvasPixmapArray* images; }; -class TTQPolygonalProcessor; +class TQPolygonalProcessor; -class TQM_EXPORT_CANVAS TTQCanvasPolygonalItem : public TQCanvasItem +class TQM_EXPORT_CANVAS TQCanvasPolygonalItem : public TQCanvasItem { public: - TTQCanvasPolygonalItem(TTQCanvas* canvas); - virtual ~TTQCanvasPolygonalItem(); + TQCanvasPolygonalItem(TQCanvas* canvas); + virtual ~TQCanvasPolygonalItem(); - bool collidesWith( const TTQCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; - virtual void setPen(TTQPen p); - virtual void setBrush(TTQBrush b); + virtual void setPen(TQPen p); + virtual void setBrush(TQBrush b); - TTQPen pen() const + TQPen pen() const { return pn; } - TTQBrush brush() const + TQBrush brush() const { return br; } - virtual TTQPointArray areaPoints() const=0; - virtual TTQPointArray areaPointsAdvanced() const; - TTQRect boundingRect() const; + virtual TQPointArray areaPoints() const=0; + virtual TQPointArray areaPointsAdvanced() const; + TQRect boundingRect() const; int rtti() const; static int RTTI; protected: - void draw(TTQPainter &); - virtual void drawShape(TTQPainter &) = 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 TTQPointArray& pa, int winding, - TTQPolygonalProcessor& process ) const; - TTQPointArray chunks() const; - - bool collidesWith( const TTQCanvasSprite*, - const TTQCanvasPolygonalItem*, - const TTQCanvasRectangle*, - const TTQCanvasEllipse*, - const TTQCanvasText* ) const; - - TTQBrush br; - TTQPen 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 TQM_EXPORT_CANVAS TTQCanvasRectangle : public TQCanvasPolygonalItem +class TQM_EXPORT_CANVAS TQCanvasRectangle : public TQCanvasPolygonalItem { public: - TTQCanvasRectangle(TTQCanvas* canvas); - TTQCanvasRectangle(const TTQRect&, TTQCanvas* canvas); - TTQCanvasRectangle(int x, int y, int width, int height, TTQCanvas* canvas); + TQCanvasRectangle(TQCanvas* canvas); + TQCanvasRectangle(const TQRect&, TQCanvas* canvas); + TQCanvasRectangle(int x, int y, int width, int height, TQCanvas* canvas); - ~TTQCanvasRectangle(); + ~TQCanvasRectangle(); int width() const; int height() const; void setSize(int w, int h); - TTQSize size() const - { return TTQSize(w,h); } - TTQPointArray areaPoints() const; - TTQRect rect() const - { return TTQRect(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 TTQCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; int rtti() const; static int RTTI; protected: - void drawShape(TTQPainter &); - TTQPointArray chunks() const; + void drawShape(TQPainter &); + TQPointArray chunks() const; private: - bool collidesWith( const TTQCanvasSprite*, - const TTQCanvasPolygonalItem*, - const TTQCanvasRectangle*, - const TTQCanvasEllipse*, - const TTQCanvasText* ) const; + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; int w, h; }; -class TQM_EXPORT_CANVAS TTQCanvasPolygon : public TQCanvasPolygonalItem +class TQM_EXPORT_CANVAS TQCanvasPolygon : public TQCanvasPolygonalItem { public: - TTQCanvasPolygon(TTQCanvas* canvas); - ~TTQCanvasPolygon(); - void setPoints(TTQPointArray); - TTQPointArray points() const; + TQCanvasPolygon(TQCanvas* canvas); + ~TQCanvasPolygon(); + void setPoints(TQPointArray); + TQPointArray points() const; void moveBy(double dx, double dy); - TTQPointArray areaPoints() const; + TQPointArray areaPoints() const; int rtti() const; static int RTTI; protected: - void drawShape(TTQPainter &); - TTQPointArray poly; + void drawShape(TQPainter &); + TQPointArray poly; }; -class TQM_EXPORT_CANVAS TTQCanvasSpline : public TQCanvasPolygon +class TQM_EXPORT_CANVAS TQCanvasSpline : public TQCanvasPolygon { public: - TTQCanvasSpline(TTQCanvas* canvas); - ~TTQCanvasSpline(); + TQCanvasSpline(TQCanvas* canvas); + ~TQCanvasSpline(); - void setControlPoints(TTQPointArray, bool closed=TRUE); - TTQPointArray 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(); - TTQPointArray bez; + TQPointArray bez; bool cl; }; -class TQM_EXPORT_CANVAS TTQCanvasLine : public TQCanvasPolygonalItem +class TQM_EXPORT_CANVAS TQCanvasLine : public TQCanvasPolygonalItem { public: - TTQCanvasLine(TTQCanvas* canvas); - ~TTQCanvasLine(); + TQCanvasLine(TQCanvas* canvas); + ~TQCanvasLine(); void setPoints(int x1, int y1, int x2, int y2); - TTQPoint startPoint() const - { return TTQPoint(x1,y1); } - TTQPoint endPoint() const - { return TTQPoint(x2,y2); } + TQPoint startPoint() const + { return TQPoint(x1,y1); } + TQPoint endPoint() const + { return TQPoint(x2,y2); } int rtti() const; static int RTTI; - void setPen(TTQPen p); + void setPen(TQPen p); protected: - void drawShape(TTQPainter &); - TTQPointArray areaPoints() const; + void drawShape(TQPainter &); + TQPointArray areaPoints() const; private: int x1,y1,x2,y2; }; -class TQM_EXPORT_CANVAS TTQCanvasEllipse : public TQCanvasPolygonalItem +class TQM_EXPORT_CANVAS TQCanvasEllipse : public TQCanvasPolygonalItem { public: - TTQCanvasEllipse( TTQCanvas* canvas ); - TTQCanvasEllipse( int width, int height, TTQCanvas* canvas ); - TTQCanvasEllipse( int width, int height, int startangle, int angle, - TTQCanvas* canvas ); + TQCanvasEllipse( TQCanvas* canvas ); + TQCanvasEllipse( int width, int height, TQCanvas* canvas ); + TQCanvasEllipse( int width, int height, int startangle, int angle, + TQCanvas* canvas ); - ~TTQCanvasEllipse(); + ~TQCanvasEllipse(); int width() const; int height() const; @@ -720,44 +720,44 @@ public: { return a1; } int angleLength() const { return a2; } - TTQPointArray areaPoints() const; + TQPointArray areaPoints() const; - bool collidesWith( const TTQCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; int rtti() const; static int RTTI; protected: - void drawShape(TTQPainter &); + void drawShape(TQPainter &); private: - bool collidesWith( const TTQCanvasSprite*, - const TTQCanvasPolygonalItem*, - const TTQCanvasRectangle*, - const TTQCanvasEllipse*, - const TTQCanvasText* ) const; + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; int w, h; int a1, a2; }; -class TTQCanvasTextExtra; +class TQCanvasTextExtra; -class TQM_EXPORT_CANVAS TTQCanvasText : public TQCanvasItem +class TQM_EXPORT_CANVAS TQCanvasText : public TQCanvasItem { public: - TTQCanvasText(TTQCanvas* canvas); - TTQCanvasText(const TTQString&, TTQCanvas* canvas); - TTQCanvasText(const TTQString&, TTQFont, TTQCanvas* canvas); + TQCanvasText(TQCanvas* canvas); + TQCanvasText(const TQString&, TQCanvas* canvas); + TQCanvasText(const TQString&, TQFont, TQCanvas* canvas); - virtual ~TTQCanvasText(); + virtual ~TQCanvasText(); - void setText( const TTQString& ); - void setFont( const TTQFont& ); - void setColor( const TTQColor& ); - TTQString text() const; - TTQFont font() const; - TTQColor 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,38 +765,38 @@ public: { return flags; } void setTextFlags(int); - TTQRect boundingRect() const; + TQRect boundingRect() const; - bool collidesWith( const TTQCanvasItem* ) const; + bool collidesWith( const TQCanvasItem* ) const; int rtti() const; static int RTTI; protected: - virtual void draw(TTQPainter&); + virtual void draw(TQPainter&); private: #if defined(Q_DISABLE_COPY) - TTQCanvasText( const TTQCanvasText & ); - TTQCanvasText &operator=( const TTQCanvasText & ); + TQCanvasText( const TQCanvasText & ); + TQCanvasText &operator=( const TQCanvasText & ); #endif void addToChunks(); void removeFromChunks(); void changeChunks(); void setRect(); - TTQRect brect; - TTQString txt; + TQRect brect; + TQString txt; int flags; - TTQFont fnt; - TTQColor col; - TTQCanvasTextExtra* extra; - - bool collidesWith( const TTQCanvasSprite*, - const TTQCanvasPolygonalItem*, - const TTQCanvasRectangle*, - const TTQCanvasEllipse*, - const TTQCanvasText* ) const; + TQFont fnt; + TQColor col; + TQCanvasTextExtra* extra; + + bool collidesWith( const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; }; #define Q_DEFINED_QCANVAS |