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
qqmlnotifyingblob_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QQMLNOTIFYINGBLOB_P_H
5#define QQMLNOTIFYINGBLOB_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 <private/qqmltypeloader_p.h>
19
21
22class Q_QML_EXPORT QQmlNotifyingBlob : public QQmlTypeLoader::Blob
23{
24public:
25 QQmlNotifyingBlob(const QUrl &url, QQmlDataBlob::Type type, QQmlTypeLoader *loader)
26 : Blob(url, type, loader)
27 {}
28
29 struct Q_QML_EXPORT Callback
30 {
31 virtual ~Callback();
32 virtual void ready(QQmlNotifyingBlob *);
33 virtual void progress(QQmlNotifyingBlob *, qreal);
34 };
35
36 void registerCallback(Callback *callback);
37 void unregisterCallback(Callback *callback);
38
39protected:
40 void completed() override;
41 void downloadProgressChanged(qreal) override;
42
43private:
44 QList<Callback *> m_callbacks;
45};
46
47QT_END_NAMESPACE
48
49#endif // QQMLNOTIFYINGBLOB_P_H