ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Downloader Class Reference

Implements an integrated file downloader with a nice UI. More...

#include <Downloader.h>

Inheritance diagram for Downloader:
Collaboration diagram for Downloader:

Public Slots

void setUrlId (const QString &url)
 
void startDownload (const QUrl &url)
 
void setFileName (const QString &file)
 
void setUserAgentString (const QString &agent)
 
void setUseCustomInstallProcedures (const bool custom)
 
void setMandatoryUpdate (const bool mandatory_update)
 

Signals

void downloadFinished (const QString &url, const QString &filepath)
 

Public Member Functions

 Downloader (QWidget *parent=nullptr)
 
 ~Downloader ()
 
bool useCustomInstallProcedures () const
 
QString downloadDir () const
 
void setDownloadDir (const QString &downloadDir)
 

Detailed Description

Implements an integrated file downloader with a nice UI.

Definition at line 25 of file Downloader.h.

Constructor & Destructor Documentation

◆ Downloader()

Downloader::Downloader ( QWidget *  parent = nullptr)
explicit

Definition at line 23 of file Downloader.cpp.

◆ ~Downloader()

Downloader::~Downloader ( )

Definition at line 56 of file Downloader.cpp.

Member Function Documentation

◆ downloadDir()

QString Downloader::downloadDir ( ) const

Definition at line 411 of file Downloader.cpp.

Referenced by setDownloadDir().

◆ downloadFinished

void Downloader::downloadFinished ( const QString &  url,
const QString &  filepath 
)
signal

◆ setDownloadDir()

void Downloader::setDownloadDir ( const QString &  downloadDir)

Definition at line 416 of file Downloader.cpp.

References downloadDir().

◆ setFileName

void Downloader::setFileName ( const QString &  file)
slot

Changes the name of the downloaded file

Definition at line 124 of file Downloader.cpp.

◆ setMandatoryUpdate

void Downloader::setMandatoryUpdate ( const bool  mandatory_update)
slot

If the mandatory_update is set to true, the Downloader has to download and install the update. If the user cancels or exits, the application will close

Definition at line 426 of file Downloader.cpp.

◆ setUrlId

void Downloader::setUrlId ( const QString &  url)
slot

Changes the URL, which is used to indentify the downloader dialog with an Updater instance

Note
the url parameter is not the download URL, it is the URL of the AppCast file

Definition at line 80 of file Downloader.cpp.

◆ setUseCustomInstallProcedures

void Downloader::setUseCustomInstallProcedures ( const bool  custom)
slot

If the custom parameter is set to true, then the Downloader will not attempt to open the downloaded file.

Use the signals fired by the QSimpleUpdater to implement your own install procedures.

Definition at line 438 of file Downloader.cpp.

Referenced by Updater::setUseCustomInstallProcedures().

◆ setUserAgentString

void Downloader::setUserAgentString ( const QString &  agent)
slot

Changes the user-agent string used to communicate with the remote HTTP server

Definition at line 135 of file Downloader.cpp.

Referenced by Updater::setUserAgentString().

◆ startDownload

void Downloader::startDownload ( const QUrl &  url)
slot

Begins downloading the file at the given url

Definition at line 88 of file Downloader.cpp.

References PARTIAL_DOWN().

◆ useCustomInstallProcedures()

bool Downloader::useCustomInstallProcedures ( ) const

Returns true if the updater shall not intervene when the download has finished (you can use the QSimpleUpdater signals to know when the download is completed).

Definition at line 68 of file Downloader.cpp.

Referenced by Updater::useCustomInstallProcedures().


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