summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qstandardgestures_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qstandardgestures_p.h')
-rw-r--r--src/gui/kernel/qstandardgestures_p.h77
1 files changed, 7 insertions, 70 deletions
diff --git a/src/gui/kernel/qstandardgestures_p.h b/src/gui/kernel/qstandardgestures_p.h
index 79aadfd..fec5c2f 100644
--- a/src/gui/kernel/qstandardgestures_p.h
+++ b/src/gui/kernel/qstandardgestures_p.h
@@ -53,83 +53,20 @@
// We mean it.
//
-#include "qevent.h"
-#include "qbasictimer.h"
-#include "qdebug.h"
-
-#include "qgesture.h"
-#include "qgesture_p.h"
-
-#include "qstandardgestures.h"
-#include "qbasictimer.h"
+#include "qgesturerecognizer.h"
+#include "private/qgesture_p.h"
QT_BEGIN_NAMESPACE
-class QPanGesturePrivate : public QGesturePrivate
-{
- Q_DECLARE_PUBLIC(QPanGesture)
-
-public:
- void setupGestureTarget(QObject *o);
-
- QSizeF totalOffset;
- QSizeF lastOffset;
- QSizeF offset;
- QPointF lastPosition;
-
-#if defined(QT_MAC_USE_COCOA)
- QBasicTimer singleTouchPanTimer;
- QPointF prevMousePos;
-#endif
-};
-
-class QPinchGesturePrivate : public QGesturePrivate
+class QPanGestureRecognizer : public QGestureRecognizer
{
- Q_DECLARE_PUBLIC(QPinchGesture)
-
public:
- QPinchGesturePrivate()
- : changes(0), totalScaleFactor(0.), lastScaleFactor(0.), scaleFactor(0.),
- totalRotationAngle(0.), lastRotationAngle(0.), rotationAngle(0.)
-#ifdef Q_WS_WIN
- ,initialDistance(0), lastSequenceId(0)
-#endif
- {
- }
+ QPanGestureRecognizer();
- void setupGestureTarget(QObject *o);
-
- QPinchGesture::WhatChanged changes;
-
- qreal totalScaleFactor; // total scale factor, excluding the current sequence.
- qreal lastScaleFactor;
- qreal scaleFactor; // scale factor in the current sequence.
-
- qreal totalRotationAngle; // total rotation angle, excluding the current sequence.
- qreal lastRotationAngle;
- qreal rotationAngle; // rotation angle in the current sequence.
-
- QPointF startCenterPoint;
- QPointF lastCenterPoint;
- QPointF centerPoint;
-#ifdef Q_WS_WIN
- int initialDistance;
- ulong lastSequenceId;
-#endif
-};
-
-class QSwipeGesturePrivate : public QGesturePrivate
-{
- Q_DECLARE_PUBLIC(QSwipeGesture)
-
-public:
- QSwipeGesturePrivate()
- : swipeAngle(-1)
- {
- }
+ QGesture *createGesture(QObject *target);
- void setupGestureTarget(QObject *o);
- qreal swipeAngle;
+ QGestureRecognizer::Result filterEvent(QGesture *state, QObject *watched, QEvent *event);
+ void reset(QGesture *state);
};
QT_END_NAMESPACE