diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-10-06 03:49:48 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-10-06 03:49:48 (GMT) |
commit | 6ddff0d80fb360a7b3296e039150c97729fb8d10 (patch) | |
tree | ca6fe14e74f3b51652f5a339a4c188dbff86da51 /demos/declarative/samegame | |
parent | bb0465258d20badae7f9aa62849c02a94244570c (diff) | |
parent | 2ec7f08421f484339818c731594f12ddb22d38c0 (diff) | |
download | Qt-6ddff0d80fb360a7b3296e039150c97729fb8d10.zip Qt-6ddff0d80fb360a7b3296e039150c97729fb8d10.tar.gz Qt-6ddff0d80fb360a7b3296e039150c97729fb8d10.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'demos/declarative/samegame')
-rw-r--r-- | demos/declarative/samegame/content/Button.qml | 6 | ||||
-rw-r--r-- | demos/declarative/samegame/content/Dialog.qml | 8 | ||||
-rw-r--r-- | demos/declarative/samegame/samegame.qml | 24 |
3 files changed, 19 insertions, 19 deletions
diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/content/Button.qml index 2354218..301124e 100644 --- a/demos/declarative/samegame/content/Button.qml +++ b/demos/declarative/samegame/content/Button.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml index 401d211..661257b 100644 --- a/demos/declarative/samegame/content/Dialog.qml +++ b/demos/declarative/samegame/content/Dialog.qml @@ -7,15 +7,15 @@ Rectangle { page.opacity = 0; } function show(txt) { - MyText.text = txt; + myText.text = txt; page.opacity = 1; } signal closed(); - color: "white"; border.width: 1; width: MyText.width + 20; height: 60; + color: "white"; border.width: 1; width: myText.width + 20; height: 60; opacity: 0 - opacity: Behavior { + opacity: Behavior { NumberAnimation { duration: 1000 } } - Text { id: MyText; anchors.centerIn: parent; text: "Hello World!" } + Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); } } diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index ede4362..92d85f3 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -2,7 +2,7 @@ import Qt 4.6 import "content" Rectangle { - id: Screen + id: screen width: 490; height: 720 Script { source: "content/samegame.js" } @@ -10,7 +10,7 @@ Rectangle { SystemPalette { id: activePalette; colorGroup: Qt.Active } Item { - width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + width: parent.width; anchors.top: parent.top; anchors.bottom: toolBar.top Image { id: background @@ -34,14 +34,14 @@ Rectangle { } Dialog { id: dialog; anchors.centerIn: parent; z: 21 } - Dialog { - id: scoreName; anchors.centerIn: parent; z: 22; + Dialog { + id: scoreName; anchors.centerIn: parent; z: 22; TextInput { - id: Editor - onAccepted: { - if(scoreName.opacity==1&&Editor.text!="") - sendHighScore(Editor.text); - scoreName.forceClose(); + id: editor + onAccepted: { + if(scoreName.opacity==1&&editor.text!="") + sendHighScore(editor.text); + scoreName.forceClose(); } anchors.verticalCenter: parent.verticalCenter width: 72; focus: true @@ -50,10 +50,10 @@ Rectangle { } Rectangle { - id: ToolBar + id: toolBar color: activePalette.window height: 32; width: parent.width - anchors.bottom: Screen.bottom + anchors.bottom: screen.bottom Button { id: btnA; text: "New Game"; onClicked: {initBoard();} @@ -62,7 +62,7 @@ Rectangle { } Text { - id: Score + id: score text: "Score: " + gameCanvas.score; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter |