mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
fc740f6369
diveshareexport wants to show the HTML received in a positive response, so signal cannot be compatible with diveLogsDE Signed-off-by: Jan Iversen <jan@casacondor.com>
32 lines
772 B
C++
32 lines
772 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef UPLOADDIVESHARE_H
|
|
#define UPLOADDIVESHARE_H
|
|
#include <QNetworkReply>
|
|
#include <QTimer>
|
|
|
|
|
|
class uploadDiveShare : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static uploadDiveShare *instance();
|
|
void doUpload(bool selected, const QString &uid, bool noPublic);
|
|
|
|
private slots:
|
|
void slot_updateProgress(qint64 current, qint64 total);
|
|
void slot_uploadFinished();
|
|
void slot_uploadTimeout();
|
|
void slot_uploadError(QNetworkReply::NetworkError error);
|
|
|
|
signals:
|
|
void uploadFinish(bool success, const QString &text, const QByteArray &html);
|
|
void uploadProgress(qreal percentage, qreal total);
|
|
void uploadStatus(const QString &text);
|
|
|
|
private:
|
|
uploadDiveShare();
|
|
|
|
QNetworkReply *reply;
|
|
QTimer timeout;
|
|
};
|
|
#endif // UPLOADDIVESHARE_H
|