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
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
4#ifndef QQMLCOMPONENTATTACHED_P_H
5#define QQMLCOMPONENTATTACHED_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 <QtQml/qqml.h>
19#include <QtQml/qqmlcomponent.h>
20#include <private/qtqmlglobal_p.h>
21#include <QtCore/QObject>
22
24
25
26// implemented in qqmlcomponent.cpp
27class Q_QML_EXPORT QQmlComponentAttached : public QObject
28{
30public:
31 QQmlComponentAttached(QObject *parent = nullptr);
33
35 {
36 m_prev = listHead;
37 m_next = *listHead;
38 *listHead = this;
39 if (m_next)
40 m_next->m_prev = &m_next;
41 }
42
44 {
45 *m_prev = m_next;
46 if (m_next)
47 m_next->m_prev = m_prev;
48 m_next = nullptr;
49 m_prev = nullptr;
50 }
51
52 QQmlComponentAttached *next() const { return m_next; }
53
55 void completed();
57
58private:
59 QQmlComponentAttached **m_prev;
61};
62
64
65// TODO: We still need this because we cannot properly use QML_ATTACHED with QML_FOREIGN.
67
68#endif // QQMLCOMPONENTATTACHED_P_H
\inmodule QtCore
Definition qobject.h:103
void insertIntoList(QQmlComponentAttached **listHead)
QQmlComponentAttached * next() const
The QQmlComponent class encapsulates a QML component definition.
Combined button and popup list for selecting options.
@ QML_HAS_ATTACHED_PROPERTIES
Definition qqml.h:33
#define QML_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qqml.h:36
#define Q_OBJECT
#define Q_SIGNALS