2018-05-26 18:49:57 +00:00
|
|
|
|
|
|
|
#ifndef ASYNCTASKDIALOG_H
|
|
|
|
#define ASYNCTASKDIALOG_H
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2018-05-27 14:51:01 +00:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QTimer>
|
|
|
|
|
2018-05-26 18:49:57 +00:00
|
|
|
namespace Ui {
|
|
|
|
class AsyncTaskDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class AsyncTask;
|
|
|
|
|
|
|
|
class AsyncTaskDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
AsyncTaskDialog(AsyncTask *task, QWidget *parent = nullptr);
|
|
|
|
~AsyncTaskDialog();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void updateLog();
|
2018-05-27 14:51:01 +00:00
|
|
|
void updateProgressTimer();
|
2018-05-26 18:49:57 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::unique_ptr<Ui::AsyncTaskDialog> ui;
|
|
|
|
AsyncTask *task;
|
2018-05-27 14:51:01 +00:00
|
|
|
QTimer timer;
|
2018-05-26 18:49:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //ASYNCTASKDIALOG_H
|