Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickevents_p_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||
5 | class QQuickPointerDevice; | - | ||||||||||||||||||||||||
6 | class QQuickPointerEvent; | - | ||||||||||||||||||||||||
7 | class QQuickPointerMouseEvent; | - | ||||||||||||||||||||||||
8 | - | |||||||||||||||||||||||||
9 | class QQuickPointerNativeGestureEvent; | - | ||||||||||||||||||||||||
10 | - | |||||||||||||||||||||||||
11 | class QQuickPointerScrollEvent; | - | ||||||||||||||||||||||||
12 | class QQuickPointerTabletEvent; | - | ||||||||||||||||||||||||
13 | class QQuickPointerTouchEvent; | - | ||||||||||||||||||||||||
14 | class QQuickPointerHandler; | - | ||||||||||||||||||||||||
15 | - | |||||||||||||||||||||||||
16 | class QQuickKeyEvent : public QObject | - | ||||||||||||||||||||||||
17 | { | - | ||||||||||||||||||||||||
18 | public: | - | ||||||||||||||||||||||||
19 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||
21 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
22 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
23 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
24 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
25 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
26 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
27 | - | |||||||||||||||||||||||||
28 | - | |||||||||||||||||||||||||
29 | - | |||||||||||||||||||||||||
30 | - | |||||||||||||||||||||||||
31 | - | |||||||||||||||||||||||||
32 | - | |||||||||||||||||||||||||
33 | - | |||||||||||||||||||||||||
34 | - | |||||||||||||||||||||||||
35 | public: | - | ||||||||||||||||||||||||
36 | QQuickKeyEvent() | - | ||||||||||||||||||||||||
37 | : event(QEvent::None, 0, nullptr) | - | ||||||||||||||||||||||||
38 | {} executed 320 times by 8 tests: end of block Executed by:
| 320 | ||||||||||||||||||||||||
39 | - | |||||||||||||||||||||||||
40 | void reset(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, | - | ||||||||||||||||||||||||
41 | const QString &text = QString(), bool autorep = false, ushort count = 1) | - | ||||||||||||||||||||||||
42 | { | - | ||||||||||||||||||||||||
43 | event = QKeyEvent(type, key, modifiers, text, autorep, count); | - | ||||||||||||||||||||||||
44 | event.setAccepted(false); | - | ||||||||||||||||||||||||
45 | } never executed: end of block | 0 | ||||||||||||||||||||||||
46 | - | |||||||||||||||||||||||||
47 | void reset(const QKeyEvent &ke) | - | ||||||||||||||||||||||||
48 | { | - | ||||||||||||||||||||||||
49 | event = ke; | - | ||||||||||||||||||||||||
50 | event.setAccepted(false); | - | ||||||||||||||||||||||||
51 | } executed 156 times by 3 tests: end of block Executed by:
| 156 | ||||||||||||||||||||||||
52 | - | |||||||||||||||||||||||||
53 | int key() const { return executed 88 times by 2 tests: event.key();return event.key(); Executed by:
executed 88 times by 2 tests: }return event.key(); Executed by:
| 88 | ||||||||||||||||||||||||
54 | QString text() const { return executed 18 times by 1 test: event.text();return event.text(); Executed by:
executed 18 times by 1 test: }return event.text(); Executed by:
| 18 | ||||||||||||||||||||||||
55 | int modifiers() const { return executed 24 times by 1 test: event.modifiers();return event.modifiers(); Executed by:
executed 24 times by 1 test: }return event.modifiers(); Executed by:
| 24 | ||||||||||||||||||||||||
56 | bool isAutoRepeat() const { return never executed: event.isAutoRepeat();return event.isAutoRepeat(); never executed: }return event.isAutoRepeat(); | 0 | ||||||||||||||||||||||||
57 | int count() const { return never executed: event.count();return event.count(); never executed: }return event.count(); | 0 | ||||||||||||||||||||||||
58 | quint32 nativeScanCode() const { return executed 2 times by 1 test: event.nativeScanCode();return event.nativeScanCode(); Executed by:
executed 2 times by 1 test: }return event.nativeScanCode(); Executed by:
| 2 | ||||||||||||||||||||||||
59 | - | |||||||||||||||||||||||||
60 | bool isAccepted() { return executed 244 times by 3 tests: event.isAccepted();return event.isAccepted(); Executed by:
executed 244 times by 3 tests: }return event.isAccepted(); Executed by:
| 244 | ||||||||||||||||||||||||
61 | void setAccepted(bool accepted) { event.setAccepted(accepted); } executed 48 times by 3 tests: end of block Executed by:
| 48 | ||||||||||||||||||||||||
62 | - | |||||||||||||||||||||||||
63 | - | |||||||||||||||||||||||||
64 | bool matches(QKeySequence::StandardKey key) const { return executed 24 times by 1 test: event.matches(key);return event.matches(key); Executed by:
executed 24 times by 1 test: }return event.matches(key); Executed by:
| 24 | ||||||||||||||||||||||||
65 | - | |||||||||||||||||||||||||
66 | - | |||||||||||||||||||||||||
67 | private: | - | ||||||||||||||||||||||||
68 | QKeyEvent event; | - | ||||||||||||||||||||||||
69 | }; | - | ||||||||||||||||||||||||
70 | - | |||||||||||||||||||||||||
71 | - | |||||||||||||||||||||||||
72 | class __attribute__((visibility("default"))) QQuickMouseEvent : public QObject | - | ||||||||||||||||||||||||
73 | { | - | ||||||||||||||||||||||||
74 | public: | - | ||||||||||||||||||||||||
75 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
76 | - | |||||||||||||||||||||||||
77 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
78 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
79 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
80 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
81 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
82 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
83 | - | |||||||||||||||||||||||||
84 | - | |||||||||||||||||||||||||
85 | - | |||||||||||||||||||||||||
86 | - | |||||||||||||||||||||||||
87 | - | |||||||||||||||||||||||||
88 | - | |||||||||||||||||||||||||
89 | - | |||||||||||||||||||||||||
90 | - | |||||||||||||||||||||||||
91 | - | |||||||||||||||||||||||||
92 | - | |||||||||||||||||||||||||
93 | - | |||||||||||||||||||||||||
94 | public: | - | ||||||||||||||||||||||||
95 | QQuickMouseEvent() | - | ||||||||||||||||||||||||
96 | : _buttons(Qt::NoButton), _modifiers(Qt::NoModifier) | - | ||||||||||||||||||||||||
97 | , _wasHeld(false), _isClick(false), _accepted(false) | - | ||||||||||||||||||||||||
98 | , _flags(Qt::MouseEventFlags(nullptr)) | - | ||||||||||||||||||||||||
99 | {} executed 2016 times by 24 tests: end of block Executed by:
| 2016 | ||||||||||||||||||||||||
100 | - | |||||||||||||||||||||||||
101 | void reset(qreal x, qreal y, Qt::MouseButton button, Qt::MouseButtons buttons, | - | ||||||||||||||||||||||||
102 | Qt::KeyboardModifiers modifiers, bool isClick = false, bool wasHeld = false, | - | ||||||||||||||||||||||||
103 | Qt::MouseEventFlags flags = nullptr) | - | ||||||||||||||||||||||||
104 | { | - | ||||||||||||||||||||||||
105 | _x = x; | - | ||||||||||||||||||||||||
106 | _y = y; | - | ||||||||||||||||||||||||
107 | _button = button; | - | ||||||||||||||||||||||||
108 | _buttons = buttons; | - | ||||||||||||||||||||||||
109 | _modifiers = modifiers; | - | ||||||||||||||||||||||||
110 | _source = Qt::MouseEventNotSynthesized; | - | ||||||||||||||||||||||||
111 | _wasHeld = wasHeld; | - | ||||||||||||||||||||||||
112 | _isClick = isClick; | - | ||||||||||||||||||||||||
113 | _accepted = true; | - | ||||||||||||||||||||||||
114 | _flags = flags; | - | ||||||||||||||||||||||||
115 | } executed 1005 times by 9 tests: end of block Executed by:
| 1005 | ||||||||||||||||||||||||
116 | - | |||||||||||||||||||||||||
117 | qreal x() const { return executed 26 times by 1 test: _x;return _x; Executed by:
executed 26 times by 1 test: }return _x; Executed by:
| 26 | ||||||||||||||||||||||||
118 | qreal y() const { return executed 26 times by 1 test: _y;return _y; Executed by:
executed 26 times by 1 test: }return _y; Executed by:
| 26 | ||||||||||||||||||||||||
119 | int button() const { return executed 18 times by 1 test: _button;return _button; Executed by:
executed 18 times by 1 test: }return _button; Executed by:
| 18 | ||||||||||||||||||||||||
120 | int buttons() const { return never executed: _buttons;return _buttons; never executed: }return _buttons; | 0 | ||||||||||||||||||||||||
121 | int modifiers() const { return never executed: _modifiers;return _modifiers; never executed: }return _modifiers; | 0 | ||||||||||||||||||||||||
122 | int source() const { return executed 16 times by 1 test: _source;return _source; Executed by:
executed 16 times by 1 test: }return _source; Executed by:
| 16 | ||||||||||||||||||||||||
123 | bool wasHeld() const { return never executed: _wasHeld;return _wasHeld; never executed: }return _wasHeld; | 0 | ||||||||||||||||||||||||
124 | bool isClick() const { return never executed: _isClick;return _isClick; never executed: }return _isClick; | 0 | ||||||||||||||||||||||||
125 | - | |||||||||||||||||||||||||
126 | - | |||||||||||||||||||||||||
127 | void setX(qreal x) { _x = x; } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||
128 | void setY(qreal y) { _y = y; } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||
129 | void setPosition(const QPointF &point) { _x = point.x(); _y = point.y(); } executed 1668 times by 9 tests: end of block Executed by:
| 1668 | ||||||||||||||||||||||||
130 | void setSource(Qt::MouseEventSource s) { _source = s; } executed 971 times by 7 tests: end of block Executed by:
| 971 | ||||||||||||||||||||||||
131 | - | |||||||||||||||||||||||||
132 | bool isAccepted() { return executed 1044 times by 7 tests: _accepted;return _accepted; Executed by:
executed 1044 times by 7 tests: }return _accepted; Executed by:
| 1044 | ||||||||||||||||||||||||
133 | void setAccepted(bool accepted) { _accepted = accepted; } executed 248 times by 4 tests: end of block Executed by:
| 248 | ||||||||||||||||||||||||
134 | int flags() const { return never executed: _flags;return _flags; never executed: }return _flags; | 0 | ||||||||||||||||||||||||
135 | private: | - | ||||||||||||||||||||||||
136 | qreal _x = 0; | - | ||||||||||||||||||||||||
137 | qreal _y = 0; | - | ||||||||||||||||||||||||
138 | Qt::MouseButton _button = Qt::NoButton; | - | ||||||||||||||||||||||||
139 | Qt::MouseButtons _buttons; | - | ||||||||||||||||||||||||
140 | Qt::KeyboardModifiers _modifiers; | - | ||||||||||||||||||||||||
141 | Qt::MouseEventSource _source = Qt::MouseEventNotSynthesized; | - | ||||||||||||||||||||||||
142 | bool _wasHeld : 1; | - | ||||||||||||||||||||||||
143 | bool _isClick : 1; | - | ||||||||||||||||||||||||
144 | bool _accepted : 1; | - | ||||||||||||||||||||||||
145 | Qt::MouseEventFlags _flags; | - | ||||||||||||||||||||||||
146 | }; | - | ||||||||||||||||||||||||
147 | - | |||||||||||||||||||||||||
148 | class QQuickWheelEvent : public QObject | - | ||||||||||||||||||||||||
149 | { | - | ||||||||||||||||||||||||
150 | public: | - | ||||||||||||||||||||||||
151 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
152 | - | |||||||||||||||||||||||||
153 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
154 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
155 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
156 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
157 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
158 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
159 | - | |||||||||||||||||||||||||
160 | - | |||||||||||||||||||||||||
161 | - | |||||||||||||||||||||||||
162 | - | |||||||||||||||||||||||||
163 | - | |||||||||||||||||||||||||
164 | - | |||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||
166 | - | |||||||||||||||||||||||||
167 | - | |||||||||||||||||||||||||
168 | public: | - | ||||||||||||||||||||||||
169 | QQuickWheelEvent() | - | ||||||||||||||||||||||||
170 | : _buttons(Qt::NoButton), _modifiers(Qt::NoModifier) | - | ||||||||||||||||||||||||
171 | {} executed 2016 times by 24 tests: end of block Executed by:
| 2016 | ||||||||||||||||||||||||
172 | - | |||||||||||||||||||||||||
173 | void reset(qreal x, qreal y, const QPoint &angleDelta, const QPoint &pixelDelta, | - | ||||||||||||||||||||||||
174 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, bool inverted) | - | ||||||||||||||||||||||||
175 | { | - | ||||||||||||||||||||||||
176 | _x = x; | - | ||||||||||||||||||||||||
177 | _y = y; | - | ||||||||||||||||||||||||
178 | _angleDelta = angleDelta; | - | ||||||||||||||||||||||||
179 | _pixelDelta = pixelDelta; | - | ||||||||||||||||||||||||
180 | _buttons = buttons; | - | ||||||||||||||||||||||||
181 | _modifiers = modifiers; | - | ||||||||||||||||||||||||
182 | _accepted = true; | - | ||||||||||||||||||||||||
183 | _inverted = inverted; | - | ||||||||||||||||||||||||
184 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
185 | - | |||||||||||||||||||||||||
186 | qreal x() const { return executed 2 times by 1 test: _x;return _x; Executed by:
executed 2 times by 1 test: }return _x; Executed by:
| 2 | ||||||||||||||||||||||||
187 | qreal y() const { return executed 2 times by 1 test: _y;return _y; Executed by:
executed 2 times by 1 test: }return _y; Executed by:
| 2 | ||||||||||||||||||||||||
188 | QPoint angleDelta() const { return executed 2 times by 1 test: _angleDelta;return _angleDelta; Executed by:
executed 2 times by 1 test: }return _angleDelta; Executed by:
| 2 | ||||||||||||||||||||||||
189 | QPoint pixelDelta() const { return never executed: _pixelDelta;return _pixelDelta; never executed: }return _pixelDelta; | 0 | ||||||||||||||||||||||||
190 | int buttons() const { return never executed: _buttons;return _buttons; never executed: }return _buttons; | 0 | ||||||||||||||||||||||||
191 | int modifiers() const { return executed 2 times by 1 test: _modifiers;return _modifiers; Executed by:
executed 2 times by 1 test: }return _modifiers; Executed by:
| 2 | ||||||||||||||||||||||||
192 | bool inverted() const { return never executed: _inverted;return _inverted; never executed: }return _inverted; | 0 | ||||||||||||||||||||||||
193 | bool isAccepted() { return executed 2 times by 1 test: _accepted;return _accepted; Executed by:
executed 2 times by 1 test: }return _accepted; Executed by:
| 2 | ||||||||||||||||||||||||
194 | void setAccepted(bool accepted) { _accepted = accepted; } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
195 | - | |||||||||||||||||||||||||
196 | private: | - | ||||||||||||||||||||||||
197 | qreal _x = 0; | - | ||||||||||||||||||||||||
198 | qreal _y = 0; | - | ||||||||||||||||||||||||
199 | QPoint _angleDelta; | - | ||||||||||||||||||||||||
200 | QPoint _pixelDelta; | - | ||||||||||||||||||||||||
201 | Qt::MouseButtons _buttons; | - | ||||||||||||||||||||||||
202 | Qt::KeyboardModifiers _modifiers; | - | ||||||||||||||||||||||||
203 | bool _inverted = false; | - | ||||||||||||||||||||||||
204 | bool _accepted = false; | - | ||||||||||||||||||||||||
205 | }; | - | ||||||||||||||||||||||||
206 | - | |||||||||||||||||||||||||
207 | class __attribute__((visibility("default"))) QQuickCloseEvent : public QObject | - | ||||||||||||||||||||||||
208 | { | - | ||||||||||||||||||||||||
209 | public: | - | ||||||||||||||||||||||||
210 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
211 | - | |||||||||||||||||||||||||
212 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
213 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
214 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
215 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
216 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
217 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
218 | - | |||||||||||||||||||||||||
219 | - | |||||||||||||||||||||||||
220 | public: | - | ||||||||||||||||||||||||
221 | QQuickCloseEvent() {} | - | ||||||||||||||||||||||||
222 | - | |||||||||||||||||||||||||
223 | bool isAccepted() { return executed 12 times by 1 test: _accepted;return _accepted; Executed by:
executed 12 times by 1 test: }return _accepted; Executed by:
| 12 | ||||||||||||||||||||||||
224 | void setAccepted(bool accepted) { _accepted = accepted; } executed 16 times by 1 test: end of block Executed by:
| 16 | ||||||||||||||||||||||||
225 | - | |||||||||||||||||||||||||
226 | private: | - | ||||||||||||||||||||||||
227 | bool _accepted = true; | - | ||||||||||||||||||||||||
228 | }; | - | ||||||||||||||||||||||||
229 | - | |||||||||||||||||||||||||
230 | class __attribute__((visibility("default"))) QQuickEventPoint : public QObject | - | ||||||||||||||||||||||||
231 | { | - | ||||||||||||||||||||||||
232 | public: | - | ||||||||||||||||||||||||
233 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
234 | - | |||||||||||||||||||||||||
235 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
236 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
237 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
238 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
239 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
240 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||
242 | - | |||||||||||||||||||||||||
243 | - | |||||||||||||||||||||||||
244 | - | |||||||||||||||||||||||||
245 | - | |||||||||||||||||||||||||
246 | - | |||||||||||||||||||||||||
247 | - | |||||||||||||||||||||||||
248 | - | |||||||||||||||||||||||||
249 | - | |||||||||||||||||||||||||
250 | - | |||||||||||||||||||||||||
251 | - | |||||||||||||||||||||||||
252 | - | |||||||||||||||||||||||||
253 | public: | - | ||||||||||||||||||||||||
254 | enum State { | - | ||||||||||||||||||||||||
255 | Pressed = Qt::TouchPointPressed, | - | ||||||||||||||||||||||||
256 | Updated = Qt::TouchPointMoved, | - | ||||||||||||||||||||||||
257 | Stationary = Qt::TouchPointStationary, | - | ||||||||||||||||||||||||
258 | Released = Qt::TouchPointReleased | - | ||||||||||||||||||||||||
259 | }; | - | ||||||||||||||||||||||||
260 | typedef QFlags<State> States; | - | ||||||||||||||||||||||||
261 | friend constexpr const QMetaObject *qt_getEnumMetaObject(States) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(States) noexcept { return "States"; } | - | ||||||||||||||||||||||||
262 | - | |||||||||||||||||||||||||
263 | enum GrabState { | - | ||||||||||||||||||||||||
264 | GrabPassive = 0x01, | - | ||||||||||||||||||||||||
265 | UngrabPassive = 0x02, | - | ||||||||||||||||||||||||
266 | CancelGrabPassive = 0x03, | - | ||||||||||||||||||||||||
267 | OverrideGrabPassive = 0x04, | - | ||||||||||||||||||||||||
268 | GrabExclusive = 0x10, | - | ||||||||||||||||||||||||
269 | UngrabExclusive = 0x20, | - | ||||||||||||||||||||||||
270 | CancelGrabExclusive = 0x30, | - | ||||||||||||||||||||||||
271 | }; | - | ||||||||||||||||||||||||
272 | friend constexpr const QMetaObject *qt_getEnumMetaObject(GrabState) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(GrabState) noexcept { return "GrabState"; } | - | ||||||||||||||||||||||||
273 | - | |||||||||||||||||||||||||
274 | QQuickEventPoint(QQuickPointerEvent *parent); | - | ||||||||||||||||||||||||
275 | - | |||||||||||||||||||||||||
276 | void reset(Qt::TouchPointState state, const QPointF &scenePosition, int pointId, ulong timestamp, const QVector2D &velocity = QVector2D()); | - | ||||||||||||||||||||||||
277 | void localizePosition(QQuickItem *target); | - | ||||||||||||||||||||||||
278 | - | |||||||||||||||||||||||||
279 | QQuickPointerEvent *pointerEvent() const; | - | ||||||||||||||||||||||||
280 | QPointF position() const { return executed 2377 times by 6 tests: m_pos;return m_pos; Executed by:
executed 2377 times by 6 tests: }return m_pos; Executed by:
| 2377 | ||||||||||||||||||||||||
281 | QPointF scenePosition() const { return executed 96491 times by 19 tests: m_scenePos;return m_scenePos; Executed by:
executed 96491 times by 19 tests: }return m_scenePos; Executed by:
| 96491 | ||||||||||||||||||||||||
282 | QPointF scenePressPosition() const { return executed 4172 times by 11 tests: m_scenePressPos;return m_scenePressPos; Executed by:
executed 4172 times by 11 tests: }return m_scenePressPos; Executed by:
| 4172 | ||||||||||||||||||||||||
283 | QPointF sceneGrabPosition() const { return executed 1972 times by 11 tests: m_sceneGrabPos;return m_sceneGrabPos; Executed by:
executed 1972 times by 11 tests: }return m_sceneGrabPos; Executed by:
| 1972 | ||||||||||||||||||||||||
284 | QVector2D velocity() const { return executed 1359 times by 4 tests: m_velocity;return m_velocity; Executed by:
executed 1359 times by 4 tests: }return m_velocity; Executed by:
| 1359 | ||||||||||||||||||||||||
285 | State state() const { return executed 37108 times by 19 tests: m_state;return m_state; Executed by:
executed 37108 times by 19 tests: }return m_state; Executed by:
| 37108 | ||||||||||||||||||||||||
286 | int pointId() const { return executed 23446 times by 11 tests: m_pointId;return m_pointId; Executed by:
executed 23446 times by 11 tests: }return m_pointId; Executed by:
| 23446 | ||||||||||||||||||||||||
287 | qreal timeHeld() const { return executed 64 times by 2 tests: (m_timestamp - m_pressTimestamp) / 1000.0;return (m_timestamp - m_pressTimestamp) / 1000.0; Executed by:
executed 64 times by 2 tests: }return (m_timestamp - m_pressTimestamp) / 1000.0; Executed by:
| 64 | ||||||||||||||||||||||||
288 | bool isAccepted() const { return executed 20675 times by 17 tests: m_accept;return m_accept; Executed by:
executed 20675 times by 17 tests: }return m_accept; Executed by:
| 20675 | ||||||||||||||||||||||||
289 | void setAccepted(bool accepted = true); | - | ||||||||||||||||||||||||
290 | QObject *exclusiveGrabber() const; | - | ||||||||||||||||||||||||
291 | void setExclusiveGrabber(QObject *exclusiveGrabber); | - | ||||||||||||||||||||||||
292 | - | |||||||||||||||||||||||||
293 | QQuickItem *grabberItem() const; | - | ||||||||||||||||||||||||
294 | void setGrabberItem(QQuickItem *exclusiveGrabber); | - | ||||||||||||||||||||||||
295 | - | |||||||||||||||||||||||||
296 | QQuickPointerHandler *grabberPointerHandler() const; | - | ||||||||||||||||||||||||
297 | void setGrabberPointerHandler(QQuickPointerHandler *exclusiveGrabber, bool exclusive = false); | - | ||||||||||||||||||||||||
298 | - | |||||||||||||||||||||||||
299 | void cancelExclusiveGrab(); | - | ||||||||||||||||||||||||
300 | void cancelPassiveGrab(QQuickPointerHandler *handler); | - | ||||||||||||||||||||||||
301 | bool removePassiveGrabber(QQuickPointerHandler *handler); | - | ||||||||||||||||||||||||
302 | void cancelAllGrabs(QQuickPointerHandler *handler); | - | ||||||||||||||||||||||||
303 | - | |||||||||||||||||||||||||
304 | QVector<QPointer <QQuickPointerHandler> > passiveGrabbers() const { return executed 11650 times by 19 tests: m_passiveGrabbers;return m_passiveGrabbers; Executed by:
executed 11650 times by 19 tests: }return m_passiveGrabbers; Executed by:
| 11650 | ||||||||||||||||||||||||
305 | void setPassiveGrabbers(const QVector<QPointer <QQuickPointerHandler> > &grabbers) { m_passiveGrabbers = grabbers; } never executed: end of block | 0 | ||||||||||||||||||||||||
306 | void clearPassiveGrabbers() { m_passiveGrabbers.clear(); } executed 4184 times by 17 tests: end of block Executed by:
| 4184 | ||||||||||||||||||||||||
307 | - | |||||||||||||||||||||||||
308 | protected: | - | ||||||||||||||||||||||||
309 | void cancelExclusiveGrabImpl(QTouchEvent *cancelEvent = nullptr); | - | ||||||||||||||||||||||||
310 | - | |||||||||||||||||||||||||
311 | private: | - | ||||||||||||||||||||||||
312 | QVector2D estimatedVelocity() const; | - | ||||||||||||||||||||||||
313 | - | |||||||||||||||||||||||||
314 | protected: | - | ||||||||||||||||||||||||
315 | QPointF m_pos; | - | ||||||||||||||||||||||||
316 | QPointF m_scenePos; | - | ||||||||||||||||||||||||
317 | QPointF m_scenePressPos; | - | ||||||||||||||||||||||||
318 | QPointF m_sceneGrabPos; | - | ||||||||||||||||||||||||
319 | QVector2D m_velocity; | - | ||||||||||||||||||||||||
320 | int m_pointId; | - | ||||||||||||||||||||||||
321 | QPointer<QObject> m_exclusiveGrabber; | - | ||||||||||||||||||||||||
322 | QVector<QPointer <QQuickPointerHandler> > m_passiveGrabbers; | - | ||||||||||||||||||||||||
323 | ulong m_timestamp; | - | ||||||||||||||||||||||||
324 | ulong m_pressTimestamp; | - | ||||||||||||||||||||||||
325 | State m_state; | - | ||||||||||||||||||||||||
326 | bool m_accept : 1; | - | ||||||||||||||||||||||||
327 | bool m_grabberIsHandler : 1; | - | ||||||||||||||||||||||||
328 | int m_reserved : 29; | - | ||||||||||||||||||||||||
329 | - | |||||||||||||||||||||||||
330 | friend class QQuickPointerTouchEvent; | - | ||||||||||||||||||||||||
331 | friend class QQuickWindowPrivate; | - | ||||||||||||||||||||||||
332 | - | |||||||||||||||||||||||||
333 | QQuickEventPoint(const QQuickEventPoint &) = delete; QQuickEventPoint &operator=(const QQuickEventPoint &) = delete; | - | ||||||||||||||||||||||||
334 | }; | - | ||||||||||||||||||||||||
335 | - | |||||||||||||||||||||||||
336 | class __attribute__((visibility("default"))) QQuickEventTouchPoint : public QQuickEventPoint | - | ||||||||||||||||||||||||
337 | { | - | ||||||||||||||||||||||||
338 | public: | - | ||||||||||||||||||||||||
339 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
340 | - | |||||||||||||||||||||||||
341 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
342 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
343 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
344 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
345 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
346 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
347 | - | |||||||||||||||||||||||||
348 | - | |||||||||||||||||||||||||
349 | - | |||||||||||||||||||||||||
350 | - | |||||||||||||||||||||||||
351 | - | |||||||||||||||||||||||||
352 | public: | - | ||||||||||||||||||||||||
353 | QQuickEventTouchPoint(QQuickPointerTouchEvent *parent); | - | ||||||||||||||||||||||||
354 | - | |||||||||||||||||||||||||
355 | void reset(const QTouchEvent::TouchPoint &tp, ulong timestamp); | - | ||||||||||||||||||||||||
356 | - | |||||||||||||||||||||||||
357 | qreal rotation() const { return executed 1320 times by 4 tests: m_rotation;return m_rotation; Executed by:
executed 1320 times by 4 tests: }return m_rotation; Executed by:
| 1320 | ||||||||||||||||||||||||
358 | qreal pressure() const { return executed 1413 times by 4 tests: m_pressure;return m_pressure; Executed by:
executed 1413 times by 4 tests: }return m_pressure; Executed by:
| 1413 | ||||||||||||||||||||||||
359 | QSizeF ellipseDiameters() const { return executed 1413 times by 4 tests: m_ellipseDiameters;return m_ellipseDiameters; Executed by:
executed 1413 times by 4 tests: }return m_ellipseDiameters; Executed by:
| 1413 | ||||||||||||||||||||||||
360 | QPointingDeviceUniqueId uniqueId() const { return executed 1320 times by 4 tests: m_uniqueId;return m_uniqueId; Executed by:
executed 1320 times by 4 tests: }return m_uniqueId; Executed by:
| 1320 | ||||||||||||||||||||||||
361 | - | |||||||||||||||||||||||||
362 | private: | - | ||||||||||||||||||||||||
363 | qreal m_rotation; | - | ||||||||||||||||||||||||
364 | qreal m_pressure; | - | ||||||||||||||||||||||||
365 | QSizeF m_ellipseDiameters; | - | ||||||||||||||||||||||||
366 | QPointingDeviceUniqueId m_uniqueId; | - | ||||||||||||||||||||||||
367 | - | |||||||||||||||||||||||||
368 | friend class QQuickPointerTouchEvent; | - | ||||||||||||||||||||||||
369 | - | |||||||||||||||||||||||||
370 | QQuickEventTouchPoint(const QQuickEventTouchPoint &) = delete; QQuickEventTouchPoint &operator=(const QQuickEventTouchPoint &) = delete; | - | ||||||||||||||||||||||||
371 | }; | - | ||||||||||||||||||||||||
372 | - | |||||||||||||||||||||||||
373 | class __attribute__((visibility("default"))) QQuickPointerEvent : public QObject | - | ||||||||||||||||||||||||
374 | { | - | ||||||||||||||||||||||||
375 | public: | - | ||||||||||||||||||||||||
376 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
377 | - | |||||||||||||||||||||||||
378 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
379 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
380 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
381 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
382 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
383 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
384 | - | |||||||||||||||||||||||||
385 | - | |||||||||||||||||||||||||
386 | - | |||||||||||||||||||||||||
387 | - | |||||||||||||||||||||||||
388 | - | |||||||||||||||||||||||||
389 | public: | - | ||||||||||||||||||||||||
390 | QQuickPointerEvent(QObject *parent = nullptr, QQuickPointerDevice *device = nullptr) | - | ||||||||||||||||||||||||
391 | : QObject(parent) | - | ||||||||||||||||||||||||
392 | , m_device(device) | - | ||||||||||||||||||||||||
393 | , m_pressedButtons(Qt::NoButton) | - | ||||||||||||||||||||||||
394 | {} executed 692 times by 19 tests: end of block Executed by:
| 692 | ||||||||||||||||||||||||
395 | - | |||||||||||||||||||||||||
396 | ~QQuickPointerEvent() override; | - | ||||||||||||||||||||||||
397 | - | |||||||||||||||||||||||||
398 | public: | - | ||||||||||||||||||||||||
399 | QQuickPointerDevice *device() const { return executed 102197 times by 19 tests: m_device;return m_device; Executed by:
executed 102197 times by 19 tests: }return m_device; Executed by:
| 102197 | ||||||||||||||||||||||||
400 | Qt::KeyboardModifiers modifiers() const { return executed 1553 times by 6 tests: m_event ? m_event->modifiers() : Qt::NoModifier;return m_event ? m_event->modifiers() : Qt::NoModifier; Executed by:
executed 1553 times by 6 tests: }return m_event ? m_event->modifiers() : Qt::NoModifier; Executed by:
| 1553 | ||||||||||||||||||||||||
401 | Qt::MouseButton button() const { return executed 10261 times by 15 tests: m_button;return m_button; Executed by:
executed 10261 times by 15 tests: }return m_button; Executed by:
| 10261 | ||||||||||||||||||||||||
402 | Qt::MouseButtons buttons() const { return executed 7529 times by 18 tests: m_pressedButtons;return m_pressedButtons; Executed by:
executed 7529 times by 18 tests: }return m_pressedButtons; Executed by:
| 7529 | ||||||||||||||||||||||||
403 | - | |||||||||||||||||||||||||
404 | public: | - | ||||||||||||||||||||||||
405 | virtual QQuickPointerEvent *reset(QEvent *ev) = 0; | - | ||||||||||||||||||||||||
406 | virtual void localize(QQuickItem *target) = 0; | - | ||||||||||||||||||||||||
407 | - | |||||||||||||||||||||||||
408 | virtual bool isPressEvent() const = 0; | - | ||||||||||||||||||||||||
409 | virtual bool isDoubleClickEvent() const { return executed 2692 times by 11 tests: false;return false; Executed by:
executed 2692 times by 11 tests: }return false; Executed by:
| 2692 | ||||||||||||||||||||||||
410 | virtual bool isUpdateEvent() const = 0; | - | ||||||||||||||||||||||||
411 | virtual bool isReleaseEvent() const = 0; | - | ||||||||||||||||||||||||
412 | virtual QQuickPointerMouseEvent *asPointerMouseEvent() { return executed 5001 times by 11 tests: nullptr;return nullptr; Executed by:
executed 5001 times by 11 tests: }return nullptr; Executed by:
| 5001 | ||||||||||||||||||||||||
413 | virtual QQuickPointerTouchEvent *asPointerTouchEvent() { return executed 1824 times by 15 tests: nullptr;return nullptr; Executed by:
executed 1824 times by 15 tests: }return nullptr; Executed by:
| 1824 | ||||||||||||||||||||||||
414 | virtual QQuickPointerTabletEvent *asPointerTabletEvent() { return never executed: nullptr;return nullptr; never executed: }return nullptr; | 0 | ||||||||||||||||||||||||
415 | - | |||||||||||||||||||||||||
416 | virtual QQuickPointerNativeGestureEvent *asPointerNativeGestureEvent() { return executed 151 times by 2 tests: nullptr;return nullptr; Executed by:
executed 151 times by 2 tests: }return nullptr; Executed by:
| 151 | ||||||||||||||||||||||||
417 | - | |||||||||||||||||||||||||
418 | virtual QQuickPointerScrollEvent *asPointerScrollEvent() { return never executed: nullptr;return nullptr; never executed: }return nullptr; | 0 | ||||||||||||||||||||||||
419 | virtual const QQuickPointerMouseEvent *asPointerMouseEvent() const { return never executed: nullptr;return nullptr; never executed: }return nullptr; | 0 | ||||||||||||||||||||||||
420 | virtual const QQuickPointerTouchEvent *asPointerTouchEvent() const { return executed 192 times by 3 tests: nullptr;return nullptr; Executed by:
executed 192 times by 3 tests: }return nullptr; Executed by:
| 192 | ||||||||||||||||||||||||
421 | virtual const QQuickPointerTabletEvent *asPointerTabletEvent() const { return executed 192 times by 3 tests: nullptr;return nullptr; Executed by:
executed 192 times by 3 tests: }return nullptr; Executed by:
| 192 | ||||||||||||||||||||||||
422 | - | |||||||||||||||||||||||||
423 | virtual const QQuickPointerNativeGestureEvent *asPointerNativeGestureEvent() const { return never executed: nullptr;return nullptr; never executed: }return nullptr; | 0 | ||||||||||||||||||||||||
424 | - | |||||||||||||||||||||||||
425 | virtual const QQuickPointerScrollEvent *asPointerScrollEvent() const { return never executed: nullptr;return nullptr; never executed: }return nullptr; | 0 | ||||||||||||||||||||||||
426 | virtual bool allPointsAccepted() const = 0; | - | ||||||||||||||||||||||||
427 | virtual bool allUpdatedPointsAccepted() const = 0; | - | ||||||||||||||||||||||||
428 | virtual bool allPointsGrabbed() const = 0; | - | ||||||||||||||||||||||||
429 | bool isAccepted() { return executed 19 times by 2 tests: m_event ? m_event->isAccepted() : false;return m_event ? m_event->isAccepted() : false; Executed by:
executed 19 times by 2 tests: }return m_event ? m_event->isAccepted() : false; Executed by:
| 19 | ||||||||||||||||||||||||
430 | void setAccepted(bool accepted) { if (m_event
executed 1924 times by 17 tests: }m_event->setAccepted(accepted); Executed by:
executed 1924 times by 17 tests: end of block Executed by:
| 0-1924 | ||||||||||||||||||||||||
431 | QVector<QPointF> unacceptedPressedPointScenePositions() const; | - | ||||||||||||||||||||||||
432 | - | |||||||||||||||||||||||||
433 | virtual int pointCount() const = 0; | - | ||||||||||||||||||||||||
434 | virtual QQuickEventPoint *point(int i) const = 0; | - | ||||||||||||||||||||||||
435 | virtual QQuickEventPoint *pointById(int pointId) const = 0; | - | ||||||||||||||||||||||||
436 | virtual QVector<QObject *> exclusiveGrabbers() const = 0; | - | ||||||||||||||||||||||||
437 | virtual void clearGrabbers() const = 0; | - | ||||||||||||||||||||||||
438 | virtual bool hasExclusiveGrabber(const QQuickPointerHandler *handler) const = 0; | - | ||||||||||||||||||||||||
439 | - | |||||||||||||||||||||||||
440 | ulong timestamp() const { return executed 70 times by 4 tests: m_event ? m_event->timestamp() : 0;return m_event ? m_event->timestamp() : 0; Executed by:
executed 70 times by 4 tests: }return m_event ? m_event->timestamp() : 0; Executed by:
| 70 | ||||||||||||||||||||||||
441 | - | |||||||||||||||||||||||||
442 | protected: | - | ||||||||||||||||||||||||
443 | QQuickPointerDevice *m_device; | - | ||||||||||||||||||||||||
444 | QInputEvent *m_event = nullptr; | - | ||||||||||||||||||||||||
445 | Qt::MouseButton m_button = Qt::NoButton; | - | ||||||||||||||||||||||||
446 | Qt::MouseButtons m_pressedButtons; | - | ||||||||||||||||||||||||
447 | - | |||||||||||||||||||||||||
448 | QQuickPointerEvent(const QQuickPointerEvent &) = delete; QQuickPointerEvent &operator=(const QQuickPointerEvent &) = delete; | - | ||||||||||||||||||||||||
449 | }; | - | ||||||||||||||||||||||||
450 | - | |||||||||||||||||||||||||
451 | class __attribute__((visibility("default"))) QQuickSinglePointEvent : public QQuickPointerEvent | - | ||||||||||||||||||||||||
452 | { | - | ||||||||||||||||||||||||
453 | public: | - | ||||||||||||||||||||||||
454 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
455 | - | |||||||||||||||||||||||||
456 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
457 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
458 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
459 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
460 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
461 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
462 | public: | - | ||||||||||||||||||||||||
463 | QQuickSinglePointEvent(QObject *parent = nullptr, QQuickPointerDevice *device = nullptr) | - | ||||||||||||||||||||||||
464 | : QQuickPointerEvent(parent, device), m_point(new QQuickEventPoint(this)) { } executed 540 times by 18 tests: end of block Executed by:
| 540 | ||||||||||||||||||||||||
465 | - | |||||||||||||||||||||||||
466 | void localize(QQuickItem *target) override; | - | ||||||||||||||||||||||||
467 | int pointCount() const override { return executed 42736 times by 18 tests: 1;return 1; Executed by:
executed 42736 times by 18 tests: }return 1; Executed by:
| 42736 | ||||||||||||||||||||||||
468 | QQuickEventPoint *point(int i) const override; | - | ||||||||||||||||||||||||
469 | QQuickEventPoint *pointById(int pointId) const override; | - | ||||||||||||||||||||||||
470 | bool allPointsAccepted() const override; | - | ||||||||||||||||||||||||
471 | bool allUpdatedPointsAccepted() const override; | - | ||||||||||||||||||||||||
472 | bool allPointsGrabbed() const override; | - | ||||||||||||||||||||||||
473 | QVector<QObject *> exclusiveGrabbers() const override; | - | ||||||||||||||||||||||||
474 | void clearGrabbers() const override; | - | ||||||||||||||||||||||||
475 | bool hasExclusiveGrabber(const QQuickPointerHandler *handler) const override; | - | ||||||||||||||||||||||||
476 | - | |||||||||||||||||||||||||
477 | protected: | - | ||||||||||||||||||||||||
478 | QQuickEventPoint *m_point; | - | ||||||||||||||||||||||||
479 | - | |||||||||||||||||||||||||
480 | QQuickSinglePointEvent(const QQuickSinglePointEvent &) = delete; QQuickSinglePointEvent &operator=(const QQuickSinglePointEvent &) = delete; | - | ||||||||||||||||||||||||
481 | }; | - | ||||||||||||||||||||||||
482 | - | |||||||||||||||||||||||||
483 | class __attribute__((visibility("default"))) QQuickPointerMouseEvent : public QQuickSinglePointEvent | - | ||||||||||||||||||||||||
484 | { | - | ||||||||||||||||||||||||
485 | public: | - | ||||||||||||||||||||||||
486 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
487 | - | |||||||||||||||||||||||||
488 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
489 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
490 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
491 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
492 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
493 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
494 | public: | - | ||||||||||||||||||||||||
495 | QQuickPointerMouseEvent(QObject *parent = nullptr, QQuickPointerDevice *device = nullptr) | - | ||||||||||||||||||||||||
496 | : QQuickSinglePointEvent(parent, device) { } executed 530 times by 18 tests: end of block Executed by:
| 530 | ||||||||||||||||||||||||
497 | - | |||||||||||||||||||||||||
498 | QQuickPointerEvent *reset(QEvent *) override; | - | ||||||||||||||||||||||||
499 | bool isPressEvent() const override; | - | ||||||||||||||||||||||||
500 | bool isDoubleClickEvent() const override; | - | ||||||||||||||||||||||||
501 | bool isUpdateEvent() const override; | - | ||||||||||||||||||||||||
502 | bool isReleaseEvent() const override; | - | ||||||||||||||||||||||||
503 | QQuickPointerMouseEvent *asPointerMouseEvent() override { return executed 25709 times by 17 tests: this;return this; Executed by:
executed 25709 times by 17 tests: }return this; Executed by:
| 25709 | ||||||||||||||||||||||||
504 | const QQuickPointerMouseEvent *asPointerMouseEvent() const override { return never executed: this;return this; never executed: }return this; | 0 | ||||||||||||||||||||||||
505 | - | |||||||||||||||||||||||||
506 | QMouseEvent *asMouseEvent(const QPointF& localPos) const; | - | ||||||||||||||||||||||||
507 | - | |||||||||||||||||||||||||
508 | QQuickPointerMouseEvent(const QQuickPointerMouseEvent &) = delete; QQuickPointerMouseEvent &operator=(const QQuickPointerMouseEvent &) = delete; | - | ||||||||||||||||||||||||
509 | }; | - | ||||||||||||||||||||||||
510 | - | |||||||||||||||||||||||||
511 | class __attribute__((visibility("default"))) QQuickPointerTouchEvent : public QQuickPointerEvent | - | ||||||||||||||||||||||||
512 | { | - | ||||||||||||||||||||||||
513 | public: | - | ||||||||||||||||||||||||
514 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||
516 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
517 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
518 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
519 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
520 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
521 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
522 | public: | - | ||||||||||||||||||||||||
523 | QQuickPointerTouchEvent(QObject *parent = nullptr, QQuickPointerDevice *device = nullptr) | - | ||||||||||||||||||||||||
524 | : QQuickPointerEvent(parent, device) | - | ||||||||||||||||||||||||
525 | , m_synthMouseEvent(QEvent::MouseMove, QPointF(), Qt::NoButton, Qt::NoButton, Qt::NoModifier) | - | ||||||||||||||||||||||||
526 | {} executed 152 times by 11 tests: end of block Executed by:
| 152 | ||||||||||||||||||||||||
527 | - | |||||||||||||||||||||||||
528 | QQuickPointerEvent *reset(QEvent *) override; | - | ||||||||||||||||||||||||
529 | void localize(QQuickItem *target) override; | - | ||||||||||||||||||||||||
530 | bool isPressEvent() const override; | - | ||||||||||||||||||||||||
531 | bool isUpdateEvent() const override; | - | ||||||||||||||||||||||||
532 | bool isReleaseEvent() const override; | - | ||||||||||||||||||||||||
533 | QQuickPointerTouchEvent *asPointerTouchEvent() override { return executed 5338 times by 11 tests: this;return this; Executed by:
executed 5338 times by 11 tests: }return this; Executed by:
| 5338 | ||||||||||||||||||||||||
534 | const QQuickPointerTouchEvent *asPointerTouchEvent() const override { return executed 1351 times by 4 tests: this;return this; Executed by:
executed 1351 times by 4 tests: }return this; Executed by:
| 1351 | ||||||||||||||||||||||||
535 | int pointCount() const override { return executed 14913 times by 11 tests: m_pointCount;return m_pointCount; Executed by:
executed 14913 times by 11 tests: }return m_pointCount; Executed by:
| 14913 | ||||||||||||||||||||||||
536 | QQuickEventPoint *point(int i) const override; | - | ||||||||||||||||||||||||
537 | QQuickEventPoint *pointById(int pointId) const override; | - | ||||||||||||||||||||||||
538 | const QTouchEvent::TouchPoint *touchPointById(int pointId) const; | - | ||||||||||||||||||||||||
539 | bool allPointsAccepted() const override; | - | ||||||||||||||||||||||||
540 | bool allUpdatedPointsAccepted() const override; | - | ||||||||||||||||||||||||
541 | bool allPointsGrabbed() const override; | - | ||||||||||||||||||||||||
542 | QVector<QObject *> exclusiveGrabbers() const override; | - | ||||||||||||||||||||||||
543 | void clearGrabbers() const override; | - | ||||||||||||||||||||||||
544 | bool hasExclusiveGrabber(const QQuickPointerHandler *handler) const override; | - | ||||||||||||||||||||||||
545 | - | |||||||||||||||||||||||||
546 | QMouseEvent *syntheticMouseEvent(int pointID, QQuickItem *relativeTo) const; | - | ||||||||||||||||||||||||
547 | QTouchEvent *touchEventForItem(QQuickItem *item, bool isFiltering = false) const; | - | ||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||
549 | QTouchEvent *asTouchEvent() const; | - | ||||||||||||||||||||||||
550 | - | |||||||||||||||||||||||||
551 | private: | - | ||||||||||||||||||||||||
552 | Qt::TouchPointStates touchPointStates() const; | - | ||||||||||||||||||||||||
553 | - | |||||||||||||||||||||||||
554 | int m_pointCount = 0; | - | ||||||||||||||||||||||||
555 | QVector<QQuickEventTouchPoint *> m_touchPoints; | - | ||||||||||||||||||||||||
556 | mutable QMouseEvent m_synthMouseEvent; | - | ||||||||||||||||||||||||
557 | - | |||||||||||||||||||||||||
558 | QQuickPointerTouchEvent(const QQuickPointerTouchEvent &) = delete; QQuickPointerTouchEvent &operator=(const QQuickPointerTouchEvent &) = delete; | - | ||||||||||||||||||||||||
559 | }; | - | ||||||||||||||||||||||||
560 | - | |||||||||||||||||||||||||
561 | - | |||||||||||||||||||||||||
562 | class __attribute__((visibility("default"))) QQuickPointerNativeGestureEvent : public QQuickSinglePointEvent | - | ||||||||||||||||||||||||
563 | { | - | ||||||||||||||||||||||||
564 | public: | - | ||||||||||||||||||||||||
565 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
566 | - | |||||||||||||||||||||||||
567 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
568 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
569 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
570 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
571 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
572 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
573 | - | |||||||||||||||||||||||||
574 | - | |||||||||||||||||||||||||
575 | - | |||||||||||||||||||||||||
576 | public: | - | ||||||||||||||||||||||||
577 | QQuickPointerNativeGestureEvent(QObject *parent = nullptr, QQuickPointerDevice *device = nullptr) | - | ||||||||||||||||||||||||
578 | : QQuickSinglePointEvent(parent, device) { } never executed: end of block | 0 | ||||||||||||||||||||||||
579 | - | |||||||||||||||||||||||||
580 | QQuickPointerEvent *reset(QEvent *) override; | - | ||||||||||||||||||||||||
581 | bool isPressEvent() const override; | - | ||||||||||||||||||||||||
582 | bool isUpdateEvent() const override; | - | ||||||||||||||||||||||||
583 | bool isReleaseEvent() const override; | - | ||||||||||||||||||||||||
584 | QQuickPointerNativeGestureEvent *asPointerNativeGestureEvent() override { return never executed: this;return this; never executed: }return this; | 0 | ||||||||||||||||||||||||
585 | const QQuickPointerNativeGestureEvent *asPointerNativeGestureEvent() const override { return never executed: this;return this; never executed: }return this; | 0 | ||||||||||||||||||||||||
586 | Qt::NativeGestureType type() const; | - | ||||||||||||||||||||||||
587 | qreal value() const; | - | ||||||||||||||||||||||||
588 | - | |||||||||||||||||||||||||
589 | QQuickPointerNativeGestureEvent(const QQuickPointerNativeGestureEvent &) = delete; QQuickPointerNativeGestureEvent &operator=(const QQuickPointerNativeGestureEvent &) = delete; | - | ||||||||||||||||||||||||
590 | }; | - | ||||||||||||||||||||||||
591 | - | |||||||||||||||||||||||||
592 | - | |||||||||||||||||||||||||
593 | class __attribute__((visibility("default"))) QQuickPointerScrollEvent : public QQuickSinglePointEvent | - | ||||||||||||||||||||||||
594 | { | - | ||||||||||||||||||||||||
595 | public: | - | ||||||||||||||||||||||||
596 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
597 | - | |||||||||||||||||||||||||
598 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
599 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
600 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
601 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
602 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
603 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
604 | - | |||||||||||||||||||||||||
605 | - | |||||||||||||||||||||||||
606 | - | |||||||||||||||||||||||||
607 | - | |||||||||||||||||||||||||
608 | - | |||||||||||||||||||||||||
609 | - | |||||||||||||||||||||||||
610 | public: | - | ||||||||||||||||||||||||
611 | QQuickPointerScrollEvent(QObject *parent = nullptr, QQuickPointerDevice *device = nullptr) | - | ||||||||||||||||||||||||
612 | : QQuickSinglePointEvent(parent, device) { } executed 10 times by 2 tests: end of block Executed by:
| 10 | ||||||||||||||||||||||||
613 | - | |||||||||||||||||||||||||
614 | QQuickPointerEvent *reset(QEvent *) override; | - | ||||||||||||||||||||||||
615 | void localize(QQuickItem *target) override; | - | ||||||||||||||||||||||||
616 | bool isPressEvent() const override; | - | ||||||||||||||||||||||||
617 | bool isUpdateEvent() const override; | - | ||||||||||||||||||||||||
618 | bool isReleaseEvent() const override; | - | ||||||||||||||||||||||||
619 | QQuickPointerScrollEvent *asPointerScrollEvent() override { return executed 10 times by 2 tests: this;return this; Executed by:
executed 10 times by 2 tests: }return this; Executed by:
| 10 | ||||||||||||||||||||||||
620 | const QQuickPointerScrollEvent *asPointerScrollEvent() const override { return never executed: this;return this; never executed: }return this; | 0 | ||||||||||||||||||||||||
621 | QVector2D angleDelta() const { return executed 10 times by 2 tests: m_angleDelta;return m_angleDelta; Executed by:
executed 10 times by 2 tests: }return m_angleDelta; Executed by:
| 10 | ||||||||||||||||||||||||
622 | QVector2D pixelDelta() const { return executed 10 times by 2 tests: m_pixelDelta;return m_pixelDelta; Executed by:
executed 10 times by 2 tests: }return m_pixelDelta; Executed by:
| 10 | ||||||||||||||||||||||||
623 | bool hasAngleDelta() const { return never executed: !angleDelta().isNull();return !angleDelta().isNull(); never executed: }return !angleDelta().isNull(); | 0 | ||||||||||||||||||||||||
624 | bool hasPixelDelta() const { return never executed: !pixelDelta().isNull();return !pixelDelta().isNull(); never executed: }return !pixelDelta().isNull(); | 0 | ||||||||||||||||||||||||
625 | bool isInverted() const { return executed 10 times by 2 tests: m_inverted;return m_inverted; Executed by:
executed 10 times by 2 tests: }return m_inverted; Executed by:
| 10 | ||||||||||||||||||||||||
626 | Qt::ScrollPhase phase() const { return executed 10 times by 2 tests: m_phase;return m_phase; Executed by:
executed 10 times by 2 tests: }return m_phase; Executed by:
| 10 | ||||||||||||||||||||||||
627 | - | |||||||||||||||||||||||||
628 | private: | - | ||||||||||||||||||||||||
629 | - | |||||||||||||||||||||||||
630 | - | |||||||||||||||||||||||||
631 | Qt::MouseEventSource synthSource() const { return executed 10 times by 2 tests: m_synthSource;return m_synthSource; Executed by:
executed 10 times by 2 tests: }return m_synthSource; Executed by:
| 10 | ||||||||||||||||||||||||
632 | - | |||||||||||||||||||||||||
633 | private: | - | ||||||||||||||||||||||||
634 | QVector2D m_angleDelta; | - | ||||||||||||||||||||||||
635 | QVector2D m_pixelDelta; | - | ||||||||||||||||||||||||
636 | Qt::ScrollPhase m_phase = Qt::NoScrollPhase; | - | ||||||||||||||||||||||||
637 | Qt::MouseEventSource m_synthSource = Qt::MouseEventNotSynthesized; | - | ||||||||||||||||||||||||
638 | bool m_inverted = false; | - | ||||||||||||||||||||||||
639 | - | |||||||||||||||||||||||||
640 | friend class QQuickWindowPrivate; | - | ||||||||||||||||||||||||
641 | - | |||||||||||||||||||||||||
642 | QQuickPointerScrollEvent(const QQuickPointerScrollEvent &) = delete; QQuickPointerScrollEvent &operator=(const QQuickPointerScrollEvent &) = delete; | - | ||||||||||||||||||||||||
643 | }; | - | ||||||||||||||||||||||||
644 | - | |||||||||||||||||||||||||
645 | - | |||||||||||||||||||||||||
646 | - | |||||||||||||||||||||||||
647 | class __attribute__((visibility("default"))) QQuickPointerDevice : public QObject | - | ||||||||||||||||||||||||
648 | { | - | ||||||||||||||||||||||||
649 | public: | - | ||||||||||||||||||||||||
650 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
651 | - | |||||||||||||||||||||||||
652 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
653 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
654 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
655 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
656 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
657 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
658 | - | |||||||||||||||||||||||||
659 | - | |||||||||||||||||||||||||
660 | - | |||||||||||||||||||||||||
661 | - | |||||||||||||||||||||||||
662 | - | |||||||||||||||||||||||||
663 | - | |||||||||||||||||||||||||
664 | - | |||||||||||||||||||||||||
665 | - | |||||||||||||||||||||||||
666 | public: | - | ||||||||||||||||||||||||
667 | enum DeviceType : qint16 { | - | ||||||||||||||||||||||||
668 | UnknownDevice = 0x0000, | - | ||||||||||||||||||||||||
669 | Mouse = 0x0001, | - | ||||||||||||||||||||||||
670 | TouchScreen = 0x0002, | - | ||||||||||||||||||||||||
671 | TouchPad = 0x0004, | - | ||||||||||||||||||||||||
672 | Puck = 0x0008, | - | ||||||||||||||||||||||||
673 | Stylus = 0x0010, | - | ||||||||||||||||||||||||
674 | Airbrush = 0x0020, | - | ||||||||||||||||||||||||
675 | AllDevices = 0x7FFF | - | ||||||||||||||||||||||||
676 | }; | - | ||||||||||||||||||||||||
677 | typedef QFlags<DeviceType> DeviceTypes; | - | ||||||||||||||||||||||||
678 | friend constexpr const QMetaObject *qt_getEnumMetaObject(DeviceType) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(DeviceType) noexcept { return "DeviceType"; } | - | ||||||||||||||||||||||||
679 | friend constexpr const QMetaObject *qt_getEnumMetaObject(DeviceTypes) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(DeviceTypes) noexcept { return "DeviceTypes"; } | - | ||||||||||||||||||||||||
680 | - | |||||||||||||||||||||||||
681 | enum PointerType : qint16 { | - | ||||||||||||||||||||||||
682 | GenericPointer = 0x0001, | - | ||||||||||||||||||||||||
683 | Finger = 0x0002, | - | ||||||||||||||||||||||||
684 | Pen = 0x0004, | - | ||||||||||||||||||||||||
685 | Eraser = 0x0008, | - | ||||||||||||||||||||||||
686 | Cursor = 0x0010, | - | ||||||||||||||||||||||||
687 | AllPointerTypes = 0x7FFF | - | ||||||||||||||||||||||||
688 | }; | - | ||||||||||||||||||||||||
689 | typedef QFlags<PointerType> PointerTypes; | - | ||||||||||||||||||||||||
690 | friend constexpr const QMetaObject *qt_getEnumMetaObject(PointerType) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(PointerType) noexcept { return "PointerType"; } | - | ||||||||||||||||||||||||
691 | friend constexpr const QMetaObject *qt_getEnumMetaObject(PointerTypes) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(PointerTypes) noexcept { return "PointerTypes"; } | - | ||||||||||||||||||||||||
692 | - | |||||||||||||||||||||||||
693 | enum CapabilityFlag : qint16 { | - | ||||||||||||||||||||||||
694 | Position = QTouchDevice::Position, | - | ||||||||||||||||||||||||
695 | Area = QTouchDevice::Area, | - | ||||||||||||||||||||||||
696 | Pressure = QTouchDevice::Pressure, | - | ||||||||||||||||||||||||
697 | Velocity = QTouchDevice::Velocity, | - | ||||||||||||||||||||||||
698 | MouseEmulation = QTouchDevice::MouseEmulation, | - | ||||||||||||||||||||||||
699 | - | |||||||||||||||||||||||||
700 | Scroll = 0x0100, | - | ||||||||||||||||||||||||
701 | Hover = 0x0200, | - | ||||||||||||||||||||||||
702 | Rotation = 0x0400, | - | ||||||||||||||||||||||||
703 | XTilt = 0x0800, | - | ||||||||||||||||||||||||
704 | YTilt = 0x1000 | - | ||||||||||||||||||||||||
705 | }; | - | ||||||||||||||||||||||||
706 | typedef QFlags<CapabilityFlag> Capabilities; | - | ||||||||||||||||||||||||
707 | friend constexpr const QMetaObject *qt_getEnumMetaObject(CapabilityFlag) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(CapabilityFlag) noexcept { return "CapabilityFlag"; } | - | ||||||||||||||||||||||||
708 | friend constexpr const QMetaObject *qt_getEnumMetaObject(Capabilities) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(Capabilities) noexcept { return "Capabilities"; } | - | ||||||||||||||||||||||||
709 | - | |||||||||||||||||||||||||
710 | DeviceType type() const { return executed 5931 times by 19 tests: m_deviceType;return m_deviceType; Executed by:
executed 5931 times by 19 tests: }return m_deviceType; Executed by:
| 5931 | ||||||||||||||||||||||||
711 | PointerType pointerType() const { return executed 5293 times by 4 tests: m_pointerType;return m_pointerType; Executed by:
executed 5293 times by 4 tests: }return m_pointerType; Executed by:
| 5293 | ||||||||||||||||||||||||
712 | Capabilities capabilities() const { return never executed: static_cast<Capabilities>(m_capabilities);return static_cast<Capabilities>(m_capabilities); never executed: }return static_cast<Capabilities>(m_capabilities); | 0 | ||||||||||||||||||||||||
713 | bool hasCapability(CapabilityFlag cap) { return never executed: m_capabilities & cap;return m_capabilities & cap; never executed: }return m_capabilities & cap; | 0 | ||||||||||||||||||||||||
714 | int maximumTouchPoints() const { return never executed: m_maximumTouchPoints;return m_maximumTouchPoints; never executed: }return m_maximumTouchPoints; | 0 | ||||||||||||||||||||||||
715 | int buttonCount() const { return never executed: m_buttonCount;return m_buttonCount; never executed: }return m_buttonCount; | 0 | ||||||||||||||||||||||||
716 | QString name() const { return never executed: m_name;return m_name; never executed: }return m_name; | 0 | ||||||||||||||||||||||||
717 | QPointingDeviceUniqueId uniqueId() const { return executed 192 times by 3 tests: m_uniqueId;return m_uniqueId; Executed by:
executed 192 times by 3 tests: }return m_uniqueId; Executed by:
| 192 | ||||||||||||||||||||||||
718 | const QTouchDevice *qTouchDevice() const; | - | ||||||||||||||||||||||||
719 | - | |||||||||||||||||||||||||
720 | static QQuickPointerDevice *touchDevice(const QTouchDevice *d); | - | ||||||||||||||||||||||||
721 | static QList<QQuickPointerDevice *> touchDevices(); | - | ||||||||||||||||||||||||
722 | static QQuickPointerDevice *genericMouseDevice(); | - | ||||||||||||||||||||||||
723 | static QQuickPointerDevice *tabletDevice(qint64); | - | ||||||||||||||||||||||||
724 | - | |||||||||||||||||||||||||
725 | QVector<QQuickPointerHandler *> &eventDeliveryTargets() { return executed 31683 times by 19 tests: m_eventDeliveryTargets;return m_eventDeliveryTargets; Executed by:
executed 31683 times by 19 tests: }return m_eventDeliveryTargets; Executed by:
| 31683 | ||||||||||||||||||||||||
726 | - | |||||||||||||||||||||||||
727 | private: | - | ||||||||||||||||||||||||
728 | QQuickPointerDevice(DeviceType devType, PointerType pType, Capabilities caps, int maxPoints, int buttonCount, const QString &name, qint64 uniqueId = 0) | - | ||||||||||||||||||||||||
729 | : m_deviceType(devType), m_pointerType(pType), m_capabilities(static_cast<qint16>(caps)) | - | ||||||||||||||||||||||||
730 | , m_maximumTouchPoints(static_cast<qint8>(maxPoints)), m_buttonCount(static_cast<qint8>(buttonCount)), m_name(name) | - | ||||||||||||||||||||||||
731 | , m_uniqueId(QPointingDeviceUniqueId::fromNumericId(uniqueId)) | - | ||||||||||||||||||||||||
732 | { | - | ||||||||||||||||||||||||
733 | } executed 218 times by 91 tests: end of block Executed by:
| 218 | ||||||||||||||||||||||||
734 | ~QQuickPointerDevice() override { } | - | ||||||||||||||||||||||||
735 | - | |||||||||||||||||||||||||
736 | private: | - | ||||||||||||||||||||||||
737 | - | |||||||||||||||||||||||||
738 | DeviceType m_deviceType; | - | ||||||||||||||||||||||||
739 | PointerType m_pointerType; | - | ||||||||||||||||||||||||
740 | qint16 m_capabilities; | - | ||||||||||||||||||||||||
741 | qint8 m_maximumTouchPoints; | - | ||||||||||||||||||||||||
742 | qint8 m_buttonCount; | - | ||||||||||||||||||||||||
743 | - | |||||||||||||||||||||||||
744 | QString m_name; | - | ||||||||||||||||||||||||
745 | QPointingDeviceUniqueId m_uniqueId; | - | ||||||||||||||||||||||||
746 | QVector<QQuickPointerHandler *> m_eventDeliveryTargets; | - | ||||||||||||||||||||||||
747 | - | |||||||||||||||||||||||||
748 | QQuickPointerDevice(const QQuickPointerDevice &) = delete; QQuickPointerDevice &operator=(const QQuickPointerDevice &) = delete; | - | ||||||||||||||||||||||||
749 | friend struct ConstructableQQuickPointerDevice; | - | ||||||||||||||||||||||||
750 | }; | - | ||||||||||||||||||||||||
751 | - | |||||||||||||||||||||||||
752 | constexpr inline QFlags<QQuickPointerDevice::DeviceTypes::enum_type> operator|(QQuickPointerDevice::DeviceTypes::enum_type f1, QQuickPointerDevice::DeviceTypes::enum_type f2) noexcept { return QFlags<QQuickPointerDevice::DeviceTypes::enum_type>(f1) | f2; } constexpr inline QFlags<QQuickPointerDevice::DeviceTypes::enum_type> operator|(QQuickPointerDevice::DeviceTypes::enum_type f1, QFlags<QQuickPointerDevice::DeviceTypes::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QQuickPointerDevice::DeviceTypes::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); } | - | ||||||||||||||||||||||||
753 | constexpr inline QFlags<QQuickPointerDevice::PointerTypes::enum_type> operator|(QQuickPointerDevice::PointerTypes::enum_type f1, QQuickPointerDevice::PointerTypes::enum_type f2) noexcept { return QFlags<QQuickPointerDevice::PointerTypes::enum_type>(f1) | f2; } constexpr inline QFlags<QQuickPointerDevice::PointerTypes::enum_type> operator|(QQuickPointerDevice::PointerTypes::enum_type f1, QFlags<QQuickPointerDevice::PointerTypes::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QQuickPointerDevice::PointerTypes::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); } | - | ||||||||||||||||||||||||
754 | constexpr inline QFlags<QQuickPointerDevice::Capabilities::enum_type> operator|(QQuickPointerDevice::Capabilities::enum_type f1, QQuickPointerDevice::Capabilities::enum_type f2) noexcept { return QFlags<QQuickPointerDevice::Capabilities::enum_type>(f1) | f2; } constexpr inline QFlags<QQuickPointerDevice::Capabilities::enum_type> operator|(QQuickPointerDevice::Capabilities::enum_type f1, QFlags<QQuickPointerDevice::Capabilities::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QQuickPointerDevice::Capabilities::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); } | - | ||||||||||||||||||||||||
755 | - | |||||||||||||||||||||||||
756 | __attribute__((visibility("default"))) QDebug operator<<(QDebug, const QQuickPointerDevice *); | - | ||||||||||||||||||||||||
757 | __attribute__((visibility("default"))) QDebug operator<<(QDebug, const QQuickPointerEvent *); | - | ||||||||||||||||||||||||
758 | __attribute__((visibility("default"))) QDebug operator<<(QDebug, const QQuickEventPoint *); | - | ||||||||||||||||||||||||
759 | - | |||||||||||||||||||||||||
760 | - | |||||||||||||||||||||||||
761 | - | |||||||||||||||||||||||||
762 | - | |||||||||||||||||||||||||
763 | template <> struct QMetaTypeId< QQuickKeyEvent * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQuickKeyEvent * >("QQuickKeyEvent *", reinterpret_cast< QQuickKeyEvent * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickKeyEvent> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQmlListProperty<QQuickKeyEvent> >("QQmlListProperty<QQuickKeyEvent>", reinterpret_cast< QQmlListProperty<QQuickKeyEvent> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } };return newId; | 0 | ||||||||||||||||||||||||
764 | template <> struct QMetaTypeId< QQuickMouseEvent * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQuickMouseEvent * >("QQuickMouseEvent *", reinterpret_cast< QQuickMouseEvent * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickMouseEvent> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQmlListProperty<QQuickMouseEvent> >("QQmlListProperty<QQuickMouseEvent>", reinterpret_cast< QQmlListProperty<QQuickMouseEvent> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } };return newId; | 0 | ||||||||||||||||||||||||
765 | template <> struct QMetaTypeId< QQuickWheelEvent * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQuickWheelEvent * >("QQuickWheelEvent *", reinterpret_cast< QQuickWheelEvent * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickWheelEvent> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQmlListProperty<QQuickWheelEvent> >("QQmlListProperty<QQuickWheelEvent>", reinterpret_cast< QQmlListProperty<QQuickWheelEvent> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } };return newId; | 0 | ||||||||||||||||||||||||
766 | template <> struct QMetaTypeId< QQuickCloseEvent * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQuickCloseEvent * >("QQuickCloseEvent *", reinterpret_cast< QQuickCloseEvent * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickCloseEvent> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQmlListProperty<QQuickCloseEvent> >("QQmlListProperty<QQuickCloseEvent>", reinterpret_cast< QQmlListProperty<QQuickCloseEvent> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } };return newId; | 0 | ||||||||||||||||||||||||
767 | template <> struct QMetaTypeId< QQuickPointerDevice * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQuickPointerDevice * >("QQuickPointerDevice *", reinterpret_cast< QQuickPointerDevice * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickPointerDevice> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQmlListProperty<QQuickPointerDevice> >("QQmlListProperty<QQuickPointerDevice>", reinterpret_cast< QQmlListProperty<QQuickPointerDevice> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } };return newId; | 0 | ||||||||||||||||||||||||
768 | template <> struct QMetaTypeId< QPointingDeviceUniqueId * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QPointingDeviceUniqueId * >("QPointingDeviceUniqueId *", reinterpret_cast< QPointingDeviceUniqueId * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QPointingDeviceUniqueId> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQmlListProperty<QPointingDeviceUniqueId> >("QQmlListProperty<QPointingDeviceUniqueId>", reinterpret_cast< QQmlListProperty<QPointingDeviceUniqueId> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } };return newId; | 0 | ||||||||||||||||||||||||
769 | template <> struct QMetaTypeId< QQuickPointerEvent * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQuickPointerEvent * >("QQuickPointerEvent *", reinterpret_cast< QQuickPointerEvent * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickPointerEvent> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id; never executed: const int newId = qRegisterMetaType< QQmlListProperty<QQuickPointerEvent> >("QQmlListProperty<QQuickPointerEvent>", reinterpret_cast< QQmlListProperty<QQuickPointerEvent> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; never executed: newId;return newId; never executed: } };return newId; | 0 | ||||||||||||||||||||||||
Switch to Source code | Preprocessed file |