diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qnamespace.h | 50 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreevent.cpp | 9 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreevent.h | 17 |
3 files changed, 75 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 9e53d89..78e2b08 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -491,6 +491,9 @@ public: WA_WState_WindowOpacitySet = 119, // internal WA_TranslucentBackground = 120, + WA_AcceptTouchEvents = 121, + WA_AcceptedTouchBeginEvent = 122, + // Add new attributes before this line WA_AttributeCount }; @@ -1542,6 +1545,52 @@ public: BottomLeftSection, TitleBarArea // For move }; + + enum TouchPointState { + TouchPointPressed = 0x01, + TouchPointMoved = 0x02, + TouchPointStationary = 0x04, + TouchPointReleased = 0x08 + }; + Q_DECLARE_FLAGS(TouchPointStates, TouchPointState) + + enum GestureType + { + UnknownGesture, + TapGesture, + DoubleTapGesture, + TrippleTapGesture, + TapAndHoldGesture, + PanGesture, + PinchGesture + }; + + + enum GestureState + { + NoGesture, + GestureStarted = 1, + GestureUpdated = 2, + GestureFinished = 3 + }; + + enum DirectionType + { + NoDirection = 0, + LeftDownDirection = 1, + DownLeftDirection = LeftDownDirection, + DownDirection = 2, + RightDownDirection = 3, + DownRightDirection = RightDownDirection, + LeftDirection = 4, + RightDirection = 6, + LeftUpDirection = 7, + UpLeftDirection = LeftUpDirection, + UpDirection = 8, + RightUpDirection = 9, + UpRightDirection = RightUpDirection + }; + } #ifdef Q_MOC_RUN ; @@ -1561,6 +1610,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DropActions) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ItemFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TextInteractionFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TouchPointStates) typedef bool (*qInternalCallback)(void **); diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index d6b0174..d28d34e 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -222,6 +222,15 @@ QT_BEGIN_NAMESPACE \value ZOrderChange The widget's z-order has changed. This event is never sent to top level windows. \value KeyboardLayoutChange The keyboard layout has changed. \value DynamicPropertyChange A dynamic property was added, changed or removed from the object. + \value RawTouch A raw event from a touch-screen or track-pad device (QTouchEvent) + \value TouchBegin Beginning of a sequence of touch-screen and/or track-pad events (QTouchEvent) + \value TouchUpdate Touch-screen event (QTouchEvent) + \value TouchEnd End of touch-event sequence (QTouchEvent) + \value GraphicsSceneTouchBegin Beginning of a sequence of touch-screen and/or track-pad events in a graphics scene (QGraphicsSceneTouchEvent) + \value GraphicsSceneTouchUpdate Touch-screen event in a graphics scene (QGraphicsSceneTouchEvent) + \value GraphicsSceneTouchEnd End of touch-event sequence in a graphics scene (QGraphicsSceneTouchEvent) + \value Gesture A gesture has occured. + \value GraphicsSceneGesture A gesture has occured on a graphics scene. User events should have values between \c User and \c{MaxUser}: diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h index 18188a8..3381a31 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -272,7 +272,19 @@ public: Signal = 192, Wrapped = 193, - // 512 reserved for Qt Jambi's MetaCall event + RawTouch = 194, + + TouchBegin = 195, + TouchUpdate = 196, + TouchEnd = 197, + GraphicsSceneTouchBegin = 198, + GraphicsSceneTouchUpdate = 199, + GraphicsSceneTouchEnd = 200, + + Gesture = 201, + GraphicsSceneGesture = 202, + + // 512 reserved for Qt Jambi's MetaCall event // 513 reserved for Qt Jambi's DeleteOnMainThread event User = 1000, // first user event id @@ -310,6 +322,9 @@ private: friend class Q3AccelManager; friend class QShortcutMap; friend class QETWidget; + friend class QGraphicsView; + friend class QGraphicsViewPrivate; + friend class QGraphicsScenePrivate; }; class Q_CORE_EXPORT QTimerEvent : public QEvent |