cutter/src/dialogs/RizinTaskDialog.h

51 lines
955 B
C
Raw Normal View History

#ifndef RZTASKDIALOG_H
#define RZTASKDIALOG_H
#include <memory>
#include <QDialog>
#include <QTimer>
#include <QElapsedTimer>
2020-12-16 09:51:53 +00:00
#include "common/RizinTask.h"
#include "core/CutterCommon.h"
2020-12-16 09:51:53 +00:00
class RizinTask;
namespace Ui {
2020-12-16 09:51:53 +00:00
class RizinTaskDialog;
}
2020-12-16 09:51:53 +00:00
class CUTTER_EXPORT RizinTaskDialog : public QDialog
{
Q_OBJECT
public:
2020-12-16 09:51:53 +00:00
using Ptr = QSharedPointer<RizinTask>;
RizinTaskDialog(Ptr task, QWidget *parent = nullptr);
~RizinTaskDialog();
2021-01-24 14:50:13 +00:00
void setBreakOnClose(bool v) { breakOnClose = v; }
bool getBreakOnClose() { return breakOnClose; }
void setDesc(const QString &label);
public slots:
void reject() override;
private slots:
void updateProgressTimer();
protected:
void closeEvent(QCloseEvent *event) override;
private:
2020-12-16 09:51:53 +00:00
std::unique_ptr<Ui::RizinTaskDialog> ui;
QSharedPointer<RizinTask> task;
QTimer timer;
QElapsedTimer elapsedTimer;
bool breakOnClose = false;
};
2021-01-24 14:50:13 +00:00
#endif // RZTASKDIALOG_H