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:
[legend]
Collaboration diagram for Downloader:
[legend]

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.

Constructor & Destructor Documentation

◆ Downloader()

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

◆ ~Downloader()

Downloader::~Downloader ( )

Member Function Documentation

◆ downloadDir()

QString Downloader::downloadDir ( ) const

Referenced by setDownloadDir().

◆ downloadFinished

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

◆ setDownloadDir()

void Downloader::setDownloadDir ( const QString &  downloadDir)

References downloadDir().

◆ setFileName

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

Changes the name of the downloaded file

◆ 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

◆ 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

◆ 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.

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

Referenced by Updater::setUserAgentString().

◆ startDownload

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

Begins downloading the file at the given url

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).

Referenced by Updater::useCustomInstallProcedures().


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