mirror of
https://github.com/tnodir/fort
synced 2024-11-17 15:25:32 +00:00
34 lines
596 B
C++
34 lines
596 B
C++
#ifndef TASKDOWNLOADER_H
|
|
#define TASKDOWNLOADER_H
|
|
|
|
#include "taskworker.h"
|
|
|
|
QT_FORWARD_DECLARE_CLASS(NetDownloader)
|
|
|
|
class TaskDownloader : public TaskWorker
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit TaskDownloader(QObject *parent = nullptr);
|
|
|
|
NetDownloader *downloader() const { return m_downloader; }
|
|
|
|
protected:
|
|
virtual void setupDownloader() = 0;
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
void run() override;
|
|
void abort(bool success = false) override;
|
|
|
|
protected slots:
|
|
virtual void downloadFinished(bool success) = 0;
|
|
|
|
private:
|
|
NetDownloader *m_downloader;
|
|
};
|
|
|
|
#endif // TASKDOWNLOADER_H
|