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#include <QtCore/qpointer.h>
25
26QT_REQUIRE_CONFIG(qml_object_model);
27
28QT_BEGIN_NAMESPACE
29
30class Q_QMLMODELS_EXPORT QQmlInstantiatorPrivate : public QObjectPrivate
31{
32 Q_DECLARE_PUBLIC(QQmlInstantiator)
33
34public:
35 QQmlInstantiatorPrivate();
36
37 void clear();
38 void regenerate();
39#if QT_CONFIG(qml_delegate_model)
40 void makeModel();
41#endif
42 void _q_createdItem(int, QObject *);
43 void _q_modelUpdated(const QQmlChangeSet &, bool);
44 QObject *modelObject(int index, bool async);
45
46 static QQmlInstantiatorPrivate *get(QQmlInstantiator *instantiator) { return instantiator->d_func(); }
47 static const QQmlInstantiatorPrivate *get(const QQmlInstantiator *instantiator) { return instantiator->d_func(); }
48
49 bool componentComplete:1;
50 bool effectiveReset:1;
51 bool active:1;
52 bool async:1;
53#if QT_CONFIG(qml_delegate_model)
54 bool ownModel:1;
55#endif
56 int requestedIndex;
57 QVariant model;
58 QQmlInstanceModel *instanceModel;
59 QQmlComponent *delegate;
60 QVector<QPointer<QObject> > objects;
61};
62
63QT_END_NAMESPACE
64
65#endif // QQMLCREATOR_P_P_H
66

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtdeclarative/src/qmlmodels/qqmlinstantiator_p_p.h