ResourceFileDownloader Class


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

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

Public Functions

Reimplemented Public Functions

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

Public Slots

virtual void cancelDownload()

Reimplemented Protected Functions

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

Additional Inherited Members

Detailed Description

The ResourceFileDownloader class can be used to download resource files.

Member Function Documentation

ResourceFileDownloader::ResourceFileDownloader(QObject *parent = 0)

Creates a resource file downloader with the parent parent.


Destroys the resource file downloader.

[virtual] bool ResourceFileDownloader::canDownload() const

Reimplemented from FileDownloader::canDownload().

Returns true if the file exists and is readable.

[virtual slot] void ResourceFileDownloader::cancelDownload()

Reimplemented from FileDownloader::cancelDownload().

Cancels downloading the file.

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

Reimplemented from FileDownloader::clone().

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

[virtual] QString ResourceFileDownloader::downloadedFileName() const

Reimplemented from FileDownloader::downloadedFileName().

Returns the file name of the downloaded file.

See also setDownloadedFileName().

[virtual] bool ResourceFileDownloader::isDownloaded() const

Reimplemented from FileDownloader::isDownloaded().

Returns true if the file is downloaded.

[virtual protected] void ResourceFileDownloader::onError()

Reimplemented from FileDownloader::onError().

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

[virtual protected] void ResourceFileDownloader::onSuccess()

Reimplemented from FileDownloader::onSuccess().

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

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

Reimplemented from FileDownloader::setDownloadedFileName().

Sets the file name of the downloaded file to name.

See also downloadedFileName().

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

Reimplemented from QObject::timerEvent().

Called when the download timer event event occurs.

© 2020 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.