mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
fa8acc0f40
The difference between slot names and signal names was to insignificant e.g. uploadFinish (signal) uploadFinished (slot). Change slot names to slot_<name> should clear any confusion. Signed-off-by: Jan Iversen <jan@casacondor.com>
38 lines
985 B
C++
38 lines
985 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef UPLOADDIVELOGSDE_H
|
|
#define UPLOADDIVELOGSDE_H
|
|
#include <QNetworkReply>
|
|
#include <QHttpMultiPart>
|
|
#include <QTimer>
|
|
|
|
|
|
class uploadDiveLogsDE : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static uploadDiveLogsDE *instance();
|
|
void doUpload(bool selected, const QString &userid, const QString &password);
|
|
|
|
// only to be used in desktop-widgets::subsurfacewebservices
|
|
bool prepareDives(const QString &tempfile, const bool selected);
|
|
|
|
private slots:
|
|
void updateProgressSlot(qint64 current, qint64 total);
|
|
void uploadFinishedSlot();
|
|
void uploadTimeoutSlot();
|
|
void uploadErrorSlot(QNetworkReply::NetworkError error);
|
|
|
|
signals:
|
|
void uploadFinish(bool success, const QString &text);
|
|
void uploadProgress(qreal percentage);
|
|
|
|
private:
|
|
uploadDiveLogsDE();
|
|
|
|
void uploadDives(const QString &filename, const QString &userid, const QString &password);
|
|
|
|
QNetworkReply *reply;
|
|
QHttpMultiPart *multipart;
|
|
QTimer timeout;
|
|
};
|
|
#endif // UPLOADDIVELOGSDE_H
|