Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickpathview_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | static_assert(bool(1 == 1), "Required feature " "quick_pathview" " for file " __FILE__ " not available."); | - | ||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | - | |||||||
9 | class QQmlChangeSet; | - | ||||||
10 | - | |||||||
11 | class QQuickPathViewPrivate; | - | ||||||
12 | class QQuickPathViewAttached; | - | ||||||
13 | class __attribute__((visibility("default"))) QQuickPathView : public QQuickItem | - | ||||||
14 | { | - | ||||||
15 | public: | - | ||||||
16 | #pragma GCC diagnostic push | - | ||||||
17 | - | |||||||
18 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||
19 | 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: | - | ||||||
20 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||
21 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||
22 | #pragma GCC diagnostic pop | - | ||||||
23 | struct QPrivateSignal {}; | - | ||||||
24 | - | |||||||
25 | - | |||||||
26 | - | |||||||
27 | - | |||||||
28 | - | |||||||
29 | - | |||||||
30 | - | |||||||
31 | - | |||||||
32 | - | |||||||
33 | - | |||||||
34 | - | |||||||
35 | - | |||||||
36 | - | |||||||
37 | - | |||||||
38 | - | |||||||
39 | - | |||||||
40 | - | |||||||
41 | - | |||||||
42 | - | |||||||
43 | - | |||||||
44 | - | |||||||
45 | - | |||||||
46 | - | |||||||
47 | - | |||||||
48 | - | |||||||
49 | - | |||||||
50 | - | |||||||
51 | - | |||||||
52 | - | |||||||
53 | - | |||||||
54 | - | |||||||
55 | - | |||||||
56 | public: | - | ||||||
57 | QQuickPathView(QQuickItem *parent = nullptr); | - | ||||||
58 | virtual ~QQuickPathView(); | - | ||||||
59 | - | |||||||
60 | QVariant model() const; | - | ||||||
61 | void setModel(const QVariant &); | - | ||||||
62 | - | |||||||
63 | QQuickPath *path() const; | - | ||||||
64 | void setPath(QQuickPath *); | - | ||||||
65 | - | |||||||
66 | int currentIndex() const; | - | ||||||
67 | void setCurrentIndex(int idx); | - | ||||||
68 | - | |||||||
69 | QQuickItem *currentItem() const; | - | ||||||
70 | - | |||||||
71 | qreal offset() const; | - | ||||||
72 | void setOffset(qreal offset); | - | ||||||
73 | - | |||||||
74 | QQmlComponent *highlight() const; | - | ||||||
75 | void setHighlight(QQmlComponent *highlight); | - | ||||||
76 | QQuickItem *highlightItem() const; | - | ||||||
77 | - | |||||||
78 | enum HighlightRangeMode { NoHighlightRange, ApplyRange, StrictlyEnforceRange }; | - | ||||||
79 | friend constexpr const QMetaObject *qt_getEnumMetaObject(HighlightRangeMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(HighlightRangeMode) noexcept { return "HighlightRangeMode"; } | - | ||||||
80 | HighlightRangeMode highlightRangeMode() const; | - | ||||||
81 | void setHighlightRangeMode(HighlightRangeMode mode); | - | ||||||
82 | - | |||||||
83 | qreal preferredHighlightBegin() const; | - | ||||||
84 | void setPreferredHighlightBegin(qreal); | - | ||||||
85 | - | |||||||
86 | qreal preferredHighlightEnd() const; | - | ||||||
87 | void setPreferredHighlightEnd(qreal); | - | ||||||
88 | - | |||||||
89 | int highlightMoveDuration() const; | - | ||||||
90 | void setHighlightMoveDuration(int); | - | ||||||
91 | - | |||||||
92 | qreal dragMargin() const; | - | ||||||
93 | void setDragMargin(qreal margin); | - | ||||||
94 | - | |||||||
95 | qreal flickDeceleration() const; | - | ||||||
96 | void setFlickDeceleration(qreal dec); | - | ||||||
97 | - | |||||||
98 | qreal maximumFlickVelocity() const; | - | ||||||
99 | void setMaximumFlickVelocity(qreal); | - | ||||||
100 | - | |||||||
101 | bool isInteractive() const; | - | ||||||
102 | void setInteractive(bool); | - | ||||||
103 | - | |||||||
104 | bool isMoving() const; | - | ||||||
105 | bool isFlicking() const; | - | ||||||
106 | bool isDragging() const; | - | ||||||
107 | - | |||||||
108 | int count() const; | - | ||||||
109 | - | |||||||
110 | QQmlComponent *delegate() const; | - | ||||||
111 | void setDelegate(QQmlComponent *); | - | ||||||
112 | - | |||||||
113 | int pathItemCount() const; | - | ||||||
114 | void setPathItemCount(int); | - | ||||||
115 | void resetPathItemCount(); | - | ||||||
116 | - | |||||||
117 | int cacheItemCount() const; | - | ||||||
118 | void setCacheItemCount(int); | - | ||||||
119 | - | |||||||
120 | enum SnapMode { NoSnap, SnapToItem, SnapOneItem }; | - | ||||||
121 | friend constexpr const QMetaObject *qt_getEnumMetaObject(SnapMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(SnapMode) noexcept { return "SnapMode"; } | - | ||||||
122 | SnapMode snapMode() const; | - | ||||||
123 | void setSnapMode(SnapMode mode); | - | ||||||
124 | - | |||||||
125 | enum MovementDirection { Shortest, Negative, Positive }; | - | ||||||
126 | friend constexpr const QMetaObject *qt_getEnumMetaObject(MovementDirection) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(MovementDirection) noexcept { return "MovementDirection"; } | - | ||||||
127 | MovementDirection movementDirection() const; | - | ||||||
128 | void setMovementDirection(MovementDirection dir); | - | ||||||
129 | - | |||||||
130 | enum PositionMode { Beginning, Center, End, Contain=4, SnapPosition }; | - | ||||||
131 | friend constexpr const QMetaObject *qt_getEnumMetaObject(PositionMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(PositionMode) noexcept { return "PositionMode"; } | - | ||||||
132 | void positionViewAtIndex(int index, int mode); | - | ||||||
133 | int indexAt(qreal x, qreal y) const; | - | ||||||
134 | QQuickItem *itemAt(qreal x, qreal y) const; | - | ||||||
135 | - | |||||||
136 | static QQuickPathViewAttached *qmlAttachedProperties(QObject *); | - | ||||||
137 | - | |||||||
138 | public : | - | ||||||
139 | void incrementCurrentIndex(); | - | ||||||
140 | void decrementCurrentIndex(); | - | ||||||
141 | - | |||||||
142 | public : | - | ||||||
143 | void currentIndexChanged(); | - | ||||||
144 | void currentItemChanged(); | - | ||||||
145 | void offsetChanged(); | - | ||||||
146 | void modelChanged(); | - | ||||||
147 | void countChanged(); | - | ||||||
148 | void pathChanged(); | - | ||||||
149 | void preferredHighlightBeginChanged(); | - | ||||||
150 | void preferredHighlightEndChanged(); | - | ||||||
151 | void highlightRangeModeChanged(); | - | ||||||
152 | void dragMarginChanged(); | - | ||||||
153 | void snapPositionChanged(); | - | ||||||
154 | void delegateChanged(); | - | ||||||
155 | void pathItemCountChanged(); | - | ||||||
156 | void maximumFlickVelocityChanged(); | - | ||||||
157 | void flickDecelerationChanged(); | - | ||||||
158 | void interactiveChanged(); | - | ||||||
159 | void movingChanged(); | - | ||||||
160 | void flickingChanged(); | - | ||||||
161 | void draggingChanged(); | - | ||||||
162 | void highlightChanged(); | - | ||||||
163 | void highlightItemChanged(); | - | ||||||
164 | void highlightMoveDurationChanged(); | - | ||||||
165 | void movementStarted(); | - | ||||||
166 | void movementEnded(); | - | ||||||
167 | void movementDirectionChanged(); | - | ||||||
168 | void flickStarted(); | - | ||||||
169 | void flickEnded(); | - | ||||||
170 | void dragStarted(); | - | ||||||
171 | void dragEnded(); | - | ||||||
172 | void snapModeChanged(); | - | ||||||
173 | void cacheItemCountChanged(); | - | ||||||
174 | - | |||||||
175 | protected: | - | ||||||
176 | void updatePolish() override; | - | ||||||
177 | void mousePressEvent(QMouseEvent *event) override; | - | ||||||
178 | void mouseMoveEvent(QMouseEvent *event) override; | - | ||||||
179 | void mouseReleaseEvent(QMouseEvent *) override; | - | ||||||
180 | bool sendMouseEvent(QMouseEvent *event); | - | ||||||
181 | bool childMouseEventFilter(QQuickItem *, QEvent *) override; | - | ||||||
182 | void mouseUngrabEvent() override; | - | ||||||
183 | void componentComplete() override; | - | ||||||
184 | - | |||||||
185 | private : | - | ||||||
186 | void refill(); | - | ||||||
187 | void ticked(); | - | ||||||
188 | void movementEnding(); | - | ||||||
189 | void modelUpdated(const QQmlChangeSet &changeSet, bool reset); | - | ||||||
190 | void createdItem(int index, QObject *item); | - | ||||||
191 | void initItem(int index, QObject *item); | - | ||||||
192 | void destroyingItem(QObject *item); | - | ||||||
193 | void pathUpdated(); | - | ||||||
194 | - | |||||||
195 | private: | - | ||||||
196 | friend class QQuickPathViewAttached; | - | ||||||
197 | QQuickPathView(const QQuickPathView &) = delete; QQuickPathView &operator=(const QQuickPathView &) = delete; | - | ||||||
198 | inline QQuickPathViewPrivate* d_func() { return executed 19000 times by 3 tests: reinterpret_cast<QQuickPathViewPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQuickPathViewPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 19000 times by 3 tests: } inline const QQuickPathViewPrivate* d_func() const { returnreturn reinterpret_cast<QQuickPathViewPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 4003 times by 3 tests: reinterpret_cast<const QQuickPathViewPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQuickPathViewPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 4003 times by 3 tests: } friend class QQuickPathViewPrivate;return reinterpret_cast<const QQuickPathViewPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
| 4003-19000 | ||||||
199 | }; | - | ||||||
200 | - | |||||||
201 | class QQmlOpenMetaObject; | - | ||||||
202 | class QQuickPathViewAttached : public QObject | - | ||||||
203 | { | - | ||||||
204 | public: | - | ||||||
205 | #pragma GCC diagnostic push | - | ||||||
206 | - | |||||||
207 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||
208 | 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: | - | ||||||
209 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||
210 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||
211 | #pragma GCC diagnostic pop | - | ||||||
212 | struct QPrivateSignal {}; | - | ||||||
213 | - | |||||||
214 | - | |||||||
215 | - | |||||||
216 | - | |||||||
217 | - | |||||||
218 | public: | - | ||||||
219 | QQuickPathViewAttached(QObject *parent); | - | ||||||
220 | ~QQuickPathViewAttached(); | - | ||||||
221 | - | |||||||
222 | QQuickPathView *view() const { return executed 312 times by 1 test: m_view;return m_view; Executed by:
executed 312 times by 1 test: }return m_view; Executed by:
| 312 | ||||||
223 | - | |||||||
224 | bool isCurrentItem() const { return executed 3396 times by 2 tests: m_isCurrent;return m_isCurrent; Executed by:
executed 3396 times by 2 tests: }return m_isCurrent; Executed by:
| 3396 | ||||||
225 | void setIsCurrentItem(bool c) { | - | ||||||
226 | if (m_isCurrent != c
| 20-1514 | ||||||
227 | m_isCurrent = c; | - | ||||||
228 | currentItemChanged(); | - | ||||||
229 | } executed 1514 times by 3 tests: end of block Executed by:
| 1514 | ||||||
230 | } executed 1534 times by 3 tests: end of block Executed by:
| 1534 | ||||||
231 | - | |||||||
232 | QVariant value(const QByteArray &name) const; | - | ||||||
233 | void setValue(const QByteArray &name, const QVariant &val); | - | ||||||
234 | - | |||||||
235 | bool isOnPath() const { return executed 1554 times by 2 tests: m_onPath;return m_onPath; Executed by:
executed 1554 times by 2 tests: }return m_onPath; Executed by:
| 1554 | ||||||
236 | void setOnPath(bool on) { | - | ||||||
237 | if (on != m_onPath
| 5531-41157 | ||||||
238 | m_onPath = on; | - | ||||||
239 | pathChanged(); | - | ||||||
240 | } executed 5531 times by 3 tests: end of block Executed by:
| 5531 | ||||||
241 | } executed 46688 times by 3 tests: end of block Executed by:
| 46688 | ||||||
242 | qreal m_percent; | - | ||||||
243 | - | |||||||
244 | public : | - | ||||||
245 | void currentItemChanged(); | - | ||||||
246 | void pathChanged(); | - | ||||||
247 | - | |||||||
248 | private: | - | ||||||
249 | friend class QQuickPathViewPrivate; | - | ||||||
250 | friend class QQuickPathView; | - | ||||||
251 | QQuickPathView *m_view; | - | ||||||
252 | QQmlOpenMetaObject *m_metaobject; | - | ||||||
253 | bool m_onPath : 1; | - | ||||||
254 | bool m_isCurrent : 1; | - | ||||||
255 | }; | - | ||||||
256 | - | |||||||
257 | - | |||||||
258 | - | |||||||
259 | - | |||||||
260 | template <> struct QMetaTypeId< QQuickPathView * > { 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< QQuickPathView * >("QQuickPathView *", reinterpret_cast< QQuickPathView * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickPathView> > { 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<QQuickPathView> >("QQmlListProperty<QQuickPathView>", reinterpret_cast< QQmlListProperty<QQuickPathView> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - | ||||||
261 | template <> class QQmlTypeInfo<QQuickPathView > { public: enum { hasAttachedProperties = (((QML_HAS_ATTACHED_PROPERTIES) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) }; }; | - | ||||||
Switch to Source code | Preprocessed file |