summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qstandardgestures.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qstandardgestures.h')
-rw-r--r--src/gui/kernel/qstandardgestures.h48
1 files changed, 38 insertions, 10 deletions
diff --git a/src/gui/kernel/qstandardgestures.h b/src/gui/kernel/qstandardgestures.h
index 0eb9d92..029e6dc 100644
--- a/src/gui/kernel/qstandardgestures.h
+++ b/src/gui/kernel/qstandardgestures.h
@@ -59,16 +59,16 @@ class Q_GUI_EXPORT QPanGesture : public QGesture
Q_OBJECT
Q_DECLARE_PRIVATE(QPanGesture)
- Q_PROPERTY(QSize totalOffset READ totalOffset)
- Q_PROPERTY(QSize lastOffset READ lastOffset)
+ Q_PROPERTY(QSizeF totalOffset READ totalOffset)
+ Q_PROPERTY(QSizeF lastOffset READ lastOffset)
public:
QPanGesture(QWidget *gestureTarget, QObject *parent = 0);
bool filterEvent(QEvent *event);
- QSize totalOffset() const;
- QSize lastOffset() const;
+ QSizeF totalOffset() const;
+ QSizeF lastOffset() const;
protected:
void reset();
@@ -92,9 +92,9 @@ class Q_GUI_EXPORT QPinchGesture : public QGesture
Q_PROPERTY(qreal rotationAngle READ rotationAngle)
Q_PROPERTY(qreal lastRotationAngle READ lastRotationAngle)
- Q_PROPERTY(QPoint startCenterPoint READ startCenterPoint)
- Q_PROPERTY(QPoint lastCenterPoint READ lastCenterPoint)
- Q_PROPERTY(QPoint centerPoint READ centerPoint)
+ Q_PROPERTY(QPointF startCenterPoint READ startCenterPoint)
+ Q_PROPERTY(QPointF lastCenterPoint READ lastCenterPoint)
+ Q_PROPERTY(QPointF centerPoint READ centerPoint)
public:
QPinchGesture(QWidget *gestureTarget, QObject *parent = 0);
@@ -102,9 +102,9 @@ public:
bool filterEvent(QEvent *event);
void reset();
- QPoint startCenterPoint() const;
- QPoint lastCenterPoint() const;
- QPoint centerPoint() const;
+ QPointF startCenterPoint() const;
+ QPointF lastCenterPoint() const;
+ QPointF centerPoint() const;
qreal scaleFactor() const;
qreal lastScaleFactor() const;
@@ -119,6 +119,34 @@ private:
friend class QWidget;
};
+class QSwipeGesturePrivate;
+class Q_GUI_EXPORT QSwipeGesture : public QGesture
+{
+ Q_OBJECT
+ Q_ENUMS(SwipeDirection)
+
+ Q_PROPERTY(SwipeDirection horizontalDirection READ horizontalDirection)
+ Q_PROPERTY(SwipeDirection verticalDirection READ verticalDirection)
+ Q_PROPERTY(qreal swipeAngle READ swipeAngle)
+
+ Q_DECLARE_PRIVATE(QSwipeGesture)
+
+public:
+ enum SwipeDirection { NoDirection, Left, Right, Up, Down };
+ QSwipeGesture(QWidget *gestureTarget, QObject *parent = 0);
+
+ bool filterEvent(QEvent *event);
+ void reset();
+
+ SwipeDirection horizontalDirection() const;
+ SwipeDirection verticalDirection() const;
+ qreal swipeAngle() const;
+
+private:
+ bool eventFilter(QObject *receiver, QEvent *event);
+
+ friend class QWidget;
+};
QT_END_NAMESPACE
QT_END_HEADER