Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlcomponentattached_p.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// Qt-Security score:significant
4
5#ifndef QQMLCOMPONENTATTACHED_P_H
6#define QQMLCOMPONENTATTACHED_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQml/qqml.h>
20#include <QtQml/qqmlcomponent.h>
21#include <private/qtqmlglobal_p.h>
22#include <QtCore/QObject>
23
25
26
27// implemented in qqmlcomponent.cpp
28class Q_QML_EXPORT QQmlComponentAttached : public QObject
29{
30 Q_OBJECT
31public:
32 QQmlComponentAttached(QObject *parent = nullptr);
33 ~QQmlComponentAttached();
34
35 void insertIntoList(QQmlComponentAttached **listHead)
36 {
37 m_prev = listHead;
38 m_next = *listHead;
39 *listHead = this;
40 if (m_next)
41 m_next->m_prev = &m_next;
42 }
43
44 void removeFromList()
45 {
46 *m_prev = m_next;
47 if (m_next)
48 m_next->m_prev = m_prev;
49 m_next = nullptr;
50 m_prev = nullptr;
51 }
52
53 QQmlComponentAttached *next() const { return m_next; }
54
55Q_SIGNALS:
56 void completed();
57 void destruction();
58
59private:
60 QQmlComponentAttached **m_prev;
61 QQmlComponentAttached *m_next;
62};
63
64QT_END_NAMESPACE
65
66// TODO: We still need this because we cannot properly use QML_ATTACHED with QML_FOREIGN.
67QML_DECLARE_TYPEINFO(QQmlComponent, QML_HAS_ATTACHED_PROPERTIES)
68
69#endif // QQMLCOMPONENTATTACHED_P_H
\inmodule QtCore
Definition qobject.h:106
void setInitialState(QObject *o) override
Called after the object is first created, but before complex property bindings are evaluated and,...
void statusChanged(Status s) override
Called when the status of the incubator changes.
QQmlComponentIncubator(QV4::Heap::QmlIncubatorObject *inc, IncubationMode mode)
QV4::PersistentValue incubatorObject
The QQmlComponent class encapsulates a QML component definition.
The QQmlError class encapsulates a QML error.
Definition qqmlerror.h:19
Status
Specifies the status of the QQmlIncubator.
Combined button and popup list for selecting options.
DECLARE_HEAP_OBJECT(QmlContext, ExecutionContext)
Definition qjsvalue.h:24
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
static void removePendingQPropertyBinding(QV4::Value *object, const QString &propertyName, const QQmlObjectCreator *creator)
static void QQmlComponent_setQmlParent(QObject *me, QObject *parent)
DEFINE_OBJECT_VTABLE(QV4::QmlIncubatorObject)
V4_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension)
static QQmlParserStatus * parserStatusCast(const QQmlType &type, QObject *rv)
QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error)
static ReturnedValue method_set_statusChanged(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_status(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_object(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void statusChanged(QQmlIncubator::Status)
void setInitialState(QObject *, RequiredProperties *requiredProperties)
static ReturnedValue method_forceCompletion(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)