diff options
Diffstat (limited to 'src/quick/handlers/qquickhandlerpoint.cpp')
-rw-r--r-- | src/quick/handlers/qquickhandlerpoint.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickhandlerpoint.cpp b/src/quick/handlers/qquickhandlerpoint.cpp index 6c7bf2fc8a..b40164d3ec 100644 --- a/src/quick/handlers/qquickhandlerpoint.cpp +++ b/src/quick/handlers/qquickhandlerpoint.cpp @@ -92,6 +92,7 @@ void QQuickHandlerPoint::reset() m_pressure = 0; m_ellipseDiameters = QSizeF(); m_pressedButtons = Qt::NoButton; + m_pressedModifiers = Qt::NoModifier; } void QQuickHandlerPoint::reset(const QQuickEventPoint *point) @@ -111,6 +112,7 @@ void QQuickHandlerPoint::reset(const QQuickEventPoint *point) m_pressedButtons = event->buttons(); break; } + m_pressedModifiers = event->modifiers(); if (event->asPointerTouchEvent()) { const QQuickEventTouchPoint *tp = static_cast<const QQuickEventTouchPoint *>(point); m_uniqueId = tp->uniqueId(); @@ -164,6 +166,7 @@ void QQuickHandlerPoint::reset(const QVector<QQuickEventPoint *> &points) m_id = 0; m_uniqueId = QPointingDeviceUniqueId(); m_pressedButtons = event->buttons(); + m_pressedModifiers = event->modifiers(); m_position = posSum / points.size(); m_scenePosition = scenePosSum / points.size(); if (press) { @@ -273,6 +276,17 @@ void QQuickHandlerPoint::reset(const QVector<QQuickEventPoint *> &points) /*! \readonly + \qmlproperty enum QtQuick::HandlerPoint::modifiers + \brief Which modifier keys are currently pressed + + This property holds the keyboard modifiers that were pressed at the time + the event occurred. + + \sa MouseArea::modifiers +*/ + +/*! + \readonly \qmlproperty QVector2D QtQuick::HandlerPoint::velocity \brief A vector representing the average speed and direction of movement |