diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-04-17 14:06:06 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-04-17 14:06:06 (GMT) |
commit | f15b8a83e2e51955776a3f07cb85ebfc342dd8ef (patch) | |
tree | c5dc684986051654898db11ce73e03b9fec8db99 /examples/script/qstetrix/tetrixwindow.js | |
download | Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.zip Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.gz Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.bz2 |
Initial import of statemachine branch from the old kinetic repository
Diffstat (limited to 'examples/script/qstetrix/tetrixwindow.js')
-rw-r--r-- | examples/script/qstetrix/tetrixwindow.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/script/qstetrix/tetrixwindow.js b/examples/script/qstetrix/tetrixwindow.js new file mode 100644 index 0000000..6157a8c --- /dev/null +++ b/examples/script/qstetrix/tetrixwindow.js @@ -0,0 +1,16 @@ +function TetrixWindow(ui) +{ + this.ui = ui; + + var boardUi = ui.findChild("board"); + boardUi.nextPieceLabel = ui.findChild("nextPieceLabel"); + + this.board = new TetrixBoard(boardUi); + + ui.findChild("startButton").clicked.connect(this.board, this.board.start); + ui.findChild("quitButton").clicked.connect(Qt.App.quit); + ui.findChild("pauseButton").clicked.connect(this.board, this.board.pause); + boardUi.scoreChanged.connect(ui.findChild("scoreLcd")["display(int)"]); + boardUi.levelChanged.connect(ui.findChild("levelLcd")["display(int)"]); + boardUi.linesRemovedChanged.connect(ui.findChild("linesLcd")["display(int)"]); +} |