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
assetdownloader.h
Go to the documentation of this file.
1// Copyright (C) 2024 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 ASSETDOWNLOADER_H
5#define ASSETDOWNLOADER_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 <QtCore/QObject>
19#include <QtCore/QUrl>
20
21#include <memory>
22
24
25namespace Assets::Downloader {
26
27class AssetDownloaderPrivate;
28
30{
32
35 READ downloadBase
36 WRITE setDownloadBase
38
44
50
53 READ jsonFileName
54 WRITE setJsonFileName
56
59 READ zipFileName
60 WRITE setZipFileName
61 NOTIFY zipFileNameChanged)
62
67
68public:
69 AssetDownloader(QObject *parent = nullptr);
71
72 QUrl downloadBase() const;
74
76 void setPreferredLocalDownloadDir(const QUrl &localDir);
77
80
81 QString jsonFileName() const;
83
84 QString zipFileName() const;
86
87 QUrl localDownloadDir() const;
88
89public Q_SLOTS:
90 void start();
91
93 void started();
94 void finished(bool success);
95 void progressChanged(int progressValue, int progressMaximum, const QString &progressText);
97
103
104private:
105 std::unique_ptr<AssetDownloaderPrivate> d;
106};
107
108} // namespace Assets::Downloader
109
111
112#endif // ASSETDOWNLOADER_H
void progressChanged(int progressValue, int progressMaximum, const QString &progressText)
void localDownloadDirChanged(const QUrl &url)
void setOfflineAssetsFilePath(const QUrl &offlineAssetsFilePath)
void setJsonFileName(const QString &jsonFileName)
void jsonFileNameChanged(const QString &)
void downloadBaseChanged(const QUrl &)
void setPreferredLocalDownloadDir(const QUrl &localDir)
void offlineAssetsFilePathChanged(const QUrl &)
void setDownloadBase(const QUrl &downloadBase)
void setZipFileName(const QString &zipFileName)
void zipFileNameChanged(const QString &)
void preferredLocalDownloadDirChanged(const QUrl &url)
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
GLuint start
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
QUrl url("example.com")
[constructor-url-reference]