mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 12:56:11 +00:00
ab27e09b91
Sometimes it is not necessary to include the whole Cutter.h file Hence, it's been splitted so you can include only what you require E.g. #include "core/CutterCommon.h" to have access to the common types
32 lines
671 B
C++
32 lines
671 B
C++
|
|
#ifndef COMMANDTASK_H
|
|
#define COMMANDTASK_H
|
|
|
|
#include "common/AsyncTask.h"
|
|
#include "core/Cutter.h"
|
|
|
|
class CommandTask : public AsyncTask
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
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);
|
|
|
|
QString getTitle() override { return tr("Running Command"); }
|
|
|
|
signals:
|
|
void finished(const QString &result);
|
|
|
|
protected:
|
|
void runTask() override;
|
|
|
|
private:
|
|
QString cmd;
|
|
ColorMode colorMode;
|
|
bool outFormatHtml;
|
|
};
|
|
|
|
#endif //COMMANDTASK_H
|