summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-09 17:09:09 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-09 17:09:09 (GMT)
commitf2437d3aa6cc274b9e663801892fd4e40e693546 (patch)
tree7a5b1425ac403336eb77c80ca0a551e7222f60f8 /src/gui/kernel/qevent.h
parent7566a1f15ea32504c10d9467fb69a6399a06c325 (diff)
downloadQt-f2437d3aa6cc274b9e663801892fd4e40e693546.zip
Qt-f2437d3aa6cc274b9e663801892fd4e40e693546.tar.gz
Qt-f2437d3aa6cc274b9e663801892fd4e40e693546.tar.bz2
A new implementation of the Gesture API.
Implemented gestures using gesture events and separate QGesture/QGestureRecognizer classes. Reviewed-by: trustme
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r--src/gui/kernel/qevent.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 4396766..224b479 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -819,6 +819,40 @@ protected:
friend class QApplicationPrivate;
};
+class QGesture;
+class Q_GUI_EXPORT QGestureEvent : public QEvent
+{
+public:
+ QGestureEvent(const QList<QGesture *> &gestures);
+
+ QList<QGesture *> allGestures() const;
+ QGesture *gesture(Qt::GestureType type);
+
+ QList<QGesture *> activeGestures() const;
+ QList<QGesture *> canceledGestures() const;
+
+#ifdef Q_NO_USING_KEYWORD
+ inline void setAccepted(bool accepted) { QEvent::setAccepted(accepted); }
+ inline bool isAccepted() const { return QEvent::isAccepted(); }
+
+ inline void accept() { QEvent::accept(); }
+ inline void ignore() { QEvent::ignore(); }
+#else
+ using QEvent::setAccepted;
+ using QEvent::isAccepted;
+ using QEvent::accept;
+ using QEvent::ignore;
+#endif
+
+ void setAccepted(QGesture *, bool);
+ void accept(QGesture *);
+ void ignore(QGesture *);
+ bool isAccepted(QGesture *) const;
+
+private:
+ QList<QGesture *> gestures_;
+};
+
QT_END_NAMESPACE
QT_END_HEADER