summaryrefslogtreecommitdiffstats
path: root/tdecore/tests/tdeprociotest.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-12-15 22:06:44 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-12-15 22:06:44 +0900
commitaf644c020106e7096d4fe9c648f25eede98c972f (patch)
treee20b7c4bc22bca994e80e6a798313b5800efce21 /tdecore/tests/tdeprociotest.h
parenta876c10e905fa357d43de03cf0fcb922cac9e4d5 (diff)
downloadtdelibs-master.tar.gz
tdelibs-master.zip
Rename class KProcIO to TDEProcIOHEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore/tests/tdeprociotest.h')
-rw-r--r--tdecore/tests/tdeprociotest.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/tdecore/tests/tdeprociotest.h b/tdecore/tests/tdeprociotest.h
new file mode 100644
index 000000000..194a26504
--- /dev/null
+++ b/tdecore/tests/tdeprociotest.h
@@ -0,0 +1,42 @@
+//
+// DUMMY -- A dummy class with a slot to demonstrate TDEProcess signals
+//
+// version 0.2, Aug 2nd 1997
+//
+// (C) Christian Czezatke
+// e9025461@student.tuwien.ac.at
+//
+
+
+#ifndef __DUMMY_H__
+#define __DUMMY_H__
+
+#include <stdio.h>
+#include <tqobject.h>
+#include "tdeprocio.h"
+
+class Dummy : public TQObject
+{
+ TQ_OBJECT
+
+ public slots:
+ void printMessage(TDEProcess *proc)
+ {
+ printf("Process %d exited!\n", (int)proc->getPid());
+ }
+
+ void gotOutput(TDEProcIO*proc)
+ {
+ TQString line;
+ while(true) {
+ int result = proc->readln(line);
+ if (result == -1) return;
+ printf("OUTPUT>> [%d] '%s'\n", result, line.latin1());
+ }
+ }
+
+};
+
+#endif
+
+