![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qquickdeliveryagent_p_p.h>
Public Types | |
enum | FocusOption { DontChangeFocusProperty = 0x01 , DontChangeSubFocusItem = 0x02 } |
enum class | HoverChange : uint8_t { Clear , Set } |
Public Types inherited from QObjectPrivate | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
Static Public Member Functions | |
static void | notifyFocusChangesRecur (QQuickItem **item, int remaining, Qt::FocusReason reason) |
static QQuickDeliveryAgent * | currentOrItemDeliveryAgent (const QQuickItem *item) |
static QPointerEvent * | clonePointerEvent (QPointerEvent *event, std::optional< QPointF > transformedLocalPos=std::nullopt) |
static void | localizePointerEvent (QPointerEvent *ev, const QQuickItem *dest) |
static bool | anyPointGrabbed (const QPointerEvent *ev) |
static bool | allPointsGrabbed (const QPointerEvent *ev) |
static bool | isMouseEvent (const QPointerEvent *ev) |
static bool | isMouseOrWheelEvent (const QPointerEvent *ev) |
static bool | isHoverEvent (const QPointerEvent *ev) |
static bool | isHoveringMoveEvent (const QPointerEvent *ev) |
static bool | isTouchEvent (const QPointerEvent *ev) |
static bool | isTabletEvent (const QPointerEvent *ev) |
static bool | isEventFromMouseOrTouchpad (const QPointerEvent *ev) |
static bool | isSynthMouse (const QPointerEvent *ev) |
static bool | isWithinDoubleClickInterval (ulong timeInterval) |
Returns false if the time constraint for detecting a double-click is violated. | |
static bool | isWithinDoubleTapDistance (const QPoint &distanceBetweenPresses) |
Returns false if the spatial constraint for detecting a touchscreen double-tap is violated. | |
static bool | isSinglePointDevice (const QInputDevice *dev) |
Returns true if dev is a type of device that only sends QSinglePointEvents. | |
static QQuickPointingDeviceExtra * | deviceExtra (const QInputDevice *device) |
static bool | dragOverThreshold (qreal d, Qt::Axis axis, QMouseEvent *event, int startDragThreshold=-1) |
static bool | dragOverThreshold (qreal d, Qt::Axis axis, const QEventPoint &tp, int startDragThreshold=-1) |
static bool | dragOverThreshold (QVector2D delta) |
Static Public Member Functions inherited from QObjectPrivate | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1, typename Func2> | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1, typename Func2> | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Static Public Attributes | |
static bool | subsceneAgentsExist |
static QQuickDeliveryAgent * | currentEventDeliveryAgent |
Definition at line 47 of file qquickdeliveryagent_p_p.h.
Enumerator | |
---|---|
DontChangeFocusProperty | |
DontChangeSubFocusItem |
Definition at line 60 of file qquickdeliveryagent_p_p.h.
|
strong |
Enumerator | |
---|---|
Clear | |
Set |
Definition at line 178 of file qquickdeliveryagent_p_p.h.
QQuickDeliveryAgentPrivate::QQuickDeliveryAgentPrivate | ( | QQuickItem * | root | ) |
Definition at line 984 of file qquickdeliveryagent.cpp.
QQuickDeliveryAgentPrivate::~QQuickDeliveryAgentPrivate | ( | ) |
Definition at line 997 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1507 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::allUpdatedPointsAccepted | ( | const QPointerEvent * | ev | ) |
Definition at line 1461 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1498 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::cancelTouchMouseSynthesis | ( | ) |
Definition at line 145 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::checkIfDoubleTapped | ( | ulong | newPressEventTimestamp, |
const QPoint & | newPressPos ) |
Definition at line 93 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::clearFocusInScope | ( | QQuickItem * | scope, |
QQuickItem * | item, | ||
Qt::FocusReason | reason, | ||
FocusOptions | options = { } ) |
Definition at line 537 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::clearFocusObject | ( | ) |
Definition at line 638 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::clearGrabbers | ( | QPointerEvent * | pointerEvent | ) |
Clears all exclusive and passive grabs for the points in pointerEvent.
We never allow any kind of grab to persist after release, unless we're waiting for a synth event from QtGui (as with most tablet events), so for points that are fully released, the grab is cleared.
Called when QQuickWindow::event dispatches events, or when the QQuickOverlay has filtered an event so that it bypasses normal delivery.
Definition at line 324 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::clearHover | ( | ulong | timestamp = 0 | ) |
Definition at line 671 of file qquickdeliveryagent.cpp.
|
static |
Make a copy of any type of QPointerEvent, and optionally localize it by setting its first point's local position() if transformedLocalPos is given.
Definition at line 1013 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::compressTouchEvent | ( | QTouchEvent * | event | ) |
This function is called from handleTouchEvent() in case a series of touch events containing only Updated
and Stationary
points arrives within a short period of time. (Some touchscreens are more "jittery" than others.)
It would be a waste of CPU time to deliver events and have items in the scene getting modified more often than once per frame; so here we try to coalesce the series of updates into a single event containing all updates that occur within one frame period, and deliverDelayedTouchEvent() is called from flushFrameSynchronousEvents() to send that single event. This is the reason why touch compression lives here so far, instead of in a lower layer: the render loop updates the scene in sync with the screen's vsync, and flushFrameSynchronousEvents() is called from there (for example from QSGThreadedRenderLoop::polishAndSync(), and equivalent places in other render loops). It would be preferable to move this code down to a lower level eventually, though, because it's not fundamentally a Qt Quick concern.
This optimization can be turned off by setting the environment variable QML_NO_TOUCH_COMPRESSION
.
Returns true
if "done", false
if the caller needs to finish the event delivery.
Definition at line 1650 of file qquickdeliveryagent.cpp.
QVector< QQuickItem * > QQuickDeliveryAgentPrivate::contextMenuTargets | ( | QQuickItem * | item, |
const QContextMenuEvent * | event ) const |
Returns all items that could potentially want event.
(Similar to \l pointerTargets(), necessary because QContextMenuEvent is not a QPointerEvent.)
Definition at line 2979 of file qquickdeliveryagent.cpp.
|
static |
If called during event delivery, returns the agent that is delivering the event, without checking whether item is reachable from there. Otherwise returns QQuickItemPrivate::deliveryAgent() (the delivery agent for the narrowest subscene containing item), or null
if item is null
.
Definition at line 741 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::deliverContextMenuEvent | ( | QContextMenuEvent * | event | ) |
Based on \l deliverPointerEvent().
Definition at line 2996 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::deliverDelayedTouchEvent | ( | ) |
Definition at line 1402 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::deliverHoverEvent | ( | const QPointF & | scenePos, |
const QPointF & | lastScenePos, | ||
Qt::KeyboardModifiers | modifiers, | ||
ulong | timestamp ) |
Delivers a hover event at scenePos to the whole scene or subscene that this DeliveryAgent is responsible for. Returns true
if delivery is "done".
Definition at line 1107 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::deliverHoverEventRecursive | ( | QQuickItem * | item, |
const QPointF & | scenePos, | ||
const QPointF & | lastScenePos, | ||
Qt::KeyboardModifiers | modifiers, | ||
ulong | timestamp ) |
Delivers a hover event at scenePos to item and all its children. The children get it first. As soon as any item allows the event to remain accepted, recursion stops. Returns true
in that case, or false
if the event is rejected.
Each item that has hover enabled (from setAcceptHoverEvents()) has the QQuickItemPrivate::hoverEnabled flag set. This only controls whether we should send hover events to the item itself. (HoverHandlers no longer set this flag.) When an item has hoverEnabled set, all its ancestors have the QQuickItemPrivate::subtreeHoverEnabled set. This function will follow the subtrees that have subtreeHoverEnabled by recursing into each child with that flag set. And for each child (in addition to the item itself) that also has hoverEnabled set, we call deliverHoverEventToItem() to actually deliver the event to it. The item can then choose to accept or reject the event. This is only for control over whether we stop propagation or not: an item can reject the event, but at the same time be hovered (and therefore in hoverItems). By accepting the event, the item will effectivly end up as the only one hovered. Any other HoverHandler that may be a child of an item that is stacked underneath, will not. Note that since siblings can overlap, there can be more than one leaf item under the mouse.
Note that HoverHandler doesn't set the hoverEnabled flag on the parent item. But still, adding a HoverHandler to an item will set its subtreeHoverEnabled flag. So all the propagation logic described above will otherwise be the same. But the hoverEnabled flag can be used to resolve if subtreeHoverEnabled is on because the application explicitly requested it (setAcceptHoverEvents()), or indirectly, because the item has HoverHandlers.
For legacy reasons (Qt 6.1), as soon as we find a leaf item that has hover enabled, and therefore receives the event, we stop recursing into the remaining siblings (even if the event was ignored). This means that we only allow hover events to propagate up the direct parent-child hierarchy, and not to siblings. However, if the first candidate HoverHandler is disabled, delivery continues to the next one, which may be a sibling (QTBUG-106548).
Definition at line 1197 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::deliverHoverEventToItem | ( | QQuickItem * | item, |
const QPointF & | scenePos, | ||
const QPointF & | lastScenePos, | ||
Qt::KeyboardModifiers | modifiers, | ||
ulong | timestamp, | ||
HoverChange | hoverChange ) |
Delivers a hover event at scenePos to item and its HoverHandlers if any. Returns true
if the event remains accepted, false
if rejected.
If clearHover is true
, it will be sent as a QEvent::HoverLeave event, and the item and its handlers are expected to transition into their non-hovered states even if the position still indicates that the mouse is inside.
Definition at line 1250 of file qquickdeliveryagent.cpp.
Definition at line 952 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::deliverMatchingPointsToItem | ( | QQuickItem * | item, |
bool | isGrabber, | ||
QPointerEvent * | pointerEvent, | ||
bool | handlersOnly = false ) |
Deliver pointerEvent to item and its handlers, if any. If handlersOnly is true
, skip QQuickItem::event() and just visit its handlers via QQuickItemPrivate::handlePointerEvent().
This function exists just to de-duplicate the common code between deliverPressOrReleaseEvent() and deliverUpdatedPoints().
Definition at line 2444 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::deliverPointerEvent | ( | QPointerEvent * | event | ) |
The entry point for delivery of event after determining that it is a pointer event, and either does not need to be coalesced in compressTouchEvent(), or already has been.
When it returns, event delivery is done.
Definition at line 2009 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::deliverPressOrReleaseEvent | ( | QPointerEvent * | event, |
bool | handlersOnly = false ) |
Deliver a pointer event containing newly pressed or released QEventPoints. If handlersOnly is true
, skip the items and just deliver to Pointer Handlers (via QQuickItemPrivate::handlePointerEvent()).
For the sake of determinism, this function first builds the list targetItems
by calling pointerTargets() on the root item. That is, the list of items to "visit" is determined at the beginning, and will not be affected if items reparent, hide, or otherwise try to make themselves eligible or ineligible during delivery. (Avoid bugs due to ugly just-in-time tricks in JS event handlers, filters etc.)
Whenever a touch gesture is in progress, and another touchpoint is pressed, or an existing touchpoint is released, we "start over" with delivery: that's why this function is called whenever the event contains newly pressed or released points. It's not necessary for a handler or an item to greedily grab all touchpoints just in case a valid gesture might start. QQuickMultiPointHandler::wantsPointerEvent() can calmly return false
if the number of points is less than QQuickMultiPointHandler::minimumPointCount(), because it knows it will be asked again if the number of points increases.
When handlersOnly is false
, event visits the items in targetItems
via QQuickItem::event(). We have to call sendFilteredPointerEvent() before visiting each item, just in case a Flickable (or some other parent-filter) will decide to intercept the event. But we also have to be very careful never to let the same Flickable filter the same event twice, because when Flickable decides to intercept, it lets the child item have that event, and then grabs the next event. That allows you to drag a Slider, DragHandler or whatever inside a ListView delegate: if you're dragging in the correct direction for the draggable child, it can use QQuickItem::setKeepMouseGrab(), QQuickItem::setKeepTouchGrab() or QQuickPointerHandler::grabPermissions() to prevent Flickable from intercepting during filtering, only if it actually has the exclusive grab already when Flickable attempts to take it. Typically, both the Flickable and the child are checking the same drag threshold, so the child must have a chance to grab and keep the grab before Flickable gets a chance to steal it, even though Flickable actually sees the event first during filtering.
Definition at line 2363 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::deliverSinglePointEventUntilAccepted | ( | QPointerEvent * | event | ) |
Definition at line 1346 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::deliverToPassiveGrabbers | ( | const QVector< QPointer< QObject > > & | passiveGrabbers, |
QPointerEvent * | pointerEvent ) |
Definition at line 1025 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::deliverTouchAsMouse | ( | QQuickItem * | item, |
QTouchEvent * | pointerEvent ) |
Definition at line 152 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::deliverTouchCancelEvent | ( | QTouchEvent * | event | ) |
Definition at line 1387 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::deliverUpdatedPoints | ( | QPointerEvent * | event | ) |
Deliver updated points to existing grabbers.
Definition at line 2234 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1612 of file qquickdeliveryagent.cpp.
|
static |
Returns true
if the movement delta d in pixels along the axis exceeds startDragThreshold if it is set, or QStyleHints::startDragDistance(); or, if QEventPoint::velocity() of tp exceeds QStyleHints::startDragVelocity().
Definition at line 2949 of file qquickdeliveryagent.cpp.
|
static |
Returns true
if the movement delta d in pixels along the axis exceeds startDragThreshold if it is set, or QStyleHints::startDragDistance(); or, if QEventPoint::velocity() of event exceeds QStyleHints::startDragVelocity().
Definition at line 2928 of file qquickdeliveryagent.cpp.
|
static |
Returns true
if the movement delta in pixels exceeds QStyleHints::startDragDistance().
Definition at line 2966 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::ensureDeviceConnected | ( | const QPointingDevice * | dev | ) |
Called when a QPointingDevice is detected, to ensure that the QPointingDevice::grabChanged() signal is connected to QQuickDeliveryAgentPrivate::onGrabChanged().
knownPointingDevices
is maintained only to track signal connections, and should not be used for other purposes. The usual place to get a list of all devices is QInputDevice::devices().
Definition at line 1992 of file qquickdeliveryagent.cpp.
QPointerEvent * QQuickDeliveryAgentPrivate::eventInDelivery | ( | ) | const |
Accessor for use by legacy methods such as QQuickItem::grabMouse(), QQuickItem::ungrabMouse(), and QQuickItem::grabTouchPoints() which are not given sufficient context to do the grabbing. We should remove eventsInDelivery in Qt 7.
Accessor for use by legacy methods such as QQuickItem::grabMouse(), QQuickItem::ungrabMouse(), and QQuickItem::grabTouchPoints() which are not given sufficient context to do the grabbing. We should remove eventsInDelivery in Qt 7.
Definition at line 125 of file qquickdeliveryagent.cpp.
QVector< QQuickItem * > QQuickDeliveryAgentPrivate::eventTargets | ( | QQuickItem * | item, |
const QEvent * | event, | ||
QPointF | scenePos, | ||
qxp::function_ref< std::optional< bool >(QQuickItem *, const QEvent *)> | predicate ) const |
Returns a list of all items that are spatially relevant to receive event occurring at scenePos, starting with item and recursively checking all the children. \list
true
and scenePos is outside of QQuickItem::clipRect(), its children are also omitted. (We stop the recursion, because any clipped-off portions of children under scenePos are invisible.) false
; include any item for which the predicate returns true
. \endlist Definition at line 2118 of file qquickdeliveryagent.cpp.
QList< QObject * > QQuickDeliveryAgentPrivate::exclusiveGrabbers | ( | QPointerEvent * | ev | ) |
Definition at line 1486 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::flushFrameSynchronousEvents | ( | QQuickWindow * | win | ) |
Flush events before a frame is rendered in win.
This is here because of compressTouchEvent(): we need to ensure that coalesced touch events are actually delivered in time to cause the desired reactions of items and their handlers. And then since it was introduced because of that, we started using this function for once-per-frame hover events too, to take care of changing hover state when an item animates under the mouse cursor at a time that the mouse cursor is not moving.
This is done before QQuickItem::updatePolish() is called on all the items that requested polishing.
Definition at line 1836 of file qquickdeliveryagent.cpp.
QQuickItem * QQuickDeliveryAgentPrivate::focusTargetItem | ( | ) | const |
Returns the item that should get active focus when the root focus scope gets active focus.
Definition at line 718 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::handleMouseEvent | ( | QMouseEvent * | event | ) |
Handle event on behalf of this delivery agent's window or subscene.
Definition at line 1765 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::handleTouchEvent | ( | QTouchEvent * | event | ) |
Definition at line 1730 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::handleWindowDeactivate | ( | QQuickWindow * | win | ) |
The handler for the QEvent::WindowDeactivate event, and also when Qt::ApplicationState tells us the application is no longer active. It clears all exclusive grabs of items and handlers whose window is this one, for all known pointing devices.
The QEvent is not passed into this function because in the first case it's just a plain QEvent with no extra data, and because the application state change is delivered via a signal rather than an event.
Definition at line 1423 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::handleWindowHidden | ( | QQuickWindow * | win | ) |
Definition at line 1454 of file qquickdeliveryagent.cpp.
|
inline |
Definition at line 113 of file qquickdeliveryagent_p_p.h.
|
static |
Definition at line 1578 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1534 of file qquickdeliveryagent.cpp.
|
static |
|
static |
Definition at line 1516 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1529 of file qquickdeliveryagent.cpp.
|
static |
Returns true
if dev is a type of device that only sends QSinglePointEvents.
Definition at line 1594 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1585 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1559 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 1546 of file qquickdeliveryagent.cpp.
|
static |
Returns false
if the time constraint for detecting a double-click is violated.
Definition at line 78 of file qquickdeliveryagent.cpp.
|
static |
Returns false
if the spatial constraint for detecting a touchscreen double-tap is violated.
Definition at line 86 of file qquickdeliveryagent.cpp.
|
static |
Localize ev for delivery to dest.
Unlike QMutableTouchEvent::localized(), this modifies the QEventPoint instances in ev, which is more efficient than making a copy.
Definition at line 1476 of file qquickdeliveryagent.cpp.
QVector< QQuickItem * > QQuickDeliveryAgentPrivate::mergePointerTargets | ( | const QVector< QQuickItem * > & | list1, |
const QVector< QQuickItem * > & | list2 ) const |
Returns a joined list consisting of the items in list1 and list2. list1 has priority; common items come last.
Definition at line 2211 of file qquickdeliveryagent.cpp.
QPointingDevicePrivate::EventPointData * QQuickDeliveryAgentPrivate::mousePointData | ( | ) |
A helper function for the benefit of obsolete APIs like QQuickItem::grabMouse() that don't have the currently-being-delivered event in context. Returns the device the currently-being-delivered event comse from.
Definition at line 137 of file qquickdeliveryagent.cpp.
|
static |
Definition at line 646 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::onGrabChanged | ( | QObject * | grabber, |
QPointingDevice::GrabTransition | transition, | ||
const QPointerEvent * | event, | ||
const QEventPoint & | point ) |
React to the fact that grabber underwent a grab transition while an item or handler was handling point from event. I.e. handle the QPointingDevice::grabChanged() signal.
This notifies the relevant items and/or pointer handlers, and does cleanup when grabs are lost or relinquished.
Definition at line 1890 of file qquickdeliveryagent.cpp.
QVector< QQuickItem * > QQuickDeliveryAgentPrivate::pointerTargets | ( | QQuickItem * | item, |
const QPointerEvent * | event, | ||
const QEventPoint & | point, | ||
bool | checkMouseButtons, | ||
bool | checkAcceptsTouch ) const |
Returns a list of all items that are spatially relevant to receive event occurring at point, starting with item and recursively checking all the children. \list
true
, it means we are finding targets for a mouse event, so no item for which acceptedMouseButtons() is NoButton will be added. true
, it means we are finding targets for a touch event, so either acceptTouchEvents() must return true or it must accept a synthesized mouse event. I.e. if acceptTouchEvents() returns false, it gets added only if acceptedMouseButtons() is true. true
and the point is outside of QQuickItem::clipRect(), its children are also omitted. (We stop the recursion, because any clipped-off portions of children under point are invisible.) The list returned from this function is the list of items that will be "visited" when delivering any event for which QPointerEvent::isBeginEvent() is true
.
Definition at line 2185 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::removeGrabber | ( | QQuickItem * | grabber, |
bool | mouse = true, | ||
bool | touch = true, | ||
bool | cancel = false ) |
Ungrabs all touchpoint grabs and/or the mouse grab from the given item grabber.
This should not be called when processing a release event - that's redundant. It is called in other cases, when the points may not be released, but the item nevertheless must lose its grab due to becoming disabled, invisible, etc. QPointerEvent::setExclusiveGrabber() calls touchUngrabEvent() when all points are released, but if not all points are released, it cannot be sure whether to call touchUngrabEvent() or not; so we have to do it here.
Definition at line 277 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::resetIfDoubleTapPrevented | ( | const QEventPoint & | pressedPoint | ) |
Definition at line 107 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::sendFilteredMouseEvent | ( | QEvent * | event, |
QQuickItem * | receiver, | ||
QQuickItem * | filteringParent ) |
Allow filteringParent to filter event on behalf of receiver, via QQuickItem::childMouseEventFilter(). This happens right before we would send event to receiver.
Returns true
only if event has been intercepted (by filteringParent or some other filtering ancestor) and should not be sent to receiver.
Unlike sendFilteredPointerEvent(), this version does not synthesize a mouse event from touch (presumably it's already an actual mouse event).
Definition at line 2899 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::sendFilteredPointerEvent | ( | QPointerEvent * | event, |
QQuickItem * | receiver, | ||
QQuickItem * | filteringParent = nullptr ) |
Allow filteringParent to filter event on behalf of receiver, via QQuickItem::childMouseEventFilter(). This happens right before we would send event to receiver.
Returns true
only if event has been intercepted (by filteringParent or some other filtering ancestor) and should not be sent to receiver.
Definition at line 2755 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl | ( | QPointerEvent * | event, |
QQuickItem * | receiver, | ||
QQuickItem * | filteringParent ) |
The recursive implementation of sendFilteredPointerEvent().
Definition at line 2763 of file qquickdeliveryagent.cpp.
bool QQuickDeliveryAgentPrivate::sendHoverEvent | ( | QEvent::Type | type, |
QQuickItem * | item, | ||
const QPointF & | scenePos, | ||
const QPointF & | lastScenePos, | ||
Qt::KeyboardModifiers | modifiers, | ||
ulong | timestamp ) |
Definition at line 1074 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::setFocusInScope | ( | QQuickItem * | scope, |
QQuickItem * | item, | ||
Qt::FocusReason | reason, | ||
FocusOptions | options = { } ) |
Set the focus inside scope to be item.
If the scope contains the active focus item, it will be changed to item. Calls notifyFocusChangesRecur for all changed items.
Definition at line 399 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::touchToMouseEvent | ( | QEvent::Type | type, |
const QEventPoint & | p, | ||
const QTouchEvent * | touchEvent, | ||
QMutableSinglePointEvent * | mouseEvent ) |
Definition at line 58 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::translateTouchEvent | ( | QTouchEvent * | touchEvent | ) |
Translates QEventPoint::scenePosition() in touchEvent to this window.
The item-local QEventPoint::position() is updated later, not here.
Definition at line 352 of file qquickdeliveryagent.cpp.
void QQuickDeliveryAgentPrivate::updateFocusItemTransform | ( | ) |
Definition at line 702 of file qquickdeliveryagent.cpp.
QQuickItem* QQuickDeliveryAgentPrivate::activeFocusItem = nullptr |
Definition at line 56 of file qquickdeliveryagent_p_p.h.
bool QQuickDeliveryAgentPrivate::allowChildEventFiltering = true |
Definition at line 92 of file qquickdeliveryagent_p_p.h.
uchar QQuickDeliveryAgentPrivate::compressedTouchCount = 0 |
Definition at line 91 of file qquickdeliveryagent_p_p.h.
|
static |
Definition at line 99 of file qquickdeliveryagent_p_p.h.
uint QQuickDeliveryAgentPrivate::currentHoverId = 0 |
Definition at line 87 of file qquickdeliveryagent_p_p.h.
std::unique_ptr<QMutableTouchEvent> QQuickDeliveryAgentPrivate::delayedTouch |
Definition at line 84 of file qquickdeliveryagent_p_p.h.
QStack<QPointerEvent *> QQuickDeliveryAgentPrivate::eventsInDelivery |
Definition at line 79 of file qquickdeliveryagent_p_p.h.
bool QQuickDeliveryAgentPrivate::frameSynchronousHoverEnabled = true |
Definition at line 93 of file qquickdeliveryagent_p_p.h.
QVector<QQuickItem *> QQuickDeliveryAgentPrivate::hasFiltered |
Definition at line 81 of file qquickdeliveryagent_p_p.h.
bool QQuickDeliveryAgentPrivate::hoveredLeafItemFound = false |
Definition at line 94 of file qquickdeliveryagent_p_p.h.
QFlatMap<QPointer<QQuickItem>, uint> QQuickDeliveryAgentPrivate::hoverItems |
Definition at line 80 of file qquickdeliveryagent_p_p.h.
bool QQuickDeliveryAgentPrivate::isSubsceneAgent = false |
Definition at line 96 of file qquickdeliveryagent_p_p.h.
QList<const QPointingDevice *> QQuickDeliveryAgentPrivate::knownPointingDevices |
Definition at line 85 of file qquickdeliveryagent_p_p.h.
Qt::FocusReason QQuickDeliveryAgentPrivate::lastFocusReason = Qt::OtherFocusReason |
Definition at line 102 of file qquickdeliveryagent_p_p.h.
QPointF QQuickDeliveryAgentPrivate::lastMousePosition |
Definition at line 122 of file qquickdeliveryagent_p_p.h.
QQuickItem* QQuickDeliveryAgentPrivate::lastUngrabbed = nullptr |
Definition at line 78 of file qquickdeliveryagent_p_p.h.
int QQuickDeliveryAgentPrivate::pointerEventRecursionGuard = 0 |
Definition at line 103 of file qquickdeliveryagent_p_p.h.
QQuickItem* QQuickDeliveryAgentPrivate::rootItem = nullptr |
Definition at line 54 of file qquickdeliveryagent_p_p.h.
QQuickDeliveryAgent::Transform* QQuickDeliveryAgentPrivate::sceneTransform = nullptr |
Definition at line 111 of file qquickdeliveryagent_p_p.h.
QVector<QQuickItem *> QQuickDeliveryAgentPrivate::skipDelivery |
Definition at line 82 of file qquickdeliveryagent_p_p.h.
|
static |
Definition at line 97 of file qquickdeliveryagent_p_p.h.
const QPointingDevice* QQuickDeliveryAgentPrivate::touchMouseDevice = nullptr |
Definition at line 107 of file qquickdeliveryagent_p_p.h.
int QQuickDeliveryAgentPrivate::touchMouseId = -1 |
Definition at line 105 of file qquickdeliveryagent_p_p.h.
QPoint QQuickDeliveryAgentPrivate::touchMousePressPos |
Definition at line 109 of file qquickdeliveryagent_p_p.h.
ulong QQuickDeliveryAgentPrivate::touchMousePressTimestamp = 0 |
Definition at line 108 of file qquickdeliveryagent_p_p.h.