QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
19 #include <QMessageBox>
22 : mOutputFileName( outputFileName ),
25 setWindowTitle( tr(
"Download" ) );
26 setLabelText( tr(
"Downloading %1." ).arg( outputFileName ) );
42 void QgsFileDownloaderDialog::onError(
const QStringList &errors )
44 QMessageBox::warning(
nullptr, tr(
"Download File" ), errors.join( QLatin1String(
"<br>" ) ) );
47 void QgsFileDownloaderDialog::onDownloadProgress( qint64 bytesReceived, qint64 bytesTotal )
49 setMaximum( bytesTotal );
50 setValue( bytesReceived );
void downloadError(QStringList errorMessages)
Emitted when an error makes the download fail.
QgsFileDownloader is a utility class for downloading files.
void startDownload()
Called to start the download.
void downloadExited()
Emitted always when the downloader exits.
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Emitted when data are ready to be processed.
QgsFileDownloaderDialog(const QUrl &url, const QString &outputFileName, const QString &authcfg=QString())
QgsFileDownloader.
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Emitted when data are ready to be processed.
void downloadExited()
Emitted always when the downloader exits.
void downloadCompleted(const QUrl &url)
Emitted when the download has completed successfully.
void downloadCanceled()
Emitted when the download was canceled by the user.
void downloadCanceled()
Emitted when the download was canceled by the user.
void downloadError(QStringList errorMessages)
Emitted when an error makes the download fail.
static QString representFileSize(qint64 bytes)
Returns the human size from bytes.
void cancelDownload()
Call to abort the download and delete this object after the cancellation has been processed.
void downloadCompleted()
Emitted when the download has completed successfully.