mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 21:15:19 +00:00
30 lines
682 B
C++
30 lines
682 B
C++
#pragma once
|
|
#include "QObjectPtr.h"
|
|
#include "net/NetAction.h"
|
|
#include "Screenshot.h"
|
|
|
|
class ImgurUpload : public NetAction {
|
|
public:
|
|
using Ptr = shared_qobject_ptr<ImgurUpload>;
|
|
|
|
explicit ImgurUpload(ScreenShot::Ptr shot);
|
|
static Ptr make(ScreenShot::Ptr shot) {
|
|
return Ptr(new ImgurUpload(shot));
|
|
}
|
|
|
|
protected
|
|
slots:
|
|
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) override;
|
|
void downloadError(QNetworkReply::NetworkError error) override;
|
|
void downloadFinished() override;
|
|
void downloadReadyRead() override {}
|
|
|
|
public
|
|
slots:
|
|
void startImpl() override;
|
|
|
|
private:
|
|
ScreenShot::Ptr m_shot;
|
|
bool finished = true;
|
|
};
|