NDEVR
API Documentation
DownloadDatasetWidget

A popup that is shown when a remote project is being downloaded. More...

Collaboration diagram for DownloadDatasetWidget:
[legend]

Public Member Functions

 DownloadDatasetWidget (QWidget *parent=nullptr)
 Constructs a DownloadDatasetWidget.
void downloadActiveSignal (bool is_downloading)
 Emitted when the download active state changes.
void loadFile (const File &f)
 Loads a previously downloaded file into the design object lookup.
void onFailureSignal ()
 Emitted when a download fails.
void onFinishedSignal (File file)
 Emitted when a download finishes successfully.
void setUpdateTarget (DesignObjectLookup *lookup)
 Sets the design object lookup to update once the download completes.
void startDownload (const StringView &url, const File &file)
 Starts downloading a remote dataset from the given URL to the specified file.

Protected Member Functions

void downloadFailedSlot (StringView error)
 Slot called when the download fails.
void downloadFinishedSlot ()
 Slot called when the download completes successfully.
void updatePercentSlot ()
 Slot called periodically to update the progress display.

Protected Attributes

ItemDownloaderm_downloader = nullptr
 The downloader handling the network transfer.
File m_file
 The target file for the current download.
DesignObjectLookupm_lookup = nullptr
 The design object lookup to update after download.
ProgressWidgetm_progress = nullptr
 The progress bar widget.

Detailed Description

A popup that is shown when a remote project is being downloaded.


Definition at line 14 of file DownloadDatasetWidget.h.

Constructor & Destructor Documentation

◆ DownloadDatasetWidget()

DownloadDatasetWidget::DownloadDatasetWidget ( QWidget * parent = nullptr)

Constructs a DownloadDatasetWidget.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ downloadActiveSignal()

void DownloadDatasetWidget::downloadActiveSignal ( bool is_downloading)

Emitted when the download active state changes.

Parameters
[in]is_downloadingTrue if a download is in progress.

◆ downloadFailedSlot()

void DownloadDatasetWidget::downloadFailedSlot ( StringView error)
protected

Slot called when the download fails.

Parameters
[in]errorA description of the failure.

◆ loadFile()

void DownloadDatasetWidget::loadFile ( const File & f)

Loads a previously downloaded file into the design object lookup.

Parameters
[in]fThe file to load.

◆ onFinishedSignal()

void DownloadDatasetWidget::onFinishedSignal ( File file)

Emitted when a download finishes successfully.

Parameters
[in]fileThe downloaded file.

◆ setUpdateTarget()

void DownloadDatasetWidget::setUpdateTarget ( DesignObjectLookup * lookup)

Sets the design object lookup to update once the download completes.

Parameters
[in]lookupThe DesignObjectLookup to notify.

◆ startDownload()

void DownloadDatasetWidget::startDownload ( const StringView & url,
const File & file )

Starts downloading a remote dataset from the given URL to the specified file.

Parameters
[in]urlThe URL to download from.
[in]fileThe local file to save the downloaded data to.

The documentation for this class was generated from the following file: