diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qnamespace.h | 54 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreevent.cpp | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreevent.h | 12 |
3 files changed, 70 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 2023327..0006026 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -491,6 +491,10 @@ public: WA_WState_WindowOpacitySet = 119, // internal WA_TranslucentBackground = 120, + WA_AcceptTouchEvents = 121, + WA_WState_AcceptedTouchBeginEvent = 122, + WA_TouchPadAcceptSingleTouchEvents = 123, + // Add new attributes before this line WA_AttributeCount }; @@ -1546,6 +1550,55 @@ public: enum Initialization { Uninitialized }; + + enum TouchPointState { + TouchPointPressed = 0x01, + TouchPointMoved = 0x02, + TouchPointStationary = 0x04, + TouchPointReleased = 0x08, + TouchPointStateMask = 0x0f, + + TouchPointPrimary = 0x10 + }; + 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 ; @@ -1565,6 +1618,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 7916e23..504ae84 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -222,6 +222,11 @@ 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 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 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 be61139..4929c51 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -272,7 +272,14 @@ public: Signal = 192, Wrapped = 193, - // 512 reserved for Qt Jambi's MetaCall event + TouchBegin = 194, + TouchUpdate = 195, + TouchEnd = 196, + + Gesture = 197, + GraphicsSceneGesture = 198, + + // 512 reserved for Qt Jambi's MetaCall event // 513 reserved for Qt Jambi's DeleteOnMainThread event User = 1000, // first user event id @@ -310,6 +317,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 |