summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/script.h
authorwazlaf <wazlaf>2002-10-13 13:49:11 (UTC)
committer wazlaf <wazlaf>2002-10-13 13:49:11 (UTC)
commit68c37a3412ef4609ba0209318ef2b06f7dd1aaf1 (patch) (side-by-side diff)
treef81ee5460dd49c4fcb8a61bf50911c5036742bed /noncore/apps/opie-console/script.h
parent0e6d241e26211a8ffff07ba8e23f4a3cec9065be (diff)
downloadopie-68c37a3412ef4609ba0209318ef2b06f7dd1aaf1.zip
opie-68c37a3412ef4609ba0209318ef2b06f7dd1aaf1.tar.gz
opie-68c37a3412ef4609ba0209318ef2b06f7dd1aaf1.tar.bz2
Scripting functionality added. What this currently does is catch keys in the emulation_layer
and store them in a "Script" instance. This can later be saved to a file and on request "replayed" by sending the typed keys to the associated IOLayer
Diffstat (limited to 'noncore/apps/opie-console/script.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/script.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/script.h b/noncore/apps/opie-console/script.h
new file mode 100644
index 0000000..dc2351b
--- a/dev/null
+++ b/noncore/apps/opie-console/script.h
@@ -0,0 +1,30 @@
+#ifndef CONSOLE_SCRIPT_H
+#define CONSOLE_SCRIPT_H
+
+#include <qstring.h>
+
+/* Very simple scripting - this class stores keys received
+ * by emulation_layer */
+
+class Script {
+public:
+ /* Construct an empty script */
+ Script();
+
+ /* Load a script from a text file */
+ Script(const QString fileName);
+
+ /* Append a line to the script */
+ void appendString(const QString string);
+
+ /* Save this script to a file */
+ void saveTo(const QString fileName) const;
+
+ /* Return the script's content */
+ QString script() const;
+protected:
+ QString m_script;
+};
+
+
+#endif /* CONSOLE_SCRIPT_H */