diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
commit | 87a016680e3677da3993f333561e79eb0cead7d5 (patch) | |
tree | cbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/resizeoverlay.h | |
parent | 6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff) | |
download | ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip |
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/resizeoverlay.h')
-rw-r--r-- | src/resizeoverlay.h | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/src/resizeoverlay.h b/src/resizeoverlay.h index c71e6de..2684ede 100644 --- a/src/resizeoverlay.h +++ b/src/resizeoverlay.h @@ -13,25 +13,26 @@ // This file contains class definitions for different types of resizing and rotating -#include <qcanvas.h> -#include <qguardedptr.h> -#include <qmap.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqcanvas.h> +#include <tqguardedptr.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqvaluelist.h> class MechanicsItem; class ResizeHandle; class ResizeOverlay; -class QEvent; +class TQEvent; -typedef QMap< int, QGuardedPtr<ResizeHandle> > ResizeHandleMap; +typedef TQMap< int, TQGuardedPtr<ResizeHandle> > ResizeHandleMap; /** @author David Saxton */ -class ResizeHandle : public QObject, public QCanvasRectangle +class ResizeHandle : public TQObject, public TQCanvasRectangle { Q_OBJECT + TQ_OBJECT public: /** * Convenience enumeration for resize handle positioning. Note: this class @@ -85,9 +86,9 @@ public: void moveRH( double x, double y ); void setHover( bool hover ); - static const QPixmap& handlePixmap( DrawType drawType, bool hover ); + static const TQPixmap& handlePixmap( DrawType drawType, bool hover ); - virtual QPointArray areaPoints () const; + virtual TQPointArray areaPoints () const; public slots: void slotMoveByX( double dx ) { moveBy( dx, 0 ); } @@ -99,7 +100,7 @@ signals: void rhMovedByY( double dy ); protected: - virtual void drawShape( QPainter &p ); + virtual void drawShape( TQPainter &p ); DrawType m_drawType; bool b_hover; // If true, then paint resize handle for mouse hovering over int m_id; @@ -108,19 +109,20 @@ protected: ResizeOverlay *p_resizeOverlay; }; -typedef QValueList<ResizeHandle*> ResizeHandleList; +typedef TQValueList<ResizeHandle*> ResizeHandleList; /** @author David Saxton */ -class ResizeOverlay : public QObject +class ResizeOverlay : public TQObject { Q_OBJECT + TQ_OBJECT public: - ResizeOverlay( Item *parent ); + ResizeOverlay( Item *tqparent ); ~ResizeOverlay(); - Item *parentItem() const { return p_item; } + Item *tqparentItem() const { return p_item; } /** * Shows / hides the resize handles. They are hidden by default. @@ -189,8 +191,9 @@ protected: class MechanicsItemOverlay : public ResizeOverlay { Q_OBJECT + TQ_OBJECT public: - MechanicsItemOverlay( MechanicsItem *parent ); + MechanicsItemOverlay( MechanicsItem *tqparent ); ~MechanicsItemOverlay(); public slots: @@ -219,17 +222,18 @@ protected: class RectangularOverlay : public ResizeOverlay { Q_OBJECT + TQ_OBJECT public: RectangularOverlay( Item *item, int xsnap = 1, int ysnap = 1 ); void removeTopMiddle(); void removeBotMiddle(); /** * Get the size rectangle from the position of the handles. If the size - * is invalid (e.g. the parent Item does not consider it a valid size, + * is invalid (e.g. the tqparent Item does not consider it a valid size, * then *ok is set to false; otherwise to true. * @returns the sizerect, regardless of whether or not it is valid */ - QRect getSizeRect( bool *ok = 0l, bool *widthOk = 0l, bool *heightOk = 0l ) const; + TQRect getSizeRect( bool *ok = 0l, bool *widthOk = 0l, bool *heightOk = 0l ) const; virtual bool isValidXPos( ResizeHandle *rh ); virtual bool isValidYPos( ResizeHandle *rh ); @@ -257,10 +261,11 @@ protected: class LineOverlay : public ResizeOverlay { Q_OBJECT + TQ_OBJECT public: - LineOverlay( Item * parent ); - QPoint startPoint() const; - QPoint endPoint() const; + LineOverlay( Item * tqparent ); + TQPoint startPoint() const; + TQPoint endPoint() const; public slots: void slotUpdateResizeHandles(); |