KDUpdater::ResourceFileDownloader Class

class KDUpdater::ResourceFileDownloader

The ResourceFileDownloader class can be used to download resource files. More...

Header: #include <ResourceFileDownloader>
Inherits: KDUpdater::FileDownloader

Public Functions

ResourceFileDownloader(QObject *parent = 0)
virtual ~ResourceFileDownloader()

Reimplemented Public Functions

virtual bool canDownload() const override
virtual KDUpdater::ResourceFileDownloader *clone(QObject *parent = 0) const override
virtual QString downloadedFileName() const override
virtual bool isDownloaded() const override
virtual void setDownloadedFileName(const QString &name) override

Public Slots

virtual void cancelDownload() override

Reimplemented Protected Functions

virtual void onError() override
virtual void onSuccess() override
virtual void timerEvent(QTimerEvent *event) override

Detailed Description

Member Function Documentation

[explicit] ResourceFileDownloader::ResourceFileDownloader(QObject *parent = 0)

Creates a resource file downloader with the parent parent.

[virtual noexcept] ResourceFileDownloader::~ResourceFileDownloader()

Destroys the resource file downloader.

[override virtual] bool ResourceFileDownloader::canDownload() const

Reimplements: FileDownloader::canDownload() const.

Returns true if the file exists and is readable.

[override virtual slot] void ResourceFileDownloader::cancelDownload()

Reimplements: FileDownloader::cancelDownload().

Cancels downloading the file.

[override virtual] KDUpdater::ResourceFileDownloader *ResourceFileDownloader::clone(QObject *parent = 0) const

Reimplements: FileDownloader::clone(QObject *parent) const.

Clones the resource file downloader and assigns it the parent parent. Returns the new resource file downloader.

[override virtual] QString ResourceFileDownloader::downloadedFileName() const

Reimplements: FileDownloader::downloadedFileName() const.

Returns the file name of the downloaded file.

See also setDownloadedFileName().

[override virtual] bool ResourceFileDownloader::isDownloaded() const

Reimplements: FileDownloader::isDownloaded() const.

Returns true if the file is downloaded.

[override virtual protected] void ResourceFileDownloader::onError()

Reimplements: FileDownloader::onError().

Closes the destination file if an error occurs during copying and stops the download speed timer.

[override virtual protected] void ResourceFileDownloader::onSuccess()

Reimplements: FileDownloader::onSuccess().

Closes the destination file after it has been successfully copied and stops the download speed timer.

[override virtual] void ResourceFileDownloader::setDownloadedFileName(const QString &name)

Reimplements: FileDownloader::setDownloadedFileName(const QString &name).

Sets the file name of the downloaded file to name.

See also downloadedFileName().

[override virtual protected] void ResourceFileDownloader::timerEvent(QTimerEvent *event)

Reimplements: QObject::timerEvent(QTimerEvent *event).

Called when the download timer event event occurs.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.