Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlincubator.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
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 QQMLINCUBATOR_H
5#define QQMLINCUBATOR_H
6
7#include <QtQml/qtqmlglobal.h>
8#include <QtQml/qqmlerror.h>
9#include <atomic>
10
12
13
14class QQmlEngine;
16class QVariant;
17
19class Q_QML_EXPORT QQmlIncubator
20{
21 Q_DISABLE_COPY(QQmlIncubator)
22public:
34
35 QQmlIncubator(IncubationMode = Asynchronous);
36 virtual ~QQmlIncubator();
37
38 void clear();
39 void forceCompletion();
40
41 bool isNull() const;
42 bool isReady() const;
43 bool isError() const;
44 bool isLoading() const;
45
46 QList<QQmlError> errors() const;
47
48 IncubationMode incubationMode() const;
49
50 Status status() const;
51
52 QObject *object() const;
53
54 void setInitialProperties(const QVariantMap &initialProperties);
55
56protected:
57 virtual void statusChanged(Status);
58 virtual void setInitialState(QObject *);
59
60private:
61 friend class QQmlComponent;
62 friend class QQmlEnginePrivate;
65};
66
68class Q_QML_EXPORT QQmlIncubationController
69{
70 Q_DISABLE_COPY(QQmlIncubationController)
71public:
74
75 QQmlEngine *engine() const;
76 int incubatingObjectCount() const;
77
78 void incubateFor(int msecs);
79 void incubateWhile(std::atomic<bool> *flag, int msecs = 0);
80
81protected:
82 virtual void incubatingObjectCountChanged(int);
83
84private:
85 friend class QQmlEngine;
86 friend class QQmlEnginePrivate;
89};
90
92
93#endif // QQMLINCUBATOR_H
\inmodule QtCore
Definition qobject.h:103
The QQmlComponent class encapsulates a QML component definition.
The QQmlEngine class provides an environment for instantiating QML components.
Definition qqmlengine.h:57
QQmlIncubationController instances drive the progress of QQmlIncubators.
The QQmlIncubator class allows QML objects to be created asynchronously.
IncubationMode
Specifies the mode the incubator operates in.
Status
Specifies the status of the QQmlIncubator.
\inmodule QtCore
Definition qvariant.h:65
void statusChanged(QQmlComponent::Status status)
[1]
Definition qlogging.cpp:11
b clear()
Combined button and popup list for selecting options.
GLuint object
[3]
QJSEngine engine
[0]