Simple class for recognizing some basic gestures: tap, double tap, long-tap and tap-and-hold.
Widget should send own QTouchEvent to this object, when some tap gesture is recognized it emits one of its signals.
- Tap: touch shorter than holdInterval (1000 ms) followed with pause longer than tapInterval (200 ms)
- Long tap: touch longer than holdInterval (1000 ms)
- Double tap: tap followed by second one within tapInterval (200 ms)
- Tap, drag: tap followed by drag
- Tap, long tap: tap followed by long tap within tapInterval (200 ms)
Physical DPI of display should be setup before first use. TapRecognizer use some small move tolerance (~ 2.5 mm), it means that events are emitted even that touch point is moving within this tolerance. For double tap, when second tap is farther than this tolerance, double-tap event is not emitted.