mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-29 09:15:49 +00:00
21 lines
508 B
C
21 lines
508 B
C
|
#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 ¤t, qint64 &total) = 0;
|
||
|
virtual bool isRunning() const = 0;
|
||
|
public slots:
|
||
|
virtual void start() = 0;
|
||
|
};
|