From 97e75b2763cd4e36a20a97eaa9a966541add6b6d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 21 May 2015 12:22:45 +0200 Subject: Make QTouchDevice a Q_GADGET and introduce Q_ENUM/Q_FLAG. Make it possible to stream the enumerations to a debug stream.# Change-Id: I0add2dcd835333a8d6cebf779252f22c1418faf3 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Shawn Rutledge --- src/gui/kernel/qtouchdevice.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qtouchdevice.h b/src/gui/kernel/qtouchdevice.h index f2157ce2d6..90f0f25d2f 100644 --- a/src/gui/kernel/qtouchdevice.h +++ b/src/gui/kernel/qtouchdevice.h @@ -43,11 +43,13 @@ class QTouchDevicePrivate; class Q_GUI_EXPORT QTouchDevice { + Q_GADGET public: enum DeviceType { TouchScreen, TouchPad }; + Q_ENUM(DeviceType) enum CapabilityFlag { Position = 0x0001, @@ -58,6 +60,7 @@ public: NormalizedPosition = 0x0020, MouseEmulation = 0x0040 }; + Q_FLAG(CapabilityFlag) Q_DECLARE_FLAGS(Capabilities, CapabilityFlag) QTouchDevice(); -- cgit v1.2.3