OpenCoverage

qquicktaphandler_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/handlers/qquicktaphandler_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class __attribute__((visibility("default"))) QQuickTapHandler : public QQuickSinglePointHandler-
6{-
7 public:-
8#pragma GCC diagnostic push-
9 -
10#pragma GCC diagnostic ignored "-Wsuggest-override"-
11 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:-
12#pragma GCC diagnostic ignored "-Wattributes"-
13 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
14#pragma GCC diagnostic pop-
15 struct QPrivateSignal {};-
16 -
17 -
18 -
19 -
20 -
21-
22public:-
23 enum GesturePolicy {-
24 DragThreshold,-
25 WithinBounds,-
26 ReleaseWithinBounds-
27 };-
28 friend constexpr const QMetaObject *qt_getEnumMetaObject(GesturePolicy) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(GesturePolicy) noexcept { return "GesturePolicy"; }-
29-
30 explicit QQuickTapHandler(QObject *parent = nullptr);-
31 ~QQuickTapHandler();-
32-
33 bool isPressed() const { return
executed 1868 times by 4 tests: return m_pressed;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
m_pressed;
executed 1868 times by 4 tests: return m_pressed;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickdraghandler
  • tst_qquicktaphandler
}
1868
34-
35 int tapCount() const { return
never executed: return m_tapCount;
m_tapCount;
never executed: return m_tapCount;
}
0
36 qreal timeHeld() const { return
executed 696 times by 2 tests: return (m_holdTimer.isValid() ? m_holdTimer.elapsed() / 1000.0 : -1.0);
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
(m_holdTimer.isValid() ? m_holdTimer.elapsed() / 1000.0 : -1.0);
executed 696 times by 2 tests: return (m_holdTimer.isValid() ? m_holdTimer.elapsed() / 1000.0 : -1.0);
Executed by:
  • tst_flickableinterop
  • tst_qquicktaphandler
}
696
37-
38 qreal longPressThreshold() const;-
39 void setLongPressThreshold(qreal longPressThreshold);-
40-
41 GesturePolicy gesturePolicy() const { return
never executed: return m_gesturePolicy;
m_gesturePolicy;
never executed: return m_gesturePolicy;
}
0
42 void setGesturePolicy(GesturePolicy gesturePolicy);-
43-
44public :-
45 void pressedChanged();-
46 void tapCountChanged();-
47 void timeHeldChanged();-
48 void longPressThresholdChanged();-
49 void gesturePolicyChanged();-
50 void tapped();-
51 void singleTapped();-
52 void doubleTapped();-
53 void longPressed();-
54-
55protected:-
56 void onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point) override;-
57 void timerEvent(QTimerEvent *event) override;-
58 bool wantsEventPoint(QQuickEventPoint *point) override;-
59 void handleEventPoint(QQuickEventPoint *point) override;-
60-
61private:-
62 void setPressed(bool press, bool cancel, QQuickEventPoint *point);-
63 int longPressThresholdMilliseconds() const;-
64 void connectPreRenderSignal(bool conn = true);-
65 void updateTimeHeld();-
66-
67private:-
68 bool m_pressed;-
69 GesturePolicy m_gesturePolicy;-
70 int m_tapCount;-
71 int m_longPressThreshold;-
72 QBasicTimer m_longPressTimer;-
73 QElapsedTimer m_holdTimer;-
74 QPointF m_lastTapPos;-
75 qreal m_lastTapTimestamp;-
76-
77 static qreal m_multiTapInterval;-
78 static int m_mouseMultiClickDistanceSquared;-
79 static int m_touchMultiTapDistanceSquared;-
80};-
81-
82-
83-
84 template <> struct QMetaTypeId< QQuickTapHandler * > { 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< QQuickTapHandler * >("QQuickTapHandler *", reinterpret_cast< QQuickTapHandler * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickTapHandler> > { 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<QQuickTapHandler> >("QQmlListProperty<QQuickTapHandler>", reinterpret_cast< QQmlListProperty<QQuickTapHandler> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0