QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
network
qgsfileuploader.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfileuploader.h
3
--------------------------------------
4
Date : August 2025
5
Copyright : (C) 2025 by Celia Buira
6
Email : celia dot buira at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSFILEUPLOADER_H
17
#define QGSFILEUPLOADER_H
18
19
#include "
qgis.h
"
20
#include "qgis_core.h"
21
22
#include <QFile>
23
#include <QNetworkReply>
24
#include <QObject>
25
#include <QUrl>
26
41
class
CORE_EXPORT
QgsFileUploader
:
public
QObject
42
{
43
Q_OBJECT
44
public
:
54
QgsFileUploader
(
const
QString &uploadFileName,
const
QUrl &url,
const
QString &formName = QString(),
const
QString &authcfg = QString(),
bool
delayStart =
true
);
55
56
signals:
58
void
uploadCompleted
(
const
QUrl &url );
60
void
uploadExited
();
61
66
void
uploadCanceled
();
67
69
void
uploadError
( QStringList errorMessages );
71
void
uploadProgress
( qint64 bytesSent, qint64 bytesTotal );
72
73
public
slots:
74
80
void
cancelUpload
();
81
83
void
startUpload
();
84
85
private
slots:
87
void
onFinished();
89
void
onUploadProgress( qint64 bytesSent, qint64 bytesTotal );
90
91
92
protected
:
93
~QgsFileUploader
()
override
;
94
95
private
:
100
void
error(
const
QStringList &errorMessages );
101
void
error(
const
QString &errorMessage );
102
QUrl mUrl;
103
QString mFormName;
104
QFile mFile;
105
bool
mUploadCanceled;
106
QStringList mErrors;
107
QString mAuthCfg;
108
};
109
110
#endif
// QGSFILEUPLOADER_H
QgsFileUploader::startUpload
void startUpload()
Called to start the upload.
Definition
qgsfileuploader.cpp:52
QgsFileUploader::uploadExited
void uploadExited()
Emitted always when the uploader exits.
QgsFileUploader::cancelUpload
void cancelUpload()
Call to abort the upload and delete this object after the cancellation has been processed.
Definition
qgsfileuploader.cpp:120
QgsFileUploader::uploadError
void uploadError(QStringList errorMessages)
Emitted when an error makes the upload fail.
QgsFileUploader::uploadCompleted
void uploadCompleted(const QUrl &url)
Emitted when the upload has completed successfully.
QgsFileUploader::uploadCanceled
void uploadCanceled()
Emitted when the upload was canceled by the user.
QgsFileUploader::QgsFileUploader
QgsFileUploader(const QString &uploadFileName, const QUrl &url, const QString &formName=QString(), const QString &authcfg=QString(), bool delayStart=true)
QgsFileUploader.
Definition
qgsfileuploader.cpp:36
QgsFileUploader::uploadProgress
void uploadProgress(qint64 bytesSent, qint64 bytesTotal)
Emitted when data are ready to be processed.
qgis.h
Generated on
for QGIS API Documentation by
1.17.0