Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/types/qqmldelegatemodel_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | static_assert(bool(1 == 1), "Required feature " "qml_delegate_model" " for file " __FILE__ " not available."); | - |
5 | - | |
6 | - | |
7 | - | |
8 | class QQmlChangeSet; | - |
9 | class QQmlComponent; | - |
10 | class QQuickPackage; | - |
11 | class QQmlV4Function; | - |
12 | class QQmlDelegateModelGroup; | - |
13 | class QQmlDelegateModelAttached; | - |
14 | class QQmlDelegateModelPrivate; | - |
15 | - | |
16 | - | |
17 | class __attribute__((visibility("default"))) QQmlDelegateModel : public QQmlInstanceModel, public QQmlParserStatus | - |
18 | { | - |
19 | public: | - |
20 | #pragma GCC diagnostic push | - |
21 | - | |
22 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
23 | 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: | - |
24 | #pragma GCC diagnostic ignored "-Wattributes" | - |
25 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
26 | #pragma GCC diagnostic pop | - |
27 | struct QPrivateSignal {}; | - |
28 | inline QQmlDelegateModelPrivate* d_func() { return executed 315762 times by 27 tests: reinterpret_cast<QQmlDelegateModelPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQmlDelegateModelPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 315762 times by 27 tests: } inline const QQmlDelegateModelPrivate* d_func() const { returnreturn reinterpret_cast<QQmlDelegateModelPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 652908 times by 26 tests: reinterpret_cast<const QQmlDelegateModelPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQmlDelegateModelPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 652908 times by 26 tests: } friend class QQmlDelegateModelPrivate;return reinterpret_cast<const QQmlDelegateModelPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
| 315762-652908 |
29 | - | |
30 | - | |
31 | - | |
32 | - | |
33 | - | |
34 | - | |
35 | - | |
36 | - | |
37 | - | |
38 | - | |
39 | - | |
40 | - | |
41 | - | |
42 | public: | - |
43 | QQmlDelegateModel(); | - |
44 | QQmlDelegateModel(QQmlContext *, QObject *parent=nullptr); | - |
45 | ~QQmlDelegateModel(); | - |
46 | - | |
47 | void classBegin() override; | - |
48 | void componentComplete() override; | - |
49 | - | |
50 | QVariant model() const; | - |
51 | void setModel(const QVariant &); | - |
52 | - | |
53 | QQmlComponent *delegate() const; | - |
54 | void setDelegate(QQmlComponent *); | - |
55 | - | |
56 | QVariant rootIndex() const; | - |
57 | void setRootIndex(const QVariant &root); | - |
58 | - | |
59 | int rows() const; | - |
60 | int columns() const; | - |
61 | - | |
62 | QVariant modelIndex(int idx) const; | - |
63 | QVariant parentModelIndex() const; | - |
64 | - | |
65 | int count() const override; | - |
66 | bool isValid() const override { return never executed: delegate() != nullptr;return delegate() != nullptr; never executed: }return delegate() != nullptr; | 0 |
67 | QObject *object(int index, QQmlIncubator::IncubationMode incubationMode = QQmlIncubator::AsynchronousIfNested) override; | - |
68 | ReleaseFlags release(QObject *object) override; | - |
69 | void cancel(int index) override; | - |
70 | QString stringValue(int index, const QString &role) override; | - |
71 | void setWatchedRoles(const QList<QByteArray> &roles) override; | - |
72 | QQmlIncubator::Status incubationStatus(int index) override; | - |
73 | - | |
74 | int indexOf(QObject *object, QObject *objectContext) const override; | - |
75 | - | |
76 | QString filterGroup() const; | - |
77 | void setFilterGroup(const QString &group); | - |
78 | void resetFilterGroup(); | - |
79 | - | |
80 | QQmlDelegateModelGroup *items(); | - |
81 | QQmlDelegateModelGroup *persistedItems(); | - |
82 | QQmlListProperty<QQmlDelegateModelGroup> groups(); | - |
83 | QObject *parts(); | - |
84 | - | |
85 | const QAbstractItemModel *abstractItemModel() const override; | - |
86 | - | |
87 | bool event(QEvent *) override; | - |
88 | - | |
89 | static QQmlDelegateModelAttached *qmlAttachedProperties(QObject *obj); | - |
90 | - | |
91 | public : | - |
92 | void filterGroupChanged(); | - |
93 | void defaultGroupsChanged(); | - |
94 | void rootIndexChanged(); | - |
95 | void rowsChanged(); | - |
96 | void columnsChanged(); | - |
97 | - | |
98 | private : | - |
99 | void _q_itemsChanged(int index, int count, const QVector<int> &roles); | - |
100 | void _q_itemsInserted(int index, int count); | - |
101 | void _q_itemsRemoved(int index, int count); | - |
102 | void _q_itemsMoved(int from, int to, int count); | - |
103 | void _q_modelReset(); | - |
104 | void _q_rowsInserted(const QModelIndex &,int,int); | - |
105 | void _q_rowsAboutToBeRemoved(const QModelIndex &parent, int begin, int end); | - |
106 | void _q_rowsRemoved(const QModelIndex &,int,int); | - |
107 | void _q_rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int); | - |
108 | void _q_dataChanged(const QModelIndex&,const QModelIndex&,const QVector<int> &); | - |
109 | void _q_layoutChanged(const QList<QPersistentModelIndex>&, QAbstractItemModel::LayoutChangeHint); | - |
110 | - | |
111 | private: | - |
112 | bool isDescendantOf(const QPersistentModelIndex &desc, const QList<QPersistentModelIndex> &parents) const; | - |
113 | - | |
114 | QQmlDelegateModel(const QQmlDelegateModel &) = delete; QQmlDelegateModel &operator=(const QQmlDelegateModel &) = delete; | - |
115 | }; | - |
116 | - | |
117 | class QQmlDelegateModelGroupPrivate; | - |
118 | class __attribute__((visibility("default"))) QQmlDelegateModelGroup : public QObject | - |
119 | { | - |
120 | public: | - |
121 | #pragma GCC diagnostic push | - |
122 | - | |
123 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
124 | 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: | - |
125 | #pragma GCC diagnostic ignored "-Wattributes" | - |
126 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
127 | #pragma GCC diagnostic pop | - |
128 | struct QPrivateSignal {}; | - |
129 | - | |
130 | - | |
131 | - | |
132 | public: | - |
133 | QQmlDelegateModelGroup(QObject *parent = nullptr); | - |
134 | QQmlDelegateModelGroup(const QString &name, QQmlDelegateModel *model, int compositorType, QObject *parent = nullptr); | - |
135 | ~QQmlDelegateModelGroup(); | - |
136 | - | |
137 | QString name() const; | - |
138 | void setName(const QString &name); | - |
139 | - | |
140 | int count() const; | - |
141 | - | |
142 | bool defaultInclude() const; | - |
143 | void setDefaultInclude(bool include); | - |
144 | - | |
145 | QQmlV4Handle get(int index); | - |
146 | - | |
147 | public : | - |
148 | void insert(QQmlV4Function *); | - |
149 | void create(QQmlV4Function *); | - |
150 | void resolve(QQmlV4Function *); | - |
151 | void remove(QQmlV4Function *); | - |
152 | void addGroups(QQmlV4Function *); | - |
153 | void removeGroups(QQmlV4Function *); | - |
154 | void setGroups(QQmlV4Function *); | - |
155 | void move(QQmlV4Function *); | - |
156 | - | |
157 | public : | - |
158 | void countChanged(); | - |
159 | void nameChanged(); | - |
160 | void defaultIncludeChanged(); | - |
161 | void changed(const QQmlV4Handle &removed, const QQmlV4Handle &inserted); | - |
162 | private: | - |
163 | inline QQmlDelegateModelGroupPrivate* d_func() { return executed 46496 times by 27 tests: reinterpret_cast<QQmlDelegateModelGroupPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQmlDelegateModelGroupPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 46496 times by 27 tests: } inline const QQmlDelegateModelGroupPrivate* d_func() const { returnreturn reinterpret_cast<QQmlDelegateModelGroupPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 3194 times by 2 tests: reinterpret_cast<const QQmlDelegateModelGroupPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQmlDelegateModelGroupPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 3194 times by 2 tests: } friend class QQmlDelegateModelGroupPrivate;return reinterpret_cast<const QQmlDelegateModelGroupPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
| 3194-46496 |
164 | }; | - |
165 | - | |
166 | class QQmlDelegateModelItem; | - |
167 | class QQmlDelegateModelAttachedMetaObject; | - |
168 | class QQmlDelegateModelAttached : public QObject | - |
169 | { | - |
170 | public: | - |
171 | #pragma GCC diagnostic push | - |
172 | - | |
173 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
174 | 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: | - |
175 | #pragma GCC diagnostic ignored "-Wattributes" | - |
176 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
177 | #pragma GCC diagnostic pop | - |
178 | struct QPrivateSignal {}; | - |
179 | - | |
180 | - | |
181 | - | |
182 | public: | - |
183 | QQmlDelegateModelAttached(QObject *parent); | - |
184 | QQmlDelegateModelAttached(QQmlDelegateModelItem *cacheItem, QObject *parent); | - |
185 | ~QQmlDelegateModelAttached() {} | - |
186 | - | |
187 | void resetCurrentIndex(); | - |
188 | void setCacheItem(QQmlDelegateModelItem *item); | - |
189 | - | |
190 | QQmlDelegateModel *model() const; | - |
191 | - | |
192 | QStringList groups() const; | - |
193 | void setGroups(const QStringList &groups); | - |
194 | - | |
195 | bool isUnresolved() const; | - |
196 | - | |
197 | void emitChanges(); | - |
198 | - | |
199 | void emitUnresolvedChanged() { unresolvedChanged(); } never executed: end of block | 0 |
200 | - | |
201 | public : | - |
202 | void groupsChanged(); | - |
203 | void unresolvedChanged(); | - |
204 | - | |
205 | public: | - |
206 | QQmlDelegateModelItem *m_cacheItem; | - |
207 | int m_previousGroups; | - |
208 | int m_currentIndex[QQmlListCompositor::MaximumGroupCount]; | - |
209 | int m_previousIndex[QQmlListCompositor::MaximumGroupCount]; | - |
210 | - | |
211 | friend class QQmlDelegateModelAttachedMetaObject; | - |
212 | }; | - |
213 | - | |
214 | - | |
215 | - | |
216 | template <> struct QMetaTypeId< QQmlDelegateModel * > { 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< QQmlDelegateModel * >("QQmlDelegateModel *", reinterpret_cast< QQmlDelegateModel * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQmlDelegateModel> > { 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<QQmlDelegateModel> >("QQmlListProperty<QQmlDelegateModel>", reinterpret_cast< QQmlListProperty<QQmlDelegateModel> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
217 | template <> class QQmlTypeInfo<QQmlDelegateModel > { public: enum { hasAttachedProperties = (((QML_HAS_ATTACHED_PROPERTIES) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) }; }; | - |
218 | template <> struct QMetaTypeId< QQmlDelegateModelGroup * > { 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< QQmlDelegateModelGroup * >("QQmlDelegateModelGroup *", reinterpret_cast< QQmlDelegateModelGroup * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQmlDelegateModelGroup> > { 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<QQmlDelegateModelGroup> >("QQmlListProperty<QQmlDelegateModelGroup>", reinterpret_cast< QQmlListProperty<QQmlDelegateModelGroup> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
Switch to Source code | Preprocessed file |