aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpointerdevicehandler_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-06-26 20:23:24 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-06-29 14:42:18 +0000
commit73258eca7ab7e3981d9f4aaa5484020cb67854a0 (patch)
tree72805a0605bc4c47a27fdf2a9187aca4ed6b593c /src/quick/handlers/qquickpointerdevicehandler_p.h
parentda722fb448f06cf43780e6f857a1ccd9f07176d6 (diff)
Move QQSinglePointHandler::acceptedButtons to QQPointerDeviceHandler
This property must exist in DragHandler, but we're preparing to have DragHandler inherit from MultiPointHandler. So it's no longer true that a MultiPointHandler only handles touch events: if minimumPointCount is set to 1, it can handle the mouse as well. Change-Id: If6432e22b4382e79820c4d993645cf3de3b83d0c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointerdevicehandler_p.h')
-rw-r--r--src/quick/handlers/qquickpointerdevicehandler_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpointerdevicehandler_p.h b/src/quick/handlers/qquickpointerdevicehandler_p.h
index cd861b2bf1..4194769fd7 100644
--- a/src/quick/handlers/qquickpointerdevicehandler_p.h
+++ b/src/quick/handlers/qquickpointerdevicehandler_p.h
@@ -61,6 +61,7 @@ class Q_AUTOTEST_EXPORT QQuickPointerDeviceHandler : public QQuickPointerHandler
Q_OBJECT
Q_PROPERTY(QQuickPointerDevice::DeviceTypes acceptedDevices READ acceptedDevices WRITE setAcceptedDevices NOTIFY acceptedDevicesChanged)
Q_PROPERTY(QQuickPointerDevice::PointerTypes acceptedPointerTypes READ acceptedPointerTypes WRITE setAcceptedPointerTypes NOTIFY acceptedPointerTypesChanged)
+ Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
Q_PROPERTY(Qt::KeyboardModifiers acceptedModifiers READ acceptedModifiers WRITE setAcceptedModifiers NOTIFY acceptedModifiersChanged)
public:
@@ -69,16 +70,19 @@ public:
QQuickPointerDevice::DeviceTypes acceptedDevices() const;
QQuickPointerDevice::PointerTypes acceptedPointerTypes() const;
+ Qt::MouseButtons acceptedButtons() const;
Qt::KeyboardModifiers acceptedModifiers() const;
public Q_SLOTS:
void setAcceptedDevices(QQuickPointerDevice::DeviceTypes acceptedDevices);
void setAcceptedPointerTypes(QQuickPointerDevice::PointerTypes acceptedPointerTypes);
+ void setAcceptedButtons(Qt::MouseButtons buttons);
void setAcceptedModifiers(Qt::KeyboardModifiers acceptedModifiers);
Q_SIGNALS:
void acceptedDevicesChanged();
void acceptedPointerTypesChanged();
+ void acceptedButtonsChanged();
void acceptedModifiersChanged();
protected: