Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/handlers/qquickdraghandler_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | class __attribute__((visibility("default"))) QQuickDragHandler : public QQuickSinglePointHandler | - |
5 | { | - |
6 | public: | - |
7 | #pragma GCC diagnostic push | - |
8 | - | |
9 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
10 | 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: | - |
11 | #pragma GCC diagnostic ignored "-Wattributes" | - |
12 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
13 | #pragma GCC diagnostic pop | - |
14 | struct QPrivateSignal {}; | - |
15 | - | |
16 | - | |
17 | - | |
18 | - | |
19 | public: | - |
20 | explicit QQuickDragHandler(QObject *parent = nullptr); | - |
21 | ~QQuickDragHandler(); | - |
22 | - | |
23 | void handleEventPoint(QQuickEventPoint *point) override; | - |
24 | - | |
25 | QQuickDragAxis *xAxis() { return executed 194 times by 2 tests: &m_xAxis;return &m_xAxis; Executed by:
executed 194 times by 2 tests: }return &m_xAxis; Executed by:
| 194 |
26 | QQuickDragAxis *yAxis() { return executed 2164 times by 2 tests: &m_yAxis;return &m_yAxis; Executed by:
executed 2164 times by 2 tests: }return &m_yAxis; Executed by:
| 2164 |
27 | - | |
28 | QVector2D translation() const { return executed 26 times by 1 test: m_translation;return m_translation; Executed by:
executed 26 times by 1 test: }return m_translation; Executed by:
| 26 |
29 | void setTranslation(const QVector2D &trans); | - |
30 | - | |
31 | void enforceConstraints(); | - |
32 | - | |
33 | public : | - |
34 | - | |
35 | void translationChanged(); | - |
36 | - | |
37 | protected: | - |
38 | bool wantsEventPoint(QQuickEventPoint *point) override; | - |
39 | void onActiveChanged() override; | - |
40 | void onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point) override; | - |
41 | - | |
42 | private: | - |
43 | void ungrab(); | - |
44 | void enforceAxisConstraints(QPointF *localPos); | - |
45 | bool targetContains(QQuickEventPoint *point); | - |
46 | QPointF localTargetPosition(QQuickEventPoint *point); | - |
47 | - | |
48 | private: | - |
49 | QPointF m_pressScenePos; | - |
50 | QPointF m_pressTargetPos; | - |
51 | - | |
52 | - | |
53 | QVector2D m_translation; | - |
54 | - | |
55 | QQuickDragAxis m_xAxis; | - |
56 | QQuickDragAxis m_yAxis; | - |
57 | bool m_pressedInsideTarget = false; | - |
58 | - | |
59 | friend class QQuickDragAxis; | - |
60 | }; | - |
61 | - | |
62 | - | |
63 | - | |
64 | template <> struct QMetaTypeId< QQuickDragHandler * > { 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< QQuickDragHandler * >("QQuickDragHandler *", reinterpret_cast< QQuickDragHandler * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickDragHandler> > { 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<QQuickDragHandler> >("QQmlListProperty<QQuickDragHandler>", reinterpret_cast< QQmlListProperty<QQuickDragHandler> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
65 | template <> struct QMetaTypeId< QQuickDragAxis * > { 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< QQuickDragAxis * >("QQuickDragAxis *", reinterpret_cast< QQuickDragAxis * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickDragAxis> > { 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<QQuickDragAxis> >("QQmlListProperty<QQuickDragAxis>", reinterpret_cast< QQmlListProperty<QQuickDragAxis> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
Switch to Source code | Preprocessed file |