|
QGIS API Documentation 4.1.0-Master (3b8ef1f72a3)
|
A utility class for uploading files. More...
#include <qgsfileuploader.h>

Public Slots | |
| void | cancelUpload () |
| Call to abort the upload and delete this object after the cancellation has been processed. | |
| void | startUpload () |
| Called to start the upload. | |
Signals | |
| void | uploadCanceled () |
| Emitted when the upload was canceled by the user. | |
| void | uploadCompleted (const QUrl &url) |
| Emitted when the upload has completed successfully. | |
| void | uploadError (QStringList errorMessages) |
| Emitted when an error makes the upload fail. | |
| void | uploadExited () |
| Emitted always when the uploader exits. | |
| void | uploadProgress (qint64 bytesSent, qint64 bytesTotal) |
| Emitted when data are ready to be processed. | |
Public Member Functions | |
| QgsFileUploader (const QString &uploadFileName, const QUrl &url, const QString &formName=QString(), const QString &authcfg=QString(), bool delayStart=true) | |
| QgsFileUploader. | |
Protected Member Functions | |
| ~QgsFileUploader () override | |
A utility class for uploading files.
To use this class, it is necessary to pass the URL and a the file name of the file to upload as arguments to the constructor, the upload will start immediately.
The upload is asynchronous.
The object will destroy itself when the request completes, errors or is canceled. An optional authentication configuration can be specified.
Definition at line 41 of file qgsfileuploader.h.
| QgsFileUploader::QgsFileUploader | ( | const QString & | uploadFileName, |
| const QUrl & | url, | ||
| const QString & | formName = QString(), | ||
| const QString & | authcfg = QString(), | ||
| bool | delayStart = true ) |
| uploadFileName | file name of the file to upload to the server |
| url | the upload URL |
| formName | the upload URL |
| authcfg | optionally apply this authentication configuration |
| delayStart | if true, the download will not be commenced immediately and must be triggered by a later call to startUpload(). This can be useful to setup connections |
Definition at line 36 of file qgsfileuploader.cpp.
|
overrideprotected |
Definition at line 49 of file qgsfileuploader.cpp.
|
slot |
Call to abort the upload and delete this object after the cancellation has been processed.
Definition at line 120 of file qgsfileuploader.cpp.
|
slot |
Called to start the upload.
Definition at line 52 of file qgsfileuploader.cpp.
|
signal |
Emitted when the upload was canceled by the user.
|
signal |
Emitted when the upload has completed successfully.
|
signal |
Emitted when an error makes the upload fail.
|
signal |
Emitted always when the uploader exits.
|
signal |
Emitted when data are ready to be processed.