fort/src/ui/task/tasktasix.h

41 lines
664 B
C
Raw Normal View History

2017-09-19 04:46:49 +00:00
#ifndef TASKTASIX_H
#define TASKTASIX_H
#include <QTimer>
2017-09-21 13:24:45 +00:00
#include "taskworker.h"
2017-09-19 08:35:43 +00:00
2017-09-19 04:46:49 +00:00
class QNetworkAccessManager;
class QNetworkReply;
2017-09-21 13:24:45 +00:00
class TaskTasix : public TaskWorker
2017-09-19 04:46:49 +00:00
{
Q_OBJECT
public:
2017-09-21 13:24:45 +00:00
explicit TaskTasix(QObject *parent = nullptr);
2017-09-19 04:46:49 +00:00
static QString parseBufer(const QByteArray &buffer);
signals:
public slots:
2017-09-19 08:35:43 +00:00
void run() override;
2017-09-21 13:24:45 +00:00
void cancel(bool success = false) override;
bool processResult(FortManager *fortManager) override;
2017-09-19 04:46:49 +00:00
private slots:
void requestReadyRead();
private:
QNetworkAccessManager *m_networkManager;
QNetworkReply *m_reply;
QTimer m_timer;
QByteArray m_buffer;
};
#endif // TASKTASIX_H