summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qstandardgestures_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-10-30 14:43:51 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-11-17 14:38:15 +0100
commit2fb3941198f43b653cb53f53b59830c9b9856835 (patch)
treefe676d2ae1f339127fb339e9c6b267e8a5a7348c /src/widgets/kernel/qstandardgestures_p.h
parent954552ceac4a04bebc56d2f7f3464568ef671cb1 (diff)
QPanGestureRecognizer: Make the number of touch points a parameter.
Prepare for determining the suitable number of touch points from the device type. For now, 2 points are used as before, which can be overridden by setting the environment variable QT_PAN_TOUCHPOINTS. Add member variable to QPanGesturePrivate which is set on gesture creation and later used for comparison. Task-number: QTBUG-40461 Change-Id: I6d9e35ca752375bc6a54435482ca0925195b8142 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/kernel/qstandardgestures_p.h')
-rw-r--r--src/widgets/kernel/qstandardgestures_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/kernel/qstandardgestures_p.h b/src/widgets/kernel/qstandardgestures_p.h
index aeabd9cc7e..15ba31f26a 100644
--- a/src/widgets/kernel/qstandardgestures_p.h
+++ b/src/widgets/kernel/qstandardgestures_p.h
@@ -55,11 +55,14 @@ QT_BEGIN_NAMESPACE
class QPanGestureRecognizer : public QGestureRecognizer
{
public:
- QPanGestureRecognizer();
+ explicit QPanGestureRecognizer(int pointCount = 2) : m_pointCount(pointCount) {}
QGesture *create(QObject *target);
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event);
void reset(QGesture *state);
+
+private:
+ const int m_pointCount;
};
class QPinchGestureRecognizer : public QGestureRecognizer