diff options
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 225d8b1..5761939 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +QString qt_getStandardGestureTypeName(Qt::GestureType type); + /*! \class QInputEvent \ingroup events @@ -3572,6 +3574,41 @@ QGestureEvent::~QGestureEvent() { } +bool QGestureEvent::contains(Qt::GestureType type) const +{ + return contains(qt_getStandardGestureTypeName(type)); +} + +bool QGestureEvent::contains(const QString &type) const +{ + return gesture(type) != 0; +} + +QList<QString> QGestureEvent::gestureTypes() const +{ + return m_gestures.keys(); +} + +const QGesture* QGestureEvent::gesture(Qt::GestureType type) const +{ + return gesture(qt_getStandardGestureTypeName(type)); +} + +const QGesture* QGestureEvent::gesture(const QString &type) const +{ + return m_gestures.value(type, QSharedPointer<QGesture>()).data(); +} + +QList<QSharedPointer<QGesture> > QGestureEvent::gestures() const +{ + return m_gestures.values(); +} + +QSet<QString> QGestureEvent::cancelledGestures() const +{ + return m_cancelledGestures; +} + /*! \class QTouchEvent \brief The QTouchEvent class contains parameters that describe a touch event . |