diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-03-16 13:56:24 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-11 14:51:34 (GMT) |
commit | d392c3073c10d053ffcd5d64d4f9d89a971fcb2d (patch) | |
tree | b0bc9f3b46a3b76051d45b72e984c177f17bb66d /src/gui/kernel/qgesture.h | |
parent | d8e4d20f3d225a3c29168d7a9440f2efc129ea8e (diff) | |
download | Qt-d392c3073c10d053ffcd5d64d4f9d89a971fcb2d.zip Qt-d392c3073c10d053ffcd5d64d4f9d89a971fcb2d.tar.gz Qt-d392c3073c10d053ffcd5d64d4f9d89a971fcb2d.tar.bz2 |
Extended the gesture documentation.
Also made some small fixes that noticed while was writing a doc.
Diffstat (limited to 'src/gui/kernel/qgesture.h')
-rw-r--r-- | src/gui/kernel/qgesture.h | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h index 8bd312b..b2999d7 100644 --- a/src/gui/kernel/qgesture.h +++ b/src/gui/kernel/qgesture.h @@ -48,6 +48,7 @@ #include "qpoint.h" #include "qrect.h" #include "qsharedpointer.h" +#include "qmetatype.h" QT_BEGIN_HEADER @@ -93,7 +94,7 @@ public: protected: QGesture(QGesturePrivate &dd, QObject *parent, const QString &type, Qt::GestureState state); - //### virtual void translateCoordinates(const QPoint &offset); + virtual void translate(const QPoint &offset); private: QString gestureType_; @@ -107,36 +108,18 @@ class Q_GUI_EXPORT QPannableGesture : public QGesture Q_DECLARE_PRIVATE(QPannableGesture) public: - enum DirectionType - { - None = 0, - LeftDown = 1, - DownLeft = LeftDown, - Down = 2, - RightDown = 3, - DownRight = RightDown, - Left = 4, - Right = 6, - LeftUp = 7, - UpLeft = LeftUp, - Up = 8, - RightUp = 9, - UpRight = RightUp - }; - -public: QPannableGesture(QObject *parent, const QPoint &startPos, const QPoint &lastPos, const QPoint &pos, const QRect &rect, const QPoint &hotSpot, const QDateTime &startTime, uint duration, Qt::GestureState state); ~QPannableGesture(); - DirectionType lastDirection() const; - DirectionType direction() const; - - friend class QGestureRecognizerPan; + Qt::DirectionType lastDirection() const; + Qt::DirectionType direction() const; }; +Q_DECLARE_METATYPE(Qt::DirectionType) + QT_END_NAMESPACE QT_END_HEADER |