6#include <albert/export.h>
30 Download(
const QUrl &url,
const QString &path, QObject *parent =
nullptr);
46 static std::shared_ptr<Download>
unique(
const QUrl &url,
const QString &path);
93 std::unique_ptr<Private> d;
Downloads a file from the given URL to the given path.
Definition download.h:23
Download(const QUrl &url, const QString &path, QObject *parent=nullptr)
Constructs a download with the given url, path and parent.
bool isActive()
Returns true if the download is active.
~Download()
Destructs this download.
void start()
Starts the download.
const QString & path()
Returns the destination path of the download.
static std::shared_ptr< Download > unique(const QUrl &url, const QString &path)
Returns a unique download for url and path.
void finished()
Emitted when the download has finished.
const QString & error()
Returns the error of the download, if any.
const QUrl & url()
Returns the url of the download.