summaryrefslogtreecommitdiffstats
path: root/logic/tasks/ProgressProvider.h
blob: e158eb54685116ac1976b81b7e5f8d59be73120d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include <QObject>
class ProgressProvider : public QObject
{
	Q_OBJECT
protected:
    explicit ProgressProvider(QObject* parent = 0): QObject(parent){}
signals:
	void started();
	void progress(qint64 current, qint64 total);
	void succeeded();
	void failed(QString reason);
	void status(QString status);
public:
	virtual QString getStatus() const = 0;
	virtual void getProgress(qint64 &current, qint64 &total) = 0;
	virtual bool isRunning() const = 0;
public slots:
	virtual void start() = 0;
};