27 lines
459 B
C++
27 lines
459 B
C++
|
|
#ifndef PYTHONRUNNER_H
|
|
#define PYTHONRUNNER_H
|
|
|
|
#include <QObject>
|
|
#include <QTextEdit>
|
|
|
|
class PythonEmbed;
|
|
|
|
class PythonRunner : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PythonRunner(QTextEdit* outputWidget, QObject* parent = nullptr);
|
|
~PythonRunner();
|
|
|
|
public slots:
|
|
void runScript(const QString& scriptContent);
|
|
void stopScript();
|
|
|
|
private:
|
|
QTextEdit* m_outputWidget;
|
|
PythonEmbed* m_pythonEmbed;
|
|
};
|
|
|
|
#endif // PYTHONRUNNER_H
|