From 0a92295ca829a62125c9f122fd3daec991993855 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Sat, 14 Sep 2013 20:31:54 +0200 Subject: Relay mouse event synthesization information Make platform plugins, like the windows one, able to indicate if a mouse event is synthesized from a touch event by the OS. This will be valuable information for the Quick2 event handlers. No new member variables are added to QMouseEvent. Instead, the enum value is encoded in the caps member, there are plenty of bits available in it. This introduces Qt::MouseEventSource and QMouseEvent::source() as public APIs. Change-Id: If087a0bafb33a6cd7891bd07b84871358f6aba69 Reviewed-by: Shawn Rutledge Reviewed-by: Friedemann Kleint --- src/gui/kernel/qguiapplication_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 7a4a161476..b1d20c9ead 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -264,7 +264,9 @@ public: static int mouseEventCaps(QMouseEvent *event); static QVector2D mouseEventVelocity(QMouseEvent *event); static void setMouseEventCapsAndVelocity(QMouseEvent *event, int caps, const QVector2D &velocity); - static void setMouseEventCapsAndVelocity(QMouseEvent *event, QMouseEvent *other); + + static Qt::MouseEventSource mouseEventSource(const QMouseEvent *event); + static void setMouseEventSource(QMouseEvent *event, Qt::MouseEventSource source); const QDrawHelperGammaTables *gammaTables(); -- cgit v1.2.3