2021-08-20 00:34:32 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QFile>
|
|
|
|
#include <QtNetwork/QtNetwork>
|
|
|
|
#include <memory>
|
|
|
|
#include "tasks/Task.h"
|
2021-11-23 00:25:24 +00:00
|
|
|
#include "QObjectPtr.h"
|
2021-08-20 00:34:32 +01:00
|
|
|
|
|
|
|
class CapeChange : public Task
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2021-12-04 00:18:05 +00:00
|
|
|
CapeChange(QObject *parent, QString token, QString capeId);
|
2021-08-20 00:34:32 +01:00
|
|
|
virtual ~CapeChange() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setCape(QString & cape);
|
|
|
|
void clearCape();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_capeId;
|
2021-12-04 00:18:05 +00:00
|
|
|
QString m_token;
|
2021-11-23 00:25:24 +00:00
|
|
|
shared_qobject_ptr<QNetworkReply> m_reply;
|
2021-08-20 00:34:32 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void executeTask();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void downloadError(QNetworkReply::NetworkError);
|
|
|
|
void downloadFinished();
|
|
|
|
};
|
|
|
|
|