| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/handlers/qquickpointerhandler_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | extern const QLoggingCategory &lcPointerHandlerDispatch(); | - |
| 5 | - | |
| 6 | class QQuickPointerHandlerPrivate; | - |
| 7 | - | |
| 8 | class __attribute__((visibility("default"))) QQuickPointerHandler : public QObject, public QQmlParserStatus | - |
| 9 | { | - |
| 10 | public: | - |
| 11 | #pragma GCC diagnostic push | - |
| 12 | - | |
| 13 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
| 14 | 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: | - |
| 15 | #pragma GCC diagnostic ignored "-Wattributes" | - |
| 16 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
| 17 | #pragma GCC diagnostic pop | - |
| 18 | struct QPrivateSignal {}; | - |
| 19 | - | |
| 20 | - | |
| 21 | - | |
| 22 | - | |
| 23 | - | |
| 24 | - | |
| 25 | - | |
| 26 | - | |
| 27 | - | |
| 28 | public: | - |
| 29 | explicit QQuickPointerHandler(QObject *parent = nullptr); | - |
| 30 | virtual ~QQuickPointerHandler(); | - |
| 31 | - | |
| 32 | enum GrabPermission { | - |
| 33 | TakeOverForbidden = 0x0, | - |
| 34 | CanTakeOverFromHandlersOfSameType = 0x01, | - |
| 35 | CanTakeOverFromHandlersOfDifferentType= 0x02, | - |
| 36 | CanTakeOverFromItems = 0x04, | - |
| 37 | CanTakeOverFromAnything = 0x0F, | - |
| 38 | ApprovesTakeOverByHandlersOfSameType = 0x10, | - |
| 39 | ApprovesTakeOverByHandlersOfDifferentType= 0x20, | - |
| 40 | ApprovesTakeOverByItems = 0x40, | - |
| 41 | ApprovesCancellation = 0x80, | - |
| 42 | ApprovesTakeOverByAnything = 0xF0 | - |
| 43 | }; | - |
| 44 | typedef QFlags<GrabPermission> GrabPermissions; | - |
| 45 | friend constexpr const QMetaObject *qt_getEnumMetaObject(GrabPermissions) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(GrabPermissions) noexcept { return "GrabPermissions"; } | - |
| 46 | - | |
| 47 | public: | - |
| 48 | bool enabled() const; | - |
| 49 | void setEnabled(bool enabled); | - |
| 50 | - | |
| 51 | bool active() const; | - |
| 52 | - | |
| 53 | QQuickItem *target() const; | - |
| 54 | void setTarget(QQuickItem *target); | - |
| 55 | - | |
| 56 | QQuickItem * parentItem() const; | - |
| 57 | - | |
| 58 | void handlePointerEvent(QQuickPointerEvent *event); | - |
| 59 | - | |
| 60 | GrabPermissions grabPermissions() const; | - |
| 61 | void setGrabPermissions(GrabPermissions grabPermissions); | - |
| 62 | - | |
| 63 | qreal margin() const; | - |
| 64 | void setMargin(qreal pointDistanceThreshold); | - |
| 65 | - | |
| 66 | public : | - |
| 67 | void enabledChanged(); | - |
| 68 | void activeChanged(); | - |
| 69 | void targetChanged(); | - |
| 70 | void marginChanged(); | - |
| 71 | void grabChanged(QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point); | - |
| 72 | void grabPermissionChanged(); | - |
| 73 | void canceled(QQuickEventPoint *point); | - |
| 74 | - | |
| 75 | protected: | - |
| 76 | QQuickPointerHandler(QQuickPointerHandlerPrivate &dd, QObject *parent); | - |
| 77 | - | |
| 78 | void classBegin() override; | - |
| 79 | void componentComplete() override; | - |
| 80 | - | |
| 81 | QQuickPointerEvent *currentEvent(); | - |
| 82 | virtual bool wantsPointerEvent(QQuickPointerEvent *event); | - |
| 83 | virtual bool wantsEventPoint(QQuickEventPoint *point); | - |
| 84 | virtual void handlePointerEventImpl(QQuickPointerEvent *event); | - |
| 85 | void setActive(bool active); | - |
| 86 | virtual void onTargetChanged(QQuickItem *oldTarget) { (void)oldTarget;; } executed 80 times by 2 tests: end of blockExecuted by:
| 80 |
| 87 | virtual void onActiveChanged() { } | - |
| 88 | virtual void onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point); | - |
| 89 | virtual bool canGrab(QQuickEventPoint *point); | - |
| 90 | virtual bool approveGrabTransition(QQuickEventPoint *point, QObject *proposedGrabber); | - |
| 91 | void setPassiveGrab(QQuickEventPoint *point, bool grab = true); | - |
| 92 | bool setExclusiveGrab(QQuickEventPoint *point, bool grab = true); | - |
| 93 | void cancelAllGrabs(QQuickEventPoint *point); | - |
| 94 | QPointF eventPos(const QQuickEventPoint *point) const; | - |
| 95 | bool parentContains(const QQuickEventPoint *point) const; | - |
| 96 | - | |
| 97 | friend class QQuickEventPoint; | - |
| 98 | friend class QQuickItemPrivate; | - |
| 99 | friend class QQuickWindowPrivate; | - |
| 100 | - | |
| 101 | inline QQuickPointerHandlerPrivate* d_func() { return executed 6560 times by 5 tests: reinterpret_cast<QQuickPointerHandlerPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQuickPointerHandlerPrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 6560 times by 5 tests: } inline const QQuickPointerHandlerPrivate* d_func() const { returnreturn reinterpret_cast<QQuickPointerHandlerPrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 12421 times by 5 tests: reinterpret_cast<const QQuickPointerHandlerPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQuickPointerHandlerPrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 12421 times by 5 tests: } friend class QQuickPointerHandlerPrivate;return reinterpret_cast<const QQuickPointerHandlerPrivate *>(qGetPtrHelper(d_ptr));Executed by:
| 6560-12421 |
| 102 | }; | - |
| 103 | - | |
| 104 | constexpr inline QFlags<QQuickPointerHandler::GrabPermissions::enum_type> operator|(QQuickPointerHandler::GrabPermissions::enum_type f1, QQuickPointerHandler::GrabPermissions::enum_type f2) noexcept { return QFlags<QQuickPointerHandler::GrabPermissions::enum_type>(f1) | f2; } constexpr inline QFlags<QQuickPointerHandler::GrabPermissions::enum_type> operator|(QQuickPointerHandler::GrabPermissions::enum_type f1, QFlags<QQuickPointerHandler::GrabPermissions::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QQuickPointerHandler::GrabPermissions::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); } | - |
| 105 | - | |
| 106 | - | |
| 107 | - | |
| 108 | template <> struct QMetaTypeId< QQuickPointerHandler * > { 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< QQuickPointerHandler * >("QQuickPointerHandler *", reinterpret_cast< QQuickPointerHandler * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickPointerHandler> > { 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<QQuickPointerHandler> >("QQmlListProperty<QQuickPointerHandler>", reinterpret_cast< QQmlListProperty<QQuickPointerHandler> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
| Switch to Source code | Preprocessed file |