diff options
Diffstat (limited to 'src/gui/kernel/qgesture.h')
-rw-r--r-- | src/gui/kernel/qgesture.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h index ee28ea4..1d2fa6d 100644 --- a/src/gui/kernel/qgesture.h +++ b/src/gui/kernel/qgesture.h @@ -63,20 +63,24 @@ class Q_GUI_EXPORT QGesture : public QObject Q_DECLARE_PRIVATE(QGesture) Q_PROPERTY(Qt::GestureState state READ state) + Q_PROPERTY(QObject* gestureTarget READ gestureTarget WRITE setGestureTarget) public: - explicit QGesture(QObject *parent = 0); + explicit QGesture(QObject *gestureTarget = 0, QObject *parent = 0); ~QGesture(); virtual bool filterEvent(QEvent *event) = 0; + void setGestureTarget(QObject *object); + QObject* gestureTarget() const; + void setGraphicsItem(QGraphicsItem *); QGraphicsItem *graphicsItem() const; Qt::GestureState state() const; protected: - QGesture(QGesturePrivate &dd, QObject *parent); + QGesture(QGesturePrivate &dd, QObject *gestureTarget, QObject *parent); bool eventFilter(QObject*, QEvent*); virtual void reset(); |