23 Q_PROPERTY( State state READ state NOTIFY stateChanged )
24 Q_PROPERTY( QQuickItem* watchedItem READ watchedItem WRITE setWatchedItem )
25 Q_PROPERTY( QQuickItem* targetItem READ targetItem WRITE setTargetItem )
27 Q_PROPERTY( Qt::MouseButtons acceptedMouseButtons
28 READ acceptedMouseButtons WRITE setAcceptedMouseButtons )
30 Q_PROPERTY(
int timeout READ timeout WRITE setTimeout )
32 using Inherited = QObject;
47 bool eventFilter( QObject*, QEvent* )
override;
50 void setWatchedItem( QQuickItem* );
51 QQuickItem* watchedItem()
const;
54 void setTargetItem( QQuickItem* );
55 QQuickItem* targetItem()
const;
58 void setAcceptedMouseButtons( Qt::MouseButtons );
59 Qt::MouseButtons acceptedMouseButtons()
const;
61 void setRejectOnTimeout(
bool );
62 bool rejectOnTimeout()
const;
64 void setTimeout(
int );
68 quint64 timestampStarted()
const;
76 virtual bool isAcceptedPos(
const QPointF& )
const;
79 void stateChanged( State from, State to );
82 void timerEvent( QTimerEvent* )
override;
90 virtual void processPress(
const QPointF&, quint64 timestamp,
bool isFinal );
91 virtual void processMove(
const QPointF&, quint64 timestamp );
92 virtual void processRelease(
const QPointF&, quint64 timestamp );
95 bool maybeGesture(
const QQuickItem*,
const QEvent* );
96 bool processMouseEvent(
const QQuickItem*,
const QMouseEvent* );
98 void setState( State );
102 std::unique_ptr< PrivateData > m_data;