summaryrefslogtreecommitdiffstats
path: root/kverbos/kverbos/kfeedercontrol.h
diff options
context:
space:
mode:
Diffstat (limited to 'kverbos/kverbos/kfeedercontrol.h')
-rw-r--r--kverbos/kverbos/kfeedercontrol.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/kverbos/kverbos/kfeedercontrol.h b/kverbos/kverbos/kfeedercontrol.h
new file mode 100644
index 00000000..9617aa18
--- /dev/null
+++ b/kverbos/kverbos/kfeedercontrol.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ kfeedercontrol.h - description
+ -------------------
+ begin : Wed Apr 17 2002
+ copyright : (C) 2002 by Arnold Kraschinski
+ email : arnold.k67@gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KFEEDERCONTROL_H
+#define KFEEDERCONTROL_H
+
+#include <kprocess.h>
+#include <dcopclient.h>
+
+
+/** This class is used to control the KFeeder.
+ *@author Arnold Kraschinski
+ */
+
+class KFeederControl {
+public:
+ KFeederControl(int ID, bool splash, bool automatic);
+ ~KFeederControl();
+ /** resets the KFeeder */
+ bool reset();
+ /** sets the type of food movement. 'true' the food is moved automatically.
+ * 'false' it is necessary to trigger the food movement. */
+ bool setAutomatic(bool a);
+ /** sends one Point to the KFeeder */
+ bool addOne();
+ /** sends n points to the KFeeder */
+ bool addN(int n);
+ /** returns if the KProcess is still active. This is useful right after the start to
+ * see if it was successful
+ */
+ bool isActive() { return active; }
+ /** returns the last result of the latest dcop operation */
+ bool getLastResult() { return lastResult; }
+private:
+ KProcess childFeeder;
+ QCString feederID;
+ bool active;
+ bool lastResult;
+
+ QCString appId;
+ DCOPClient* dcop;
+};
+
+#endif