diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-01 21:07:37 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-01 21:07:37 (GMT) |
commit | 23eb677daea8e084fcaa1256f1a9433e324b1474 (patch) | |
tree | a21225293db6881174814290ad7298120c4a078b /examples/declarative/tutorials/samegame/samegame4/samegame.qml | |
parent | 1f327a1de8db245d0b28e7dfdc5bca1af0b56782 (diff) | |
parent | 37e8fd4e09c1221efde3e67e6acd5cfbb35686fd (diff) | |
download | Qt-23eb677daea8e084fcaa1256f1a9433e324b1474.zip Qt-23eb677daea8e084fcaa1256f1a9433e324b1474.tar.gz Qt-23eb677daea8e084fcaa1256f1a9433e324b1474.tar.bz2 |
Merge remote branch 'origin/4.7' into HEAD
Conflicts:
examples/declarative/proxywidgets/proxywidgets.pro
examples/declarative/widgets/mywidgets.pro
examples/declarative/widgets/widgets.pro
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame4/samegame.qml')
-rw-r--r-- | examples/declarative/tutorials/samegame/samegame4/samegame.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml index c2e8018..090496d 100644 --- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml @@ -1,5 +1,6 @@ import Qt 4.6 import "content" +import "content/samegame.js" as SameGame Rectangle { id: screen @@ -21,20 +22,19 @@ Rectangle { property int score: 0 property int tileSize: 40 - Script { source: "content/samegame.js" } - z: 20; anchors.centerIn: parent width: parent.width - (parent.width % getTileSize()); height: parent.height - (parent.height % getTileSize()); MouseArea { - id: gameMR - anchors.fill: parent; onClicked: handleClick(mouse.x,mouse.y); + anchors.fill: parent; onClicked: SameGame.handleClick(mouse.x,mouse.y); } } } Dialog { id: dialog; anchors.centerIn: parent; z: 21 } + + //![0] Dialog { id: scoreName; anchors.centerIn: parent; z: 22; Text { @@ -54,6 +54,7 @@ Rectangle { anchors.left: spacer.right } } + //![0] Rectangle { id: toolBar @@ -62,7 +63,7 @@ Rectangle { anchors.bottom: screen.bottom Button { - id: btnA; text: "New Game"; onClicked: {initBoard();} + id: btnA; text: "New Game"; onClicked: {SameGame.initBoard();} anchors.left: parent.left; anchors.leftMargin: 3 anchors.verticalCenter: parent.verticalCenter } |