OpenCoverage

qquickpincharea_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickpincharea_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3class __attribute__((visibility("default"))) QQuickPinch : public QObject-
4{-
5 public:-
6#pragma GCC diagnostic push-
7 -
8#pragma GCC diagnostic ignored "-Wsuggest-override"-
9 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:-
10#pragma GCC diagnostic ignored "-Wattributes"-
11 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
12#pragma GCC diagnostic pop-
13 struct QPrivateSignal {};-
14-
15 -
16 -
17 -
18 -
19 -
20 -
21 -
22 -
23 -
24 -
25 -
26-
27public:-
28 QQuickPinch();-
29-
30 QQuickItem *target() const { return
executed 190 times by 1 test: return m_target;
Executed by:
  • tst_qquickpincharea
m_target;
executed 190 times by 1 test: return m_target;
Executed by:
  • tst_qquickpincharea
}
190
31 void setTarget(QQuickItem *target) {-
32 if (target == m_target
target == m_targetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_qquickpincharea
  • tst_touchmouse
)
2-32
33 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
34 m_target = target;-
35 targetChanged();-
36 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_qquickpincharea
  • tst_touchmouse
32
37 void resetTarget() {-
38 if (!m_target
!m_targetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
39 return;
never executed: return;
0
40 m_target = nullptr;-
41 targetChanged();-
42 }
never executed: end of block
0
43-
44 qreal minimumScale() const { return
executed 26 times by 1 test: return m_minScale;
Executed by:
  • tst_qquickpincharea
m_minScale;
executed 26 times by 1 test: return m_minScale;
Executed by:
  • tst_qquickpincharea
}
26
45 void setMinimumScale(qreal s) {-
46 if (s == m_minScale
s == m_minScaleDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquickpincharea
  • tst_touchmouse
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickpincharea
  • tst_touchmouse
)
4-18
47 return;
executed 18 times by 2 tests: return;
Executed by:
  • tst_qquickpincharea
  • tst_touchmouse
18
48 m_minScale = s;-
49 minimumScaleChanged();-
50 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickpincharea
  • tst_touchmouse
4
51 qreal maximumScale() const { return
executed 26 times by 1 test: return m_maxScale;
Executed by:
  • tst_qquickpincharea
m_maxScale;
executed 26 times by 1 test: return m_maxScale;
Executed by:
  • tst_qquickpincharea
}
26
52 void setMaximumScale(qreal s) {-
53 if (s == m_maxScale
s == m_maxScaleDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_qquickpincharea
  • tst_touchmouse
)
2-20
54 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
55 m_maxScale = s;-
56 maximumScaleChanged();-
57 }
executed 20 times by 2 tests: end of block
Executed by:
  • tst_qquickpincharea
  • tst_touchmouse
20
58-
59 qreal minimumRotation() const { return
executed 48 times by 1 test: return m_minRotation;
Executed by:
  • tst_qquickpincharea
m_minRotation;
executed 48 times by 1 test: return m_minRotation;
Executed by:
  • tst_qquickpincharea
}
48
60 void setMinimumRotation(qreal r) {-
61 if (r == m_minRotation
r == m_minRotationDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-12
62 return;
executed 12 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
12
63 m_minRotation = r;-
64 minimumRotationChanged();-
65 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
2
66 qreal maximumRotation() const { return
executed 48 times by 1 test: return m_maxRotation;
Executed by:
  • tst_qquickpincharea
m_maxRotation;
executed 48 times by 1 test: return m_maxRotation;
Executed by:
  • tst_qquickpincharea
}
48
67 void setMaximumRotation(qreal r) {-
68 if (r == m_maxRotation
r == m_maxRotationDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-12
69 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
70 m_maxRotation = r;-
71 maximumRotationChanged();-
72 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
12
73-
74 enum Axis { NoDrag=0x00, XAxis=0x01, YAxis=0x02, XAndYAxis=0x03, XandYAxis=XAndYAxis };-
75 friend constexpr const QMetaObject *qt_getEnumMetaObject(Axis) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(Axis) noexcept { return "Axis"; }-
76 Axis axis() const { return
executed 68 times by 1 test: return m_axis;
Executed by:
  • tst_qquickpincharea
m_axis;
executed 68 times by 1 test: return m_axis;
Executed by:
  • tst_qquickpincharea
}
68
77 void setAxis(Axis a) {-
78 if (a == m_axis
a == m_axisDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-24
79 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
80 m_axis = a;-
81 dragAxisChanged();-
82 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
24
83-
84 qreal xmin() const { return
executed 26 times by 1 test: return m_xmin;
Executed by:
  • tst_qquickpincharea
m_xmin;
executed 26 times by 1 test: return m_xmin;
Executed by:
  • tst_qquickpincharea
}
26
85 void setXmin(qreal x) {-
86 if (x == m_xmin
x == m_xminDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-12
87 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
88 m_xmin = x;-
89 minimumXChanged();-
90 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
12
91 qreal xmax() const { return
executed 28 times by 1 test: return m_xmax;
Executed by:
  • tst_qquickpincharea
m_xmax;
executed 28 times by 1 test: return m_xmax;
Executed by:
  • tst_qquickpincharea
}
28
92 void setXmax(qreal x) {-
93 if (x == m_xmax
x == m_xmaxDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-12
94 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
95 m_xmax = x;-
96 maximumXChanged();-
97 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
12
98 qreal ymin() const { return
executed 26 times by 1 test: return m_ymin;
Executed by:
  • tst_qquickpincharea
m_ymin;
executed 26 times by 1 test: return m_ymin;
Executed by:
  • tst_qquickpincharea
}
26
99 void setYmin(qreal y) {-
100 if (y == m_ymin
y == m_yminDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-12
101 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
102 m_ymin = y;-
103 minimumYChanged();-
104 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
12
105 qreal ymax() const { return
executed 26 times by 1 test: return m_ymax;
Executed by:
  • tst_qquickpincharea
m_ymax;
executed 26 times by 1 test: return m_ymax;
Executed by:
  • tst_qquickpincharea
}
26
106 void setYmax(qreal y) {-
107 if (y == m_ymax
y == m_ymaxDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-12
108 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
109 m_ymax = y;-
110 maximumYChanged();-
111 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
12
112-
113 bool active() const { return
never executed: return m_active;
m_active;
never executed: return m_active;
}
0
114 void setActive(bool a) {-
115 if (a == m_active
a == m_activeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpincharea
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickpincharea
)
2-28
116 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpincharea
2
117 m_active = a;-
118 activeChanged();-
119 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
28
120-
121public :-
122 void targetChanged();-
123 void minimumScaleChanged();-
124 void maximumScaleChanged();-
125 void minimumRotationChanged();-
126 void maximumRotationChanged();-
127 void dragAxisChanged();-
128 void minimumXChanged();-
129 void maximumXChanged();-
130 void minimumYChanged();-
131 void maximumYChanged();-
132 void activeChanged();-
133-
134private:-
135 QQuickItem *m_target;-
136 qreal m_minScale;-
137 qreal m_maxScale;-
138 qreal m_minRotation;-
139 qreal m_maxRotation;-
140 Axis m_axis;-
141 qreal m_xmin;-
142 qreal m_xmax;-
143 qreal m_ymin;-
144 qreal m_ymax;-
145 bool m_active;-
146};-
147-
148class __attribute__((visibility("default"))) QQuickPinchEvent : 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 -
169 -
170 -
171 -
172 -
173 -
174-
175public:-
176 QQuickPinchEvent(QPointF c, qreal s, qreal a, qreal r)-
177 : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r)-
178 , m_pointCount(0), m_accepted(true) {}
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
179-
180 QPointF center() const { return
executed 38 times by 1 test: return m_center;
Executed by:
  • tst_qquickpincharea
m_center;
executed 38 times by 1 test: return m_center;
Executed by:
  • tst_qquickpincharea
}
38
181 QPointF startCenter() const { return
never executed: return m_startCenter;
m_startCenter;
never executed: return m_startCenter;
}
0
182 void setStartCenter(QPointF c) { m_startCenter = c; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
183 QPointF previousCenter() const { return
never executed: return m_lastCenter;
m_lastCenter;
never executed: return m_lastCenter;
}
0
184 void setPreviousCenter(QPointF c) { m_lastCenter = c; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
185 qreal scale() const { return
executed 38 times by 1 test: return m_scale;
Executed by:
  • tst_qquickpincharea
m_scale;
executed 38 times by 1 test: return m_scale;
Executed by:
  • tst_qquickpincharea
}
38
186 qreal previousScale() const { return
never executed: return m_lastScale;
m_lastScale;
never executed: return m_lastScale;
}
0
187 void setPreviousScale(qreal s) { m_lastScale = s; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
188 qreal angle() const { return
never executed: return m_angle;
m_angle;
never executed: return m_angle;
}
0
189 qreal previousAngle() const { return
never executed: return m_lastAngle;
m_lastAngle;
never executed: return m_lastAngle;
}
0
190 void setPreviousAngle(qreal a) { m_lastAngle = a; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
191 qreal rotation() const { return
never executed: return m_rotation;
m_rotation;
never executed: return m_rotation;
}
0
192 QPointF point1() const { return
never executed: return m_point1;
m_point1;
never executed: return m_point1;
}
0
193 void setPoint1(QPointF p) { m_point1 = p; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
194 QPointF startPoint1() const { return
executed 4 times by 1 test: return m_startPoint1;
Executed by:
  • tst_qquickpincharea
m_startPoint1;
executed 4 times by 1 test: return m_startPoint1;
Executed by:
  • tst_qquickpincharea
}
4
195 void setStartPoint1(QPointF p) { m_startPoint1 = p; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
196 QPointF point2() const { return
never executed: return m_point2;
m_point2;
never executed: return m_point2;
}
0
197 void setPoint2(QPointF p) { m_point2 = p; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
198 QPointF startPoint2() const { return
executed 4 times by 1 test: return m_startPoint2;
Executed by:
  • tst_qquickpincharea
m_startPoint2;
executed 4 times by 1 test: return m_startPoint2;
Executed by:
  • tst_qquickpincharea
}
4
199 void setStartPoint2(QPointF p) { m_startPoint2 = p; }
executed 50 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
50
200 int pointCount() const { return
executed 38 times by 1 test: return m_pointCount;
Executed by:
  • tst_qquickpincharea
m_pointCount;
executed 38 times by 1 test: return m_pointCount;
Executed by:
  • tst_qquickpincharea
}
38
201 void setPointCount(int count) { m_pointCount = count; }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qquickpincharea
36
202-
203 bool accepted() const { return
executed 16 times by 1 test: return m_accepted;
Executed by:
  • tst_qquickpincharea
m_accepted;
executed 16 times by 1 test: return m_accepted;
Executed by:
  • tst_qquickpincharea
}
16
204 void setAccepted(bool a) { m_accepted = a; }
never executed: end of block
0
205-
206private:-
207 QPointF m_center;-
208 QPointF m_startCenter;-
209 QPointF m_lastCenter;-
210 qreal m_scale;-
211 qreal m_lastScale;-
212 qreal m_angle;-
213 qreal m_lastAngle;-
214 qreal m_rotation;-
215 QPointF m_point1;-
216 QPointF m_point2;-
217 QPointF m_startPoint1;-
218 QPointF m_startPoint2;-
219 int m_pointCount;-
220 bool m_accepted;-
221};-
222-
223-
224class QQuickMouseEvent;-
225class QQuickPinchAreaPrivate;-
226class __attribute__((visibility("default"))) QQuickPinchArea : public QQuickItem-
227{-
228 public:-
229#pragma GCC diagnostic push-
230 -
231#pragma GCC diagnostic ignored "-Wsuggest-override"-
232 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:-
233#pragma GCC diagnostic ignored "-Wattributes"-
234 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
235#pragma GCC diagnostic pop-
236 struct QPrivateSignal {};-
237-
238 -
239 -
240-
241public:-
242 QQuickPinchArea(QQuickItem *parent=nullptr);-
243 ~QQuickPinchArea();-
244-
245 bool isEnabled() const;-
246 void setEnabled(bool);-
247-
248 QQuickPinch *pinch();-
249-
250public :-
251 void enabledChanged();-
252 void pinchStarted(QQuickPinchEvent *pinch);-
253 void pinchUpdated(QQuickPinchEvent *pinch);-
254 void pinchFinished(QQuickPinchEvent *pinch);-
255 void smartZoom(QQuickPinchEvent *pinch);-
256-
257protected:-
258 bool childMouseEventFilter(QQuickItem *i, QEvent *e) override;-
259 void touchEvent(QTouchEvent *event) override;-
260-
261 void geometryChanged(const QRectF &newGeometry,-
262 const QRectF &oldGeometry) override;-
263 void itemChange(ItemChange change, const ItemChangeData& value) override;-
264 bool event(QEvent *) override;-
265-
266private:-
267 void clearPinch();-
268 void cancelPinch();-
269 void updatePinch();-
270 void updatePinchTarget();-
271 void handlePress();-
272 void handleRelease();-
273-
274private:-
275 QQuickPinchArea(const QQuickPinchArea &) = delete; QQuickPinchArea &operator=(const QQuickPinchArea &) = delete;-
276 inline QQuickPinchAreaPrivate* d_func() { return
executed 748 times by 3 tests: return reinterpret_cast<QQuickPinchAreaPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_examples
  • tst_qquickpincharea
  • tst_touchmouse
reinterpret_cast<QQuickPinchAreaPrivate *>(qGetPtrHelper(d_ptr));
executed 748 times by 3 tests: return reinterpret_cast<QQuickPinchAreaPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_examples
  • tst_qquickpincharea
  • tst_touchmouse
} inline const QQuickPinchAreaPrivate* d_func() const { return
never executed: return reinterpret_cast<const QQuickPinchAreaPrivate *>(qGetPtrHelper(d_ptr));
reinterpret_cast<const QQuickPinchAreaPrivate *>(qGetPtrHelper(d_ptr));
never executed: return reinterpret_cast<const QQuickPinchAreaPrivate *>(qGetPtrHelper(d_ptr));
} friend class QQuickPinchAreaPrivate;
0-748
277};-
278-
279-
280-
281 template <> struct QMetaTypeId< QQuickPinch * > { 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< QQuickPinch * >("QQuickPinch *", reinterpret_cast< QQuickPinch * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickPinch> > { 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<QQuickPinch> >("QQmlListProperty<QQuickPinch>", reinterpret_cast< QQmlListProperty<QQuickPinch> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
282 template <> struct QMetaTypeId< QQuickPinchEvent * > { 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< QQuickPinchEvent * >("QQuickPinchEvent *", reinterpret_cast< QQuickPinchEvent * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickPinchEvent> > { 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<QQuickPinchEvent> >("QQmlListProperty<QQuickPinchEvent>", reinterpret_cast< QQmlListProperty<QQuickPinchEvent> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
283 template <> struct QMetaTypeId< QQuickPinchArea * > { 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< QQuickPinchArea * >("QQuickPinchArea *", reinterpret_cast< QQuickPinchArea * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickPinchArea> > { 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<QQuickPinchArea> >("QQmlListProperty<QQuickPinchArea>", reinterpret_cast< QQmlListProperty<QQuickPinchArea> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0