diff options
author | Shawn Rutledge <[email protected]> | 2020-07-14 20:09:57 +0200 |
---|---|---|
committer | Shawn Rutledge <[email protected]> | 2021-02-24 16:19:18 +0100 |
commit | 68c103225f4e8bd6c1b18ef547108fd60f398c0f (patch) | |
tree | 92ab9f5c399f7473a7c65d1062db20d0761f5a5a /src/quick/items/qquickwindow.h | |
parent | cccef3886fc50df5e0b39540885e3b5518ece2b1 (diff) |
Move event delivery from QQWindow to QQuickDeliveryAgent
QQuickWindow owns QQuickRootItem which owns QQuickDeliveryAgent, so
for every window there's an object responsible for event delivery,
while the window itself is mainly responsible for rendering (separation
of concerns). However, QQuickRootItem and QQuickDeliveryAgent can now
be used in cases where the scene doesn't directly belong to a window,
such as when a Qt Quick sub-scene is mapped somewhere into a Qt Quick 3D
scene. In that case, we must remember which delivery agent was in use
at the time when a QEventPoint is grabbed and deliver subsequent updates
via the same DA. There's also a QQuickDeliveryAgent::Transform
abstraction which subscene-management code (such as QQuick3DViewport)
can implement, to provide a formula to map the window's scene
coordinates to subscene coordinates; if defined, it will be used
during delivery of subsequent updates to existing grabbers.
Task-number: QTBUG-84870
Change-Id: I70b433f7ebb05d2e60214ff3192e05da0aa84a42
Reviewed-by: Andy Nichols <[email protected]>
Diffstat (limited to 'src/quick/items/qquickwindow.h')
-rw-r--r-- | src/quick/items/qquickwindow.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h index af22912930..cd39bc13d3 100644 --- a/src/quick/items/qquickwindow.h +++ b/src/quick/items/qquickwindow.h @@ -232,6 +232,9 @@ protected: void focusOutEvent(QFocusEvent *) override; bool event(QEvent *) override; + + // These overrides are no longer normal entry points for + // input events, but kept in case legacy code calls them. void keyPressEvent(QKeyEvent *) override; void keyReleaseEvent(QKeyEvent *) override; void mousePressEvent(QMouseEvent *) override; @@ -267,6 +270,7 @@ private: friend class QQuickRenderControl; friend class QQuickAnimatorController; friend class QQuickWidgetPrivate; + friend class QQuickDeliveryAgentPrivate; Q_DISABLE_COPY(QQuickWindow) }; |