util/doc/src/snippets/qtscript/scriptedslot/object.js
changeset 7 f7bc934e204c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/util/doc/src/snippets/qtscript/scriptedslot/object.js	Wed Mar 31 11:06:36 2010 +0300
@@ -0,0 +1,18 @@
+function Object(timer, editor)
+{
+    this.editor = editor;
+    this.counter = 0;
+    timer.timeout.connect(notify);
+    timer.timeout.connect(this, this.addLine);
+}
+
+Object.prototype.addLine = function()
+{
+    this.editor.append(this.counter);
+    this.counter += 1;
+}
+
+function notify()
+{
+    print("timeout() received");
+}