| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickitemviewtransition_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | static_assert(bool(1 == 1), "Required feature " "quick_viewtransitions" " for file " __FILE__ " not available."); | - |
| 3 | - | |
| 4 | - | |
| 5 | - | |
| 6 | - | |
| 7 | class QQuickItem; | - |
| 8 | class QQuickTransition; | - |
| 9 | class QQuickItemViewTransitionableItem; | - |
| 10 | class QQuickItemViewTransitionJob; | - |
| 11 | - | |
| 12 | - | |
| 13 | class __attribute__((visibility("default"))) QQuickItemViewTransitionChangeListener | - |
| 14 | { | - |
| 15 | public: | - |
| 16 | QQuickItemViewTransitionChangeListener() {} | - |
| 17 | virtual ~QQuickItemViewTransitionChangeListener() {} | - |
| 18 | - | |
| 19 | virtual void viewItemTransitionFinished(QQuickItemViewTransitionableItem *item) = 0; | - |
| 20 | }; | - |
| 21 | - | |
| 22 | - | |
| 23 | class __attribute__((visibility("default"))) QQuickItemViewTransitioner | - |
| 24 | { | - |
| 25 | public: | - |
| 26 | enum TransitionType { | - |
| 27 | NoTransition, | - |
| 28 | PopulateTransition, | - |
| 29 | AddTransition, | - |
| 30 | MoveTransition, | - |
| 31 | RemoveTransition | - |
| 32 | }; | - |
| 33 | - | |
| 34 | QQuickItemViewTransitioner(); | - |
| 35 | virtual ~QQuickItemViewTransitioner(); | - |
| 36 | - | |
| 37 | bool canTransition(QQuickItemViewTransitioner::TransitionType type, bool asTarget) const; | - |
| 38 | void transitionNextReposition(QQuickItemViewTransitionableItem *item, QQuickItemViewTransitioner::TransitionType type, bool isTarget); | - |
| 39 | - | |
| 40 | void addToTargetLists(QQuickItemViewTransitioner::TransitionType type, QQuickItemViewTransitionableItem *item, int index); | - |
| 41 | void resetTargetLists(); | - |
| 42 | - | |
| 43 | QQuickTransition *transitionObject(QQuickItemViewTransitioner::TransitionType type, bool asTarget) const; | - |
| 44 | const QList<int> &targetIndexes(QQuickItemViewTransitioner::TransitionType type) const; | - |
| 45 | const QList<QObject *> &targetItems(QQuickItemViewTransitioner::TransitionType type) const; | - |
| 46 | - | |
| 47 | inline void setPopulateTransitionEnabled(bool b) { usePopulateTransition = b; } executed 3340 times by 5 tests: end of blockExecuted by:
| 3340 |
| 48 | inline bool populateTransitionEnabled() const { return executed 3708 times by 2 tests: usePopulateTransition;return usePopulateTransition;Executed by:
executed 3708 times by 2 tests: }return usePopulateTransition;Executed by:
| 3708 |
| 49 | - | |
| 50 | inline void setChangeListener(QQuickItemViewTransitionChangeListener *obj) { changeListener = obj; } executed 832 times by 4 tests: end of blockExecuted by:
| 832 |
| 51 | - | |
| 52 | QSet<QQuickItemViewTransitionJob *> runningJobs; | - |
| 53 | - | |
| 54 | QList<int> addTransitionIndexes; | - |
| 55 | QList<int> moveTransitionIndexes; | - |
| 56 | QList<int> removeTransitionIndexes; | - |
| 57 | QList<QObject *> addTransitionTargets; | - |
| 58 | QList<QObject *> moveTransitionTargets; | - |
| 59 | QList<QObject *> removeTransitionTargets; | - |
| 60 | - | |
| 61 | QQmlGuard<QQuickTransition> populateTransition; | - |
| 62 | QQmlGuard<QQuickTransition> addTransition; | - |
| 63 | QQmlGuard<QQuickTransition> addDisplacedTransition; | - |
| 64 | QQmlGuard<QQuickTransition> moveTransition; | - |
| 65 | QQmlGuard<QQuickTransition> moveDisplacedTransition; | - |
| 66 | QQmlGuard<QQuickTransition> removeTransition; | - |
| 67 | QQmlGuard<QQuickTransition> removeDisplacedTransition; | - |
| 68 | QQmlGuard<QQuickTransition> displacedTransition; | - |
| 69 | - | |
| 70 | private: | - |
| 71 | friend class QQuickItemViewTransitionJob; | - |
| 72 | - | |
| 73 | QQuickItemViewTransitionChangeListener *changeListener; | - |
| 74 | bool usePopulateTransition; | - |
| 75 | - | |
| 76 | void finishedTransition(QQuickItemViewTransitionJob *job, QQuickItemViewTransitionableItem *item); | - |
| 77 | }; | - |
| 78 | - | |
| 79 | - | |
| 80 | - | |
| 81 | - | |
| 82 | - | |
| 83 | class __attribute__((visibility("default"))) QQuickItemViewTransitionableItem | - |
| 84 | { | - |
| 85 | public: | - |
| 86 | QQuickItemViewTransitionableItem(QQuickItem *i); | - |
| 87 | virtual ~QQuickItemViewTransitionableItem(); | - |
| 88 | - | |
| 89 | qreal itemX() const; | - |
| 90 | qreal itemY() const; | - |
| 91 | - | |
| 92 | void moveTo(const QPointF &pos, bool immediate = false); | - |
| 93 | - | |
| 94 | bool transitionScheduledOrRunning() const; | - |
| 95 | bool transitionRunning() const; | - |
| 96 | bool isPendingRemoval() const; | - |
| 97 | - | |
| 98 | bool prepareTransition(QQuickItemViewTransitioner *transitioner, int index, const QRectF &viewBounds); | - |
| 99 | void startTransition(QQuickItemViewTransitioner *transitioner, int index); | - |
| 100 | - | |
| 101 | QPointF nextTransitionTo; | - |
| 102 | QPointF lastMovedTo; | - |
| 103 | QPointF nextTransitionFrom; | - |
| 104 | QQuickItem *item; | - |
| 105 | QQuickItemViewTransitionJob *transition; | - |
| 106 | QQuickItemViewTransitioner::TransitionType nextTransitionType; | - |
| 107 | bool isTransitionTarget : 1; | - |
| 108 | bool nextTransitionToSet : 1; | - |
| 109 | bool nextTransitionFromSet : 1; | - |
| 110 | bool lastMovedToSet : 1; | - |
| 111 | bool prepared : 1; | - |
| 112 | - | |
| 113 | private: | - |
| 114 | friend class QQuickItemViewTransitioner; | - |
| 115 | friend class QQuickItemViewTransitionJob; | - |
| 116 | void setNextTransition(QQuickItemViewTransitioner::TransitionType, bool isTargetItem); | - |
| 117 | bool transitionWillChangePosition() const; | - |
| 118 | void finishedTransition(); | - |
| 119 | void resetNextTransitionPos(); | - |
| 120 | void clearCurrentScheduledTransition(); | - |
| 121 | void stopTransition(); | - |
| 122 | }; | - |
| 123 | - | |
| 124 | - | |
| 125 | class QQuickViewTransitionAttached : public QObject | - |
| 126 | { | - |
| 127 | public: | - |
| 128 | #pragma GCC diagnostic push | - |
| 129 | - | |
| 130 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
| 131 | 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: | - |
| 132 | #pragma GCC diagnostic ignored "-Wattributes" | - |
| 133 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
| 134 | #pragma GCC diagnostic pop | - |
| 135 | struct QPrivateSignal {}; | - |
| 136 | - | |
| 137 | - | |
| 138 | - | |
| 139 | - | |
| 140 | - | |
| 141 | - | |
| 142 | - | |
| 143 | - | |
| 144 | public: | - |
| 145 | QQuickViewTransitionAttached(QObject *parent); | - |
| 146 | - | |
| 147 | int index() const { return executed 8560 times by 3 tests: m_index;return m_index;Executed by:
executed 8560 times by 3 tests: }return m_index;Executed by:
| 8560 |
| 148 | QQuickItem *item() const { return executed 8566 times by 3 tests: m_item;return m_item;Executed by:
executed 8566 times by 3 tests: }return m_item;Executed by:
| 8566 |
| 149 | QPointF destination() const { return never executed: m_destination;return m_destination;never executed: }return m_destination; | 0 |
| 150 | - | |
| 151 | QList<int> targetIndexes() const { return executed 9018 times by 3 tests: m_targetIndexes;return m_targetIndexes;Executed by:
executed 9018 times by 3 tests: }return m_targetIndexes;Executed by:
| 9018 |
| 152 | QQmlListProperty<QObject> targetItems(); | - |
| 153 | - | |
| 154 | static QQuickViewTransitionAttached *qmlAttachedProperties(QObject *); | - |
| 155 | - | |
| 156 | public : | - |
| 157 | void indexChanged(); | - |
| 158 | void itemChanged(); | - |
| 159 | void destinationChanged(); | - |
| 160 | - | |
| 161 | void targetIndexesChanged(); | - |
| 162 | void targetItemsChanged(); | - |
| 163 | - | |
| 164 | private: | - |
| 165 | friend class QQuickItemViewTransitionJob; | - |
| 166 | QPointF m_destination; | - |
| 167 | QList<int> m_targetIndexes; | - |
| 168 | QList<QObject *> m_targetItems; | - |
| 169 | - | |
| 170 | QQuickItem *m_item; | - |
| 171 | int m_index; | - |
| 172 | }; | - |
| 173 | - | |
| 174 | - | |
| 175 | - | |
| 176 | template <> struct QMetaTypeId< QQuickViewTransitionAttached * > { 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< QQuickViewTransitionAttached * >("QQuickViewTransitionAttached *", reinterpret_cast< QQuickViewTransitionAttached * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickViewTransitionAttached> > { 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<QQuickViewTransitionAttached> >("QQmlListProperty<QQuickViewTransitionAttached>", reinterpret_cast< QQmlListProperty<QQuickViewTransitionAttached> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
| 177 | template <> class QQmlTypeInfo<QQuickViewTransitionAttached > { public: enum { hasAttachedProperties = (((QML_HAS_ATTACHED_PROPERTIES) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) }; }; | - |
| Switch to Source code | Preprocessed file |