diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-05-27 15:22:31 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-05-27 15:22:31 (GMT) |
commit | 20fa050643f72b4bc91386c5fff62cdfe3b75393 (patch) | |
tree | fe0bdefb2007b79739b5e0de01bebee08ee5c8c0 /src/gui/graphicsview/qgraphicssceneevent.h | |
parent | 8598ffab46a500b9077d437ffc72d0e6fc843712 (diff) | |
download | Qt-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/gui/graphicsview/qgraphicssceneevent.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicssceneevent.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneevent.h b/src/gui/graphicsview/qgraphicssceneevent.h index 8b24d33..9fcda2f 100644 --- a/src/gui/graphicsview/qgraphicssceneevent.h +++ b/src/gui/graphicsview/qgraphicssceneevent.h @@ -372,12 +372,15 @@ public: QGraphicsSceneTouchEvent(Type type = None); ~QGraphicsSceneTouchEvent(); - const QList<QGraphicsSceneTouchEvent::TouchPoint *> &touchPoints() const; - void setTouchPoints(const QList<QGraphicsSceneTouchEvent::TouchPoint *> &touchPoints); - Qt::KeyboardModifiers modifiers() const; void setModifiers(Qt::KeyboardModifiers modifiers); + Qt::TouchPointStates touchPointStates() const; + void setTouchPointStates(Qt::TouchPointStates touchPointStates); + + const QList<QGraphicsSceneTouchEvent::TouchPoint *> &touchPoints() const; + void setTouchPoints(const QList<QGraphicsSceneTouchEvent::TouchPoint *> &touchPoints); + private: Q_DECLARE_PRIVATE(QGraphicsSceneTouchEvent); }; |