summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qnamespace.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-27 15:22:31 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-27 15:22:31 (GMT)
commit20fa050643f72b4bc91386c5fff62cdfe3b75393 (patch)
treefe0bdefb2007b79739b5e0de01bebee08ee5c8c0 /src/corelib/global/qnamespace.h
parent8598ffab46a500b9077d437ffc72d0e6fc843712 (diff)
downloadQt-20fa050643f72b4bc91386c5fff62cdfe3b75393.zip
Qt-20fa050643f72b4bc91386c5fff62cdfe3b75393.tar.gz
Qt-20fa050643f72b4bc91386c5fff62cdfe3b75393.tar.bz2
Make Qt::TouchPointState ORable, add Q*TouchEvent::touchPointStates()
This new function returns a bitwise OR of all the touch point states for the event. This makes it easy to see if a certain type of state is present or not without the need to loop over all touch points. QApplication and QGraphicsScene need to build this state when dispatching the touch points. This also fixes the ASSERT bug that Denis found when trying to send multiple touch presses in a touch begin event.
Diffstat (limited to 'src/corelib/global/qnamespace.h')
-rw-r--r--src/corelib/global/qnamespace.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 29f6701..a6db1a4 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1546,11 +1546,12 @@ public:
};
enum TouchPointState {
- TouchPointPressed,
- TouchPointMoved,
- TouchPointStationary,
- TouchPointReleased
+ TouchPointPressed = 0x01,
+ TouchPointMoved = 0x02,
+ TouchPointStationary = 0x04,
+ TouchPointReleased = 0x08
};
+ Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
enum GestureType
{
@@ -1608,6 +1609,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 **);