doc/src/snippets/qtscript/scriptedslot/object.js
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Thu, 08 Apr 2010 14:19:33 +0300
branchRCL_3
changeset 8 3f74d0d4af4c
parent 0 1918ee327afb
permissions -rw-r--r--
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84

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");
}