OpenCoverage

qquickmultipointtoucharea_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickmultipointtoucharea_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QQuickMultiPointTouchArea;-
6class __attribute__((visibility("default"))) QQuickTouchPoint : public QObject-
7{-
8 public:-
9#pragma GCC diagnostic push-
10 -
11#pragma GCC diagnostic ignored "-Wsuggest-override"-
12 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:-
13#pragma GCC diagnostic ignored "-Wattributes"-
14 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
15#pragma GCC diagnostic pop-
16 struct QPrivateSignal {};-
17 -
18 -
19 -
20 -
21 -
22 -
23 -
24 -
25 -
26 -
27-
28 -
29 -
30 -
31 -
32 -
33 -
34-
35public:-
36 QQuickTouchPoint(bool qmlDefined = true)-
37 : _qmlDefined(qmlDefined)-
38 {}
executed 170 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
170
39-
40 int pointId() const { return
executed 20 times by 1 test: return _id;
Executed by:
  • tst_qquickmultipointtoucharea
_id;
executed 20 times by 1 test: return _id;
Executed by:
  • tst_qquickmultipointtoucharea
}
20
41 void setPointId(int id);-
42-
43 QPointingDeviceUniqueId uniqueId() const { return
never executed: return _uniqueId;
_uniqueId;
never executed: return _uniqueId;
}
0
44 void setUniqueId(const QPointingDeviceUniqueId &id);-
45-
46 qreal x() const { return
executed 348 times by 3 tests: return _x;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
_x;
executed 348 times by 3 tests: return _x;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
}
348
47 void setX(qreal x);-
48-
49 qreal y() const { return
executed 334 times by 3 tests: return _y;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
_y;
executed 334 times by 3 tests: return _y;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
}
334
50 void setY(qreal y);-
51-
52 QSizeF ellipseDiameters() const { return
never executed: return _ellipseDiameters;
_ellipseDiameters;
never executed: return _ellipseDiameters;
}
0
53 void setEllipseDiameters(const QSizeF &d);-
54-
55 qreal pressure() const { return
never executed: return _pressure;
_pressure;
never executed: return _pressure;
}
0
56 void setPressure(qreal pressure);-
57-
58 qreal rotation() const { return
executed 16 times by 1 test: return _rotation;
Executed by:
  • tst_multipointtoucharea_interop
_rotation;
executed 16 times by 1 test: return _rotation;
Executed by:
  • tst_multipointtoucharea_interop
}
16
59 void setRotation(qreal r);-
60-
61 QVector2D velocity() const { return
never executed: return _velocity;
_velocity;
never executed: return _velocity;
}
0
62 void setVelocity(const QVector2D &velocity);-
63-
64 QRectF area() const { return
executed 32 times by 1 test: return _area;
Executed by:
  • tst_examples
_area;
executed 32 times by 1 test: return _area;
Executed by:
  • tst_examples
}
32
65 void setArea(const QRectF &area);-
66-
67 bool isQmlDefined() const { return
executed 140 times by 2 tests: return _qmlDefined;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
_qmlDefined;
executed 140 times by 2 tests: return _qmlDefined;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
}
140
68-
69 bool inUse() const { return
executed 180 times by 2 tests: return _inUse;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
_inUse;
executed 180 times by 2 tests: return _inUse;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
}
180
70 void setInUse(bool inUse) { _inUse = inUse; }
executed 192 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
192
71-
72 bool pressed() const { return
executed 680 times by 3 tests: return _pressed;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
_pressed;
executed 680 times by 3 tests: return _pressed;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
}
680
73 void setPressed(bool pressed);-
74-
75 qreal startX() const { return
executed 4 times by 1 test: return _startX;
Executed by:
  • tst_qquickmultipointtoucharea
_startX;
executed 4 times by 1 test: return _startX;
Executed by:
  • tst_qquickmultipointtoucharea
}
4
76 void setStartX(qreal startX);-
77-
78 qreal startY() const { return
never executed: return _startY;
_startY;
never executed: return _startY;
}
0
79 void setStartY(qreal startY);-
80-
81 qreal previousX() const { return
never executed: return _previousX;
_previousX;
never executed: return _previousX;
}
0
82 void setPreviousX(qreal previousX);-
83-
84 qreal previousY() const { return
never executed: return _previousY;
_previousY;
never executed: return _previousY;
}
0
85 void setPreviousY(qreal previousY);-
86-
87 qreal sceneX() const { return
never executed: return _sceneX;
_sceneX;
never executed: return _sceneX;
}
0
88 void setSceneX(qreal sceneX);-
89-
90 qreal sceneY() const { return
never executed: return _sceneY;
_sceneY;
never executed: return _sceneY;
}
0
91 void setSceneY(qreal sceneY);-
92-
93public :-
94 void pressedChanged();-
95 void pointIdChanged();-
96 void uniqueIdChanged();-
97 void xChanged();-
98 void yChanged();-
99 void ellipseDiametersChanged();-
100 void pressureChanged();-
101 void rotationChanged();-
102 void velocityChanged();-
103 void areaChanged();-
104 void startXChanged();-
105 void startYChanged();-
106 void previousXChanged();-
107 void previousYChanged();-
108 void sceneXChanged();-
109 void sceneYChanged();-
110-
111private:-
112 friend class QQuickMultiPointTouchArea;-
113 int _id = 0;-
114 qreal _x = 0.0;-
115 qreal _y = 0.0;-
116 qreal _pressure = 0.0;-
117 qreal _rotation = 0;-
118 QSizeF _ellipseDiameters;-
119 QVector2D _velocity;-
120 QRectF _area;-
121 bool _qmlDefined;-
122 bool _inUse = false;-
123 bool _pressed = false;-
124 qreal _startX = 0.0;-
125 qreal _startY = 0.0;-
126 qreal _previousX = 0.0;-
127 qreal _previousY = 0.0;-
128 qreal _sceneX = 0.0;-
129 qreal _sceneY = 0.0;-
130 QPointingDeviceUniqueId _uniqueId;-
131};-
132-
133class QQuickGrabGestureEvent : public QObject-
134{-
135 public:-
136#pragma GCC diagnostic push-
137 -
138#pragma GCC diagnostic ignored "-Wsuggest-override"-
139 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:-
140#pragma GCC diagnostic ignored "-Wattributes"-
141 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
142#pragma GCC diagnostic pop-
143 struct QPrivateSignal {};-
144 -
145 -
146public:-
147 QQuickGrabGestureEvent() : _dragThreshold(QGuiApplication::styleHints()->startDragDistance()) {}
executed 82 times by 2 tests: end of block
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
82
148-
149 void grab() { _grab = true; }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickmultipointtoucharea
6
150 bool wantsGrab() const { return
executed 82 times by 2 tests: return _grab;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
_grab;
executed 82 times by 2 tests: return _grab;
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
}
82
151-
152 QQmlListProperty<QObject> touchPoints() {-
153 return
never executed: return QQmlListProperty<QObject>(this, _touchPoints);
QQmlListProperty<QObject>(this, _touchPoints);
never executed: return QQmlListProperty<QObject>(this, _touchPoints);
0
154 }-
155 qreal dragThreshold() const { return
executed 4 times by 1 test: return _dragThreshold;
Executed by:
  • tst_qquickmultipointtoucharea
_dragThreshold;
executed 4 times by 1 test: return _dragThreshold;
Executed by:
  • tst_qquickmultipointtoucharea
}
4
156-
157private:-
158 friend class QQuickMultiPointTouchArea;-
159 bool _grab = false;-
160 qreal _dragThreshold;-
161 QList<QObject*> _touchPoints;-
162};-
163-
164class __attribute__((visibility("default"))) QQuickMultiPointTouchArea : public QQuickItem-
165{-
166 public:-
167#pragma GCC diagnostic push-
168 -
169#pragma GCC diagnostic ignored "-Wsuggest-override"-
170 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:-
171#pragma GCC diagnostic ignored "-Wattributes"-
172 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
173#pragma GCC diagnostic pop-
174 struct QPrivateSignal {};-
175-
176 -
177 -
178 -
179 -
180-
181public:-
182 QQuickMultiPointTouchArea(QQuickItem *parent=nullptr);-
183 ~QQuickMultiPointTouchArea();-
184-
185 int minimumTouchPoints() const;-
186 void setMinimumTouchPoints(int num);-
187 int maximumTouchPoints() const;-
188 void setMaximumTouchPoints(int num);-
189 bool mouseEnabled() const { return
never executed: return _mouseEnabled;
_mouseEnabled;
never executed: return _mouseEnabled;
}
0
190 void setMouseEnabled(bool arg);-
191-
192 QQmlListProperty<QQuickTouchPoint> touchPoints() {-
193 return
executed 62 times by 3 tests: return QQmlListProperty<QQuickTouchPoint>(this, nullptr, QQuickMultiPointTouchArea::touchPoint_append, QQuickMultiPointTouchArea::touchPoint_count, QQuickMultiPointTouchArea::touchPoint_at, nullptr);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
QQmlListProperty<QQuickTouchPoint>(this, nullptr, QQuickMultiPointTouchArea::touchPoint_append, QQuickMultiPointTouchArea::touchPoint_count, QQuickMultiPointTouchArea::touchPoint_at, nullptr);
executed 62 times by 3 tests: return QQmlListProperty<QQuickTouchPoint>(this, nullptr, QQuickMultiPointTouchArea::touchPoint_append, QQuickMultiPointTouchArea::touchPoint_count, QQuickMultiPointTouchArea::touchPoint_at, nullptr);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
62
194 }-
195-
196 static void touchPoint_append(QQmlListProperty<QQuickTouchPoint> *list, QQuickTouchPoint* touch) {-
197 QQuickMultiPointTouchArea *q = static_cast<QQuickMultiPointTouchArea*>(list->object);-
198 q->addTouchPrototype(touch);-
199 }
executed 120 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
120
200-
201 static int touchPoint_count(QQmlListProperty<QQuickTouchPoint> *list) {-
202 QQuickMultiPointTouchArea *q = static_cast<QQuickMultiPointTouchArea*>(list->object);-
203 return
executed 18 times by 2 tests: return q->_touchPrototypes.count();
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
q->_touchPrototypes.count();
executed 18 times by 2 tests: return q->_touchPrototypes.count();
Executed by:
  • tst_multipointtoucharea_interop
  • tst_qquickmultipointtoucharea
18
204 }-
205-
206 static QQuickTouchPoint* touchPoint_at(QQmlListProperty<QQuickTouchPoint> *list, int index) {-
207 QQuickMultiPointTouchArea *q = static_cast<QQuickMultiPointTouchArea*>(list->object);-
208 return
executed 198 times by 1 test: return q->_touchPrototypes.value(index);
Executed by:
  • tst_multipointtoucharea_interop
q->_touchPrototypes.value(index);
executed 198 times by 1 test: return q->_touchPrototypes.value(index);
Executed by:
  • tst_multipointtoucharea_interop
198
209 }-
210-
211public :-
212 void pressed(const QList<QObject*> &touchPoints);-
213 void updated(const QList<QObject*> &touchPoints);-
214 void released(const QList<QObject*> &touchPoints);-
215 void canceled(const QList<QObject*> &touchPoints);-
216 void gestureStarted(QQuickGrabGestureEvent *gesture);-
217 void touchUpdated(const QList<QObject*> &touchPoints);-
218 void minimumTouchPointsChanged();-
219 void maximumTouchPointsChanged();-
220 void mouseEnabledChanged();-
221-
222protected:-
223 void touchEvent(QTouchEvent *) override;-
224 bool childMouseEventFilter(QQuickItem *receiver, QEvent *event) override;-
225 void mousePressEvent(QMouseEvent *event) override;-
226 void mouseReleaseEvent(QMouseEvent *event) override;-
227 void mouseMoveEvent(QMouseEvent *event) override;-
228 void mouseUngrabEvent() override;-
229 void touchUngrabEvent() override;-
230-
231 void addTouchPrototype(QQuickTouchPoint* prototype);-
232 void addTouchPoint(const QTouchEvent::TouchPoint *p);-
233 void addTouchPoint(const QMouseEvent *e);-
234 void clearTouchLists();-
235-
236 void updateTouchPoint(QQuickTouchPoint*, const QTouchEvent::TouchPoint*);-
237 void updateTouchPoint(QQuickTouchPoint *dtp, const QMouseEvent *e);-
238 void updateTouchData(QEvent*);-
239-
240 bool sendMouseEvent(QMouseEvent *event);-
241 bool shouldFilter(QEvent *event);-
242 void grabGesture();-
243 QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;-
244-
245-
246-
247-
248-
249-
250private:-
251 void ungrab();-
252 QMap<int,QQuickTouchPoint*> _touchPrototypes;-
253 QMap<int,QObject*> _touchPoints;-
254 QList<QObject*> _releasedTouchPoints;-
255 QList<QObject*> _pressedTouchPoints;-
256 QList<QObject*> _movedTouchPoints;-
257 int _minimumTouchPoints;-
258 int _maximumTouchPoints;-
259 QPointer<QQuickTouchPoint> _mouseTouchPoint;-
260 QTouchEvent::TouchPoint _mouseQpaTouchPoint;-
261 QPointF _mousePos;-
262 bool _stealMouse;-
263 bool _mouseEnabled;-
264};-
265-
266-
267-
268 template <> struct QMetaTypeId< QQuickTouchPoint * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQuickTouchPoint * >("QQuickTouchPoint *", reinterpret_cast< QQuickTouchPoint * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickTouchPoint> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQmlListProperty<QQuickTouchPoint> >("QQmlListProperty<QQuickTouchPoint>", reinterpret_cast< QQmlListProperty<QQuickTouchPoint> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
269 template <> struct QMetaTypeId< QQuickGrabGestureEvent * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQuickGrabGestureEvent * >("QQuickGrabGestureEvent *", reinterpret_cast< QQuickGrabGestureEvent * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickGrabGestureEvent> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQmlListProperty<QQuickGrabGestureEvent> >("QQmlListProperty<QQuickGrabGestureEvent>", reinterpret_cast< QQmlListProperty<QQuickGrabGestureEvent> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
270 template <> struct QMetaTypeId< QQuickMultiPointTouchArea * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQuickMultiPointTouchArea * >("QQuickMultiPointTouchArea *", reinterpret_cast< QQuickMultiPointTouchArea * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickMultiPointTouchArea> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQmlListProperty<QQuickMultiPointTouchArea> >("QQmlListProperty<QQuickMultiPointTouchArea>", reinterpret_cast< QQmlListProperty<QQuickMultiPointTouchArea> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0