aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquicktaphandler_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-02-08 15:58:24 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-03-02 15:38:55 +0000
commit6b310e5f9a53c366fbb8fb78bd7c343aad4e0cdd (patch)
tree563d5bb1e5524826593ddcd960d907bdfd6a60dd /src/quick/handlers/qquicktaphandler_p.h
parent849324dbdb64edcc7e3c8e83f0a1c6c1afbebe9c (diff)
TapHandler: add singleTapped and doubleTapped signals
This is for convenience. It's nicer not to need to test tapCount in JavaScript if you know you want to react on double-click: onTapped: if (tapCount === 2) doSomething() becomes onDoubleTapped: doSomething() Neither of these are guaranteed to be exclusive though: singleTapped occurs first, then doubleTapped if you tap again quickly, then tapCount keeps increasing as long as you keep tapping. Change-Id: I6fff10880831d5be0848b9957141311db8c2c0f0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquicktaphandler_p.h')
-rw-r--r--src/quick/handlers/qquicktaphandler_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/handlers/qquicktaphandler_p.h b/src/quick/handlers/qquicktaphandler_p.h
index e92d2029ba..b7c1895926 100644
--- a/src/quick/handlers/qquicktaphandler_p.h
+++ b/src/quick/handlers/qquicktaphandler_p.h
@@ -96,6 +96,8 @@ Q_SIGNALS:
void longPressThresholdChanged();
void gesturePolicyChanged();
void tapped();
+ void singleTapped();
+ void doubleTapped();
void longPressed();
protected: