summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface_qpa.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-05-23 15:07:39 +0300
committerQt by Nokia <qt-info@nokia.com>2012-05-31 09:13:01 +0200
commitb551d5e4f7d9785baef5c24abb902dafa71350e2 (patch)
tree5ff65dec7dbd3112e7689418fa0def4432f6aebf /src/gui/kernel/qwindowsysteminterface_qpa.cpp
parentce7b3c972038636d8026dce949f1bd58e0bdd610 (diff)
QPA tablet event support
Should be sufficient to allow implementing the actual functionality in xcb/cocoa/windows to match the Qt 4 level of tablet event support. Task-number: QTBUG-25864 Change-Id: Iebcca256dfba841d8976b58fda1b76026d3133a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_qpa.cpp')
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
index 3054b9610d..c707d4eea2 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -528,4 +528,52 @@ void QWindowSystemInterface::handleFileOpenEvent(const QString& fileName)
QGuiApplicationPrivate::processWindowSystemEvent(&e);
}
+void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, bool down, const QPointF &local, const QPointF &global,
+ int device, int pointerType, qreal pressure, int xTilt, int yTilt,
+ qreal tangentialPressure, qreal rotation, int z, qint64 uid,
+ Qt::KeyboardModifiers modifiers)
+{
+ QWindowSystemInterfacePrivate::TabletEvent *e =
+ new QWindowSystemInterfacePrivate::TabletEvent(w, timestamp, down, local, global, device, pointerType, pressure,
+ xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleTabletEvent(QWindow *w, bool down, const QPointF &local, const QPointF &global,
+ int device, int pointerType, qreal pressure, int xTilt, int yTilt,
+ qreal tangentialPressure, qreal rotation, int z, qint64 uid,
+ Qt::KeyboardModifiers modifiers)
+{
+ ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ handleTabletEvent(w, time, down, local, global, device, pointerType, pressure,
+ xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);
+}
+
+void QWindowSystemInterface::handleTabletEnterProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid)
+{
+ QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e =
+ new QWindowSystemInterfacePrivate::TabletEnterProximityEvent(timestamp, device, pointerType, uid);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleTabletEnterProximityEvent(int device, int pointerType, qint64 uid)
+{
+ ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ handleTabletEnterProximityEvent(time, device, pointerType, uid);
+}
+
+void QWindowSystemInterface::handleTabletLeaveProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid)
+{
+ QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e =
+ new QWindowSystemInterfacePrivate::TabletLeaveProximityEvent(timestamp, device, pointerType, uid);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleTabletLeaveProximityEvent(int device, int pointerType, qint64 uid)
+{
+ ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ handleTabletLeaveProximityEvent(time, device, pointerType, uid);
+}
+
+
QT_END_NAMESPACE