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
qquickloader_p_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 reason:default
4
5#ifndef QQUICKLOADER_P_P_H
6#define QQUICKLOADER_P_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 "qquickloader_p.h"
22#include <qqmlincubator.h>
23
24#include <private/qv4staticvalue_p.h>
25#include <private/qv4persistent_p.h>
26
28
29
32{
33public:
34 QQuickLoaderIncubator(QQuickLoaderPrivate *l, IncubationMode mode) : QQmlIncubator(mode), loader(l) {}
35
36protected:
38 void setInitialState(QObject *) override;
39
40private:
41 QQuickLoaderPrivate *loader;
42};
43
44class QQmlContext;
47{
48 Q_DECLARE_PUBLIC(QQuickLoader)
49
50public:
53
54 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override;
55 void itemImplicitWidthChanged(QQuickItem *) override;
56 void itemImplicitHeightChanged(QQuickItem *) override;
57 void clear();
58 void initResize();
59 void load();
60
61 void incubatorStateChanged(QQmlIncubator::Status status);
62 void setInitialState(QObject *o);
65 void updateStatus();
66 void createComponent();
67
68 qreal getImplicitWidth() const override;
69 qreal getImplicitHeight() const override;
70
72 QQuickItem *item;
75 QQmlContext *itemContext;
79 bool updatingSize: 1;
80 bool active : 1;
82 bool asynchronous : 1;
83 // We need to use char instead of QQuickLoader::Status
84 // as otherwise the size of the class would increase
85 // on 32-bit systems, as sizeof(Status) == sizeof(int)
86 // and sizeof(int) > remaining padding on 32 bit
87 char status;
88
89 void _q_sourceLoaded();
90 void _q_updateSize(bool loaderGeometryChanged = true);
91};
92
93QT_END_NAMESPACE
94
95#endif // QQUICKLOADER_P_P_H
Status
Specifies the status of the QQmlIncubator.
QQuickLoaderIncubator(QQuickLoaderPrivate *l, IncubationMode mode)
void setInitialState(QObject *) override
Called after the object is first created, but before complex property bindings are evaluated and,...
void statusChanged(Status) override
Called when the status of the incubator changes.
QQmlStrongJSQObjectReference< QQmlComponent > component
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override
void disposeInitialPropertyValues()
void itemImplicitWidthChanged(QQuickItem *) override
QV4::PersistentValue qmlCallingContext
qreal getImplicitWidth() const override
QV4::PersistentValue initialPropertyValues
QQmlContext * itemContext
void setInitialState(QObject *o)
QQuickLoaderIncubator * incubator
void _q_updateSize(bool loaderGeometryChanged=true)
void itemImplicitHeightChanged(QQuickItem *) override
void incubatorStateChanged(QQmlIncubator::Status status)
qreal getImplicitHeight() const override
static QT_BEGIN_NAMESPACE const QQuickItemPrivate::ChangeTypes watchedChanges