diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-24 10:34:31 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-24 10:34:31 (GMT) |
commit | d3ce585a235e6a92b8a662c06f8686da977daa49 (patch) | |
tree | 92532e67293b2fde9ba44867ff4ffb1e966efaa3 /src/gui/kernel/qapplication_p.h | |
parent | d8b81cad37e9477e609bbbedf0e666163bbbd813 (diff) | |
download | Qt-d3ce585a235e6a92b8a662c06f8686da977daa49.zip Qt-d3ce585a235e6a92b8a662c06f8686da977daa49.tar.gz Qt-d3ce585a235e6a92b8a662c06f8686da977daa49.tar.bz2 |
Add QTouchEvent::DeviceType and deviceType()
This enum indicates what kind of device generated the touch event
(TouchScreen or TouchPad). We use this information to control how touch
events are sent, specifically we restrict touch events to a single
widget/QGraphicsItem on touch-pads, since there is no direct
relationship between the physical touch location on the pad and the on-
using the touch-pad).
Diffstat (limited to 'src/gui/kernel/qapplication_p.h')
-rw-r--r-- | src/gui/kernel/qapplication_p.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index f2226ce..c5d9235 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -437,7 +437,7 @@ public: // map<gesture name -> number of widget subscribed to it> QMap<QString, int> grabbedGestures; - QHash<int, QWidget *> widgetForTouchPointId; + QMap<int, QWidget *> widgetForTouchPointId; QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints; static void updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent); void initializeMultitouch(); @@ -448,6 +448,7 @@ public: void appendTouchPoint(const QTouchEvent::TouchPoint &touchPoint); void removeTouchPoint(int touchPointId); static void translateRawTouchEvent(QWidget *widget, + QTouchEvent::DeviceType deviceType, const QList<QTouchEvent::TouchPoint> &touchPoints); #if defined(Q_WS_WIN) @@ -491,6 +492,10 @@ private: static bool shouldSetFocus(QWidget *w, Qt::FocusPolicy policy); }; +Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window, + QTouchEvent::DeviceType deviceType, + const QList<QTouchEvent::TouchPoint> &touchPoints); + QT_END_NAMESPACE #endif // QAPPLICATION_P_H |