diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-05-23 15:07:39 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-31 09:13:01 +0200 |
commit | b551d5e4f7d9785baef5c24abb902dafa71350e2 (patch) | |
tree | 5ff65dec7dbd3112e7689418fa0def4432f6aebf /src/gui/kernel/qwindow.cpp | |
parent | ce7b3c972038636d8026dce949f1bd58e0bdd610 (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/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index c9a49bf69b..8fe62bb7fd 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1522,6 +1522,14 @@ bool QWindow::event(QEvent *ev) hideEvent(static_cast<QHideEvent *>(ev)); break; +#ifndef QT_NO_TABLETEVENT + case QEvent::TabletPress: + case QEvent::TabletMove: + case QEvent::TabletRelease: + tabletEvent(static_cast<QTabletEvent *>(ev)); + break; +#endif + default: return QObject::event(ev); } @@ -1628,6 +1636,19 @@ void QWindow::touchEvent(QTouchEvent *ev) ev->ignore(); } +#ifndef QT_NO_TABLETEVENT +/*! + Override this to handle tablet press, move, and release events. + + Proximity enter and leave events are not sent to windows, they are + delivered to the application instance. +*/ +void QWindow::tabletEvent(QTabletEvent *ev) +{ + ev->ignore(); +} +#endif + /*! Override this to handle platform dependent events. |