cutter/src/common/CommandTask.h

32 lines
686 B
C
Raw Normal View History

2018-06-22 17:29:42 +00:00
#ifndef COMMANDTASK_H
#define COMMANDTASK_H
2018-10-17 07:55:53 +00:00
#include "common/AsyncTask.h"
#include "core/Cutter.h"
2018-06-22 17:29:42 +00:00
class CUTTER_EXPORT CommandTask : public AsyncTask
2018-06-22 17:29:42 +00:00
{
Q_OBJECT
public:
2018-10-21 14:53:38 +00:00
enum ColorMode {DISABLED=COLOR_MODE_DISABLED, MODE_16=COLOR_MODE_16, MODE_256=COLOR_MODE_256, MODE_16M=COLOR_MODE_16M};
CommandTask(const QString &cmd, ColorMode colorMode=ColorMode::DISABLED, bool outFormatHtml=false);
2018-06-22 17:29:42 +00:00
QString getTitle() override { return tr("Running Command"); }
signals:
void finished(const QString &result);
protected:
void runTask() override;
private:
QString cmd;
2018-10-21 14:53:38 +00:00
ColorMode colorMode;
bool outFormatHtml;
2018-06-22 17:29:42 +00:00
};
#endif //COMMANDTASK_H