16 #ifndef QGSFILEDOWNLOADER_H
17 #define QGSFILEDOWNLOADER_H
21 #include <QNetworkReply>
24 #include "qgis_core.h"
60 QgsFileDownloader(
const QUrl &url,
const QString &outputFileName,
const QString &authcfg = QString(),
bool delayStart =
false );
86 void cancelDownload();
97 void onDownloadProgress( qint64 bytesReceived, qint64 bytesTotal );
99 void onRequestTimedOut( QNetworkReply *reply );
108 void onSslErrors( QNetworkReply *reply,
const QList<QSslError> &errors );
120 void error(
const QStringList &errorMessages );
121 void error(
const QString &errorMessage );
123 QNetworkReply *mReply =
nullptr;
125 bool mDownloadCanceled;
QgsFileDownloader is a utility class for downloading files.
void downloadExited()
Emitted always when the downloader exits.
void downloadCanceled()
Emitted when the download was canceled by the user.
void downloadError(QStringList errorMessages)
Emitted when an error makes the download fail.
void downloadCompleted(const QUrl &url)
Emitted when the download has completed successfully.
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Emitted when data are ready to be processed.