summaryrefslogtreecommitdiff
path: root/examples/hybridshell/shell.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hybridshell/shell.h')
-rw-r--r--examples/hybridshell/shell.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/hybridshell/shell.h b/examples/hybridshell/shell.h
new file mode 100644
index 0000000..cb2cfdc
--- /dev/null
+++ b/examples/hybridshell/shell.h
@@ -0,0 +1,27 @@
+#ifndef SHELL_H
+#define SHELL_H
+
+#include <QObject>
+#include <QProcess>
+class Shell : public QObject
+{
+ Q_OBJECT
+public:
+ explicit Shell(QObject *parent = 0);
+
+signals:
+ void stdoutData(const QString& data);
+ void stderrData(const QString& data);
+
+public slots:
+ void start();
+ void exec(const QString& data);
+
+private slots:
+ void handleOutput();
+
+private:
+ QProcess process;
+};
+
+#endif // SHELL_H