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 /kugar/kudesigner_lib/view.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 'kugar/kudesigner_lib/view.h')
-rw-r--r-- | kugar/kudesigner_lib/view.h | 61 |
1 files changed, 31 insertions, 30 deletions
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 <qcanvas.h> -#include <qpainter.h> -#include <qptrlist.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqptrlist.h> #include <koproperty/property.h> 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; |