From 894f0e1143987f9280d5167089a03fdaa0c3e465 Mon Sep 17 00:00:00 2001 From: Thomas Lowe Date: Thu, 19 Apr 2012 09:12:04 +1000 Subject: Combined mapFlickable and mapPinchArea into single object mapGestureArea Concept changes: - 'flick' and 'pinch' are combined to a single 'gesture' object which can use any subset of pan, flick, zoom, rotate and tilt - 'flick' is a type of pan. So map.flick.enabled (which enabled panning and flicking) is now map.gesture.panEnabled. (Old interface also remains) Code changes: - new mapGesture now handles the logic for pinch, pan and flick gestures - mapFlickable and mapPinchArea objects still exist as sham objects for backwards compatibility - so public interface has not changed - Internal logic basically the same but made explicit by using a simple state machine format: - logic related to the touch and mouse events is handled by a touchPointStateMachine function - logic related to panning (and hence flicking) handled by panStateMachine, and is independent of the number of touch points - logic related to pinching (zoom, tilt, rotate) handled by the pinchStateMachine function - the pan and pinch state machines rely on the data from the touch point state machine Task-number: QTBUG-25131 Functionality changes: - pan operates correctly with two touch points, pans around the center of them - pinch gestures act around the center of the touch points Interface changes: - new map.gesture property which roughly contains the combined properties of map.flick and map.pinch Dependencies: - currently a workaround is checked in under #define TOUCH_EVENT_WORKAROUND. The correct fix is dependent on https://codereview.qt-project.org/#change,21896 Questions: - should we keep map.gesture.panEnabled and map.gesture.pinchEnabled after 5.0.0 or just keep map.gesture.enabled? - should disabling be immediate or wait until the current gesture has ended? Currently keeps the old functionality which is to wait with the pinch and immediate with the pan. - should pan and pinch go into separate structures inside gesture, in order to keep the class complexity manageable? Change-Id: Ia5cee3a9d82cfadfaa3862242950ed2a125209e8 Reviewed-by: Alex Wilson --- src/src.pro | 1 + 1 file changed, 1 insertion(+) (limited to 'src/src.pro') diff --git a/src/src.pro b/src/src.pro index b321da3d..3b54b67b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs CONFIG+=ordered SUBDIRS += location plugins imports + -- cgit v1.2.1