From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- kugar/kudesigner_lib/view.h | 61 +++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'kugar/kudesigner_lib/view.h') diff --git a/kugar/kudesigner_lib/view.h b/kugar/kudesigner_lib/view.h index 8ca5a9d4..5b4ebe40 100644 --- a/kugar/kudesigner_lib/view.h +++ b/kugar/kudesigner_lib/view.h @@ -19,16 +19,16 @@ #ifndef VIEW_H #define VIEW_H -#include -#include -#include +#include +#include +#include #include class KuDesignerPlugin; -class QMouseEvent; -class QCanvasItemList; +class TQMouseEvent; +class TQCanvasItemList; namespace KoProperty { @@ -45,21 +45,22 @@ class Box; class Canvas; class Band; -class SelectionRect: public QCanvasRectangle +class SelectionRect: public TQCanvasRectangle { public: SelectionRect( int x, int y, int width, int height, Canvas *canvas ) : - QCanvasRectangle( x, y, width, height, ( QCanvas* ) canvas ) + TQCanvasRectangle( x, y, width, height, ( TQCanvas* ) canvas ) {} - virtual void draw( QPainter & painter ); + virtual void draw( TQPainter & painter ); }; -class View: public QCanvasView +class View: public TQCanvasView { Q_OBJECT + TQ_OBJECT public: - View( Canvas *canvas, QWidget *parent, const char *name = 0, WFlags f = 0 ); + View( Canvas *canvas, TQWidget *tqparent, const char *name = 0, WFlags f = 0 ); int itemToInsert; @@ -76,23 +77,23 @@ public: void setCanvas( Canvas *canvas ); protected: - void contentsMousePressEvent( QMouseEvent* ); - void contentsMouseReleaseEvent( QMouseEvent* ); - void contentsMouseMoveEvent( QMouseEvent* ); - void contentsMouseDoubleClickEvent( QMouseEvent * ); - - void contentsDragEnterEvent ( QDragEnterEvent * ); - void contentsDragMoveEvent ( QDragMoveEvent * ); - // void contentsDragLeaveEvent ( QDragLeaveEvent * ); - // void contentsDropEvent ( QDropEvent * ); - void keyPressEvent( QKeyEvent * ); - - void startMoveOrResizeOrSelectItem( QCanvasItemList &l, QMouseEvent *e, QPoint &p ); - bool startResizing( QMouseEvent *e, QPoint &p ); - void placeItem( QCanvasItemList &l, QMouseEvent *e ); - void editItem( QCanvasItemList &l ); - void deleteItem( QCanvasItemList &l ); - void selectItemFromList( QCanvasItemList &l ); + void contentsMousePressEvent( TQMouseEvent* ); + void contentsMouseReleaseEvent( TQMouseEvent* ); + void contentsMouseMoveEvent( TQMouseEvent* ); + void contentsMouseDoubleClickEvent( TQMouseEvent * ); + + void contentsDragEnterEvent ( TQDragEnterEvent * ); + void contentsDragMoveEvent ( TQDragMoveEvent * ); + // void contentsDragLeaveEvent ( TQDragLeaveEvent * ); + // void contentsDropEvent ( TQDropEvent * ); + void keyPressEvent( TQKeyEvent * ); + + void startMoveOrResizeOrSelectItem( TQCanvasItemList &l, TQMouseEvent *e, TQPoint &p ); + bool startResizing( TQMouseEvent *e, TQPoint &p ); + void placeItem( TQCanvasItemList &l, TQMouseEvent *e ); + void editItem( TQCanvasItemList &l ); + void deleteItem( TQCanvasItemList &l ); + void selectItemFromList( TQCanvasItemList &l ); void stickToGrid( double &x, double &y ); void stickDimToGrid( double x, double y, double &X, double &Y ); @@ -101,11 +102,11 @@ private: Buffer *selectionBuf; ReportItem *moving; - QPoint moving_start; + TQPoint moving_start; double moving_offsetY; double moving_offsetX; - QRect resizing_constraint; - QSize resizing_minSize; + TQRect resizing_constraint; + TQSize resizing_minSize; int resizing_type; class Box *resizing; bool selectionStarted; -- cgit v1.2.1