summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/kivio_canvas.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kivio/kiviopart/kivio_canvas.h
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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 'kivio/kiviopart/kivio_canvas.h')
-rw-r--r--kivio/kiviopart/kivio_canvas.h105
1 files changed, 53 insertions, 52 deletions
diff --git a/kivio/kiviopart/kivio_canvas.h b/kivio/kiviopart/kivio_canvas.h
index 92fbd632..eb03a3ae 100644
--- a/kivio/kiviopart/kivio_canvas.h
+++ b/kivio/kiviopart/kivio_canvas.h
@@ -19,14 +19,14 @@
#ifndef __kivio_canvas_h__
#define __kivio_canvas_h__
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qlineedit.h>
-#include <qwidget.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqlineedit.h>
+#include <tqwidget.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <KoQueryTrader.h>
#include <KoPoint.h>
@@ -45,11 +45,11 @@ class KivioGuideLineData;
class KivioScreenPainter;
class KivioStencil;
-class QPainter;
-class QLabel;
-class QPixmap;
-class QScrollBar;
-class QTimer;
+class TQPainter;
+class TQLabel;
+class TQPixmap;
+class TQScrollBar;
+class TQTimer;
class KoSize;
class KoRect;
@@ -57,12 +57,13 @@ class KoRect;
#define YBORDER_WIDTH 50
#define XBORDER_HEIGHT 20
-class KIVIO_EXPORT KivioCanvas : public QWidget
+class KIVIO_EXPORT KivioCanvas : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
friend class KivioView;
public:
- KivioCanvas( QWidget*, KivioView*, KivioDoc*, QScrollBar*, QScrollBar* );
+ KivioCanvas( TQWidget*, KivioView*, KivioDoc*, TQScrollBar*, TQScrollBar* );
~KivioCanvas();
int xOffset() const { return m_iXOffset; }
@@ -70,23 +71,23 @@ class KIVIO_EXPORT KivioCanvas : public QWidget
const KivioPage* activePage() const;
KivioPage* activePage();
- KivioPage* findPage( const QString& _name );
+ KivioPage* findPage( const TQString& _name );
KivioView* view()const { return m_pView; }
KivioDoc* doc()const { return m_pDoc; }
- QSize actualSize() const;
+ TQSize actualSize() const;
- virtual bool event(QEvent*);
+ virtual bool event(TQEvent*);
enum RectType { Insert, Rubber };
- void startRectDraw( const QPoint &p, RectType t );
- void continueRectDraw( const QPoint &p, RectType t );
+ void startRectDraw( const TQPoint &p, RectType t );
+ void continueRectDraw( const TQPoint &p, RectType t );
void endRectDraw();
- QRect rect()const { return currRect; }
+ TQRect rect()const { return currRect; }
- void startSpawnerDragDraw( const QPoint &p );
- void continueSpawnerDragDraw( const QPoint &p );
+ void startSpawnerDragDraw( const TQPoint &p );
+ void continueSpawnerDragDraw( const TQPoint &p );
void endSpawnerDragDraw();
void drawSelectedStencilsXOR();
@@ -96,8 +97,8 @@ class KIVIO_EXPORT KivioCanvas : public QWidget
KoPoint snapToGuides(const KoPoint&, bool &, bool &);
KoPoint snapToGridAndGuides(const KoPoint&);
- KoPoint mapFromScreen(const QPoint&);
- QPoint mapToScreen(const KoPoint&);
+ KoPoint mapFromScreen(const TQPoint&);
+ TQPoint mapToScreen(const KoPoint&);
void beginUnclippedSpawnerPainter();
void endUnclippedSpawnerPainter();
@@ -123,8 +124,8 @@ class KIVIO_EXPORT KivioCanvas : public QWidget
public slots:
virtual void setUpdatesEnabled(bool);
- void zoomIn(const QPoint&);
- void zoomOut(const QPoint&);
+ void zoomIn(const TQPoint&);
+ void zoomOut(const TQPoint&);
void scrollDx(int dx);
void scrollDy(int dy);
@@ -139,30 +140,30 @@ class KIVIO_EXPORT KivioCanvas : public QWidget
void updateAutoGuideLines();
protected:
- virtual void mousePressEvent( QMouseEvent* );
- virtual void mouseReleaseEvent( QMouseEvent* );
- virtual void mouseMoveEvent( QMouseEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
+ virtual void mouseReleaseEvent( TQMouseEvent* );
+ virtual void mouseMoveEvent( TQMouseEvent* );
- virtual void enterEvent( QEvent* );
- virtual void leaveEvent( QEvent* );
+ virtual void enterEvent( TQEvent* );
+ virtual void leaveEvent( TQEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual void paintEvent( QPaintEvent* );
- virtual void wheelEvent( QWheelEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void wheelEvent( TQWheelEvent* );
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void dragMoveEvent( QDragMoveEvent * );
- virtual void dragLeaveEvent( QDragLeaveEvent * );
- virtual void dropEvent( QDropEvent * );
+ virtual void dragEnterEvent( TQDragEnterEvent * );
+ virtual void dragMoveEvent( TQDragMoveEvent * );
+ virtual void dragLeaveEvent( TQDragLeaveEvent * );
+ virtual void dropEvent( TQDropEvent * );
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
void beginUnclippedPainter();
void endUnclippedPainter();
void paintSelectedXOR();
- void continuePasteMoving(const QPoint &pos);
+ void continuePasteMoving(const TQPoint &pos);
void endPasteMoving();
protected slots:
@@ -172,35 +173,35 @@ class KIVIO_EXPORT KivioCanvas : public QWidget
KivioView* m_pView;
KivioDoc* m_pDoc;
- QScrollBar* m_pVertScrollBar;
- QScrollBar* m_pHorzScrollBar;
+ TQScrollBar* m_pVertScrollBar;
+ TQScrollBar* m_pHorzScrollBar;
int m_iXOffset;
int m_iYOffset;
- QPixmap* m_buffer;
+ TQPixmap* m_buffer;
int m_pScrollX;
int m_pScrollY;
- QPointArray gridLines;
+ TQPointArray gridLines;
bool oldRectValid;
- QRect currRect;
- QPoint rectAnchor;
- QPainter* unclippedPainter;
- QPoint sizePreviewPos;
+ TQRect currRect;
+ TQPoint rectAnchor;
+ TQPainter* unclippedPainter;
+ TQPoint sizePreviewPos;
KivioScreenPainter* unclippedSpawnerPainter;
KivioIntraStencilData m_dragStencilData;
KivioStencil* m_pDragStencil;
- QTimer* m_borderTimer;
+ TQTimer* m_borderTimer;
bool delegateThisEvent;
- QPoint lastPoint;
+ TQPoint lastPoint;
bool m_pasteMoving;
- QPtrList<KoRect> m_lstOldGeometry;
+ TQPtrList<KoRect> m_lstOldGeometry;
KoPoint m_origPoint;
KoGuides m_guides;