Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickpointerhandler_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKPOINTERHANDLER_P_H
5#define QQUICKPOINTERHANDLER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qevent.h"
19
20#include <QtCore/private/qobject_p.h>
21#include <QtQuick/private/qquickevents_p_p.h>
22#include <QtQuick/private/qquickpointerhandler_p.h>
23
25
26class Q_QUICK_EXPORT QQuickPointerHandlerPrivate : public QObjectPrivate
27{
28 Q_DECLARE_PUBLIC(QQuickPointerHandler)
29
30public:
31 static QQuickPointerHandlerPrivate* get(QQuickPointerHandler *q) { return q->d_func(); }
32 static const QQuickPointerHandlerPrivate* get(const QQuickPointerHandler *q) { return q->d_func(); }
33
35
36 template<typename TEventPoint>
37 bool dragOverThreshold(qreal d, Qt::Axis axis, const TEventPoint &p) const;
38
39 bool dragOverThreshold(QVector2D delta) const;
40 bool dragOverThreshold(const QEventPoint &point) const;
41
42 virtual void onParentChanged(QQuickItem * /*oldParent*/, QQuickItem * /*newParent*/) {}
43 virtual void onEnabledChanged() {}
44
45 static QVector<QObject *> &deviceDeliveryTargets(const QInputDevice *device);
46
47 QPointerEvent *currentEvent = nullptr;
48 QQuickItem *target = nullptr;
49 qreal m_margin = 0;
50 quint64 lastEventTime = 0;
51 qint16 dragThreshold = -1; // -1 means use the platform default
52 uint8_t grabPermissions : 8;
54 bool enabled : 1;
55 bool active : 1;
57 bool hadKeepMouseGrab : 1; // some handlers override target()->setKeepMouseGrab(); this remembers previous state
58 bool hadKeepTouchGrab : 1; // some handlers override target()->setKeepTouchGrab(); this remembers previous state
59 bool cursorSet : 1;
60 bool cursorDirty : 1;
61};
62
64
65#endif // QQUICKPOINTERHANDLER_P_H
IOBluetoothDevice * device
The QEventPoint class provides information about a point in a QPointerEvent.
Definition qeventpoint.h:20
The QInputDevice class describes a device from which a QInputEvent originates.
A base class for pointer events.
Definition qevent.h:73
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
static QQuickPointerHandlerPrivate * get(QQuickPointerHandler *q)
virtual void onParentChanged(QQuickItem *, QQuickItem *)
static const QQuickPointerHandlerPrivate * get(const QQuickPointerHandler *q)
The QVector2D class represents a vector or vertex in 2D space.
Definition qvectornd.h:31
Combined button and popup list for selecting options.
CursorShape
GLenum target
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
GLfloat GLfloat p
[1]
short qint16
Definition qtypes.h:47
unsigned long long quint64
Definition qtypes.h:61
double qreal
Definition qtypes.h:187