1 | // Copyright (C) 2016 Research In Motion. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QQMLINSTANTIATOR_P_P_H |
5 | #define QQMLINSTANTIATOR_P_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include "qqmlinstantiator_p.h" |
19 | #include <QObject> |
20 | #include <private/qobject_p.h> |
21 | #include <private/qqmlchangeset_p.h> |
22 | #include <private/qqmlobjectmodel_p.h> |
23 | |
24 | QT_REQUIRE_CONFIG(qml_object_model); |
25 | |
26 | QT_BEGIN_NAMESPACE |
27 | |
28 | class Q_QMLMODELS_PRIVATE_EXPORT QQmlInstantiatorPrivate : public QObjectPrivate |
29 | { |
30 | Q_DECLARE_PUBLIC(QQmlInstantiator) |
31 | |
32 | public: |
33 | QQmlInstantiatorPrivate(); |
34 | |
35 | void clear(); |
36 | void regenerate(); |
37 | #if QT_CONFIG(qml_delegate_model) |
38 | void makeModel(); |
39 | #endif |
40 | void _q_createdItem(int, QObject *); |
41 | void _q_modelUpdated(const QQmlChangeSet &, bool); |
42 | QObject *modelObject(int index, bool async); |
43 | |
44 | static QQmlInstantiatorPrivate *get(QQmlInstantiator *instantiator) { return instantiator->d_func(); } |
45 | static const QQmlInstantiatorPrivate *get(const QQmlInstantiator *instantiator) { return instantiator->d_func(); } |
46 | |
47 | bool componentComplete:1; |
48 | bool effectiveReset:1; |
49 | bool active:1; |
50 | bool async:1; |
51 | #if QT_CONFIG(qml_delegate_model) |
52 | bool ownModel:1; |
53 | #endif |
54 | int requestedIndex; |
55 | QVariant model; |
56 | QQmlInstanceModel *instanceModel; |
57 | QQmlComponent *delegate; |
58 | QVector<QPointer<QObject> > objects; |
59 | }; |
60 | |
61 | QT_END_NAMESPACE |
62 | |
63 | #endif // QQMLCREATOR_P_P_H |
64 |