summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/script.h
Side-by-side diff
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 */