LocalFileDownloader Class | Qt Installer Framework Manual

- Qt Installer Framework Manual
- LocalFileDownloader

# LocalFileDownloader Class

(KDUpdater::LocalFileDownloader)

The LocalFileDownloader class is used to copy files from the local file system. More...

Header: | #include <LocalFileDownloader>
Inherits: | KDUpdater::FileDownloader

- List of all members, including inherited members

## Public Functions

| LocalFileDownloader(QObject *parent = 0)
virtual | ~LocalFileDownloader()

## Reimplemented Public Functions

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

- 27 public functions inherited from KDUpdater::FileDownloader

## Public Slots

virtual void | cancelDownload() override

- 1 public slot inherited from KDUpdater::FileDownloader

## Static Public Members

const QMetaObject | staticMetaObject

## Reimplemented Protected Functions

virtual void | onError() override
virtual void | onSuccess() override
virtual void | timerEvent(QTimerEvent *te) override

- 28 protected functions inherited from KDUpdater::FileDownloader

### Additional Inherited Members

- 3 properties inherited from KDUpdater::FileDownloader
- 10 signals inherited from KDUpdater::FileDownloader
- 28 protected functions inherited from KDUpdater::FileDownloader

## Detailed Description

The LocalFileDownloader class is used to copy files from the local file system.

The user of KDUpdater might be simultaneously downloading several files; sometimes in parallel to other file downloaders. If copying a local file takes a long time, it will make the other downloads hang. Therefore, a timer is used and one block of data is copied per unit time, even though QFile::copy() does the task of copying local files from one place to another.

## Member Function Documentation

### LocalFileDownloader::LocalFileDownloader(QObject *parent = 0)

Default constructs an instance of LocalFileDownloader.

### `[virtual]` LocalFileDownloader::~LocalFileDownloader()

Destroys the instance of LocalFileDownloader. The destructor is virtual.

### `[override virtual]` bool LocalFileDownloader::canDownload() const

### `[override virtual slot]` void LocalFileDownloader::cancelDownload()

### `[override virtual]` KDUpdater::LocalFileDownloader *LocalFileDownloader::clone(QObject *parent = 0) const

### `[override virtual]` QString LocalFileDownloader::downloadedFileName() const

See also setDownloadedFileName().

### `[override virtual]` bool LocalFileDownloader::isDownloaded() const

### `[override virtual protected]` void LocalFileDownloader::onError()

### `[override virtual protected]` void LocalFileDownloader::onSuccess()

### `[override virtual]` void LocalFileDownloader::setDownloadedFileName(const QString &name)

See also downloadedFileName().

### `[override virtual protected]` void LocalFileDownloader::timerEvent(QTimerEvent *te)