aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents_p_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-08-01 15:17:52 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-08-02 13:23:16 +0000
commit80c7ce5e0c990fb67f90563fb81b16e33699a522 (patch)
tree1e0e36e94ae75d5aacc1d926240c2dbe8545a9b7 /src/quick/items/qquickevents_p_p.h
parent340563013ed7dcb0229085180b68cfea18317e0d (diff)
add QQuickPointerEvent::setAccepted/isAccepted to avoid mouse/touch casting
This makes deliverMouseEvent() slightly more generic: the only place we now care about it being a mouse event is to be able to call sendEvent() with the original event. Change-Id: Ibd1660bb45b6f8b3a5b9926aeb3dc85ff2e41d0f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents_p_p.h')
-rw-r--r--src/quick/items/qquickevents_p_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index 072a90d864..b28c68c090 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -362,6 +362,8 @@ public: // helpers for C++ only (during event delivery)
virtual const QQuickPointerTabletEvent *asPointerTabletEvent() const { return nullptr; }
bool isValid() const { return m_event != nullptr; }
virtual bool allPointsAccepted() const = 0;
+ bool isAccepted() { return m_event->isAccepted(); }
+ void setAccepted(bool accepted) { m_event->setAccepted(accepted); }
QVector<QPointF> unacceptedPointScenePositions() const;
QVector<QPointF> unacceptedPressedPointScenePositions() const;