summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame4
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-04-08 07:37:06 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-04-08 07:37:06 (GMT)
commit28605b56271cd3efb78c5f2f51855d2bca56ee6f (patch)
tree3bc0988400d8d8f4dd251c94d20443ecd3f6b150 /examples/declarative/tutorials/samegame/samegame4
parent3ceffd7287a269ec5ea9dab712ee9120a539e0e1 (diff)
parentbe8a7153d613586d69ac528153a6b8ccbe931aa6 (diff)
downloadQt-28605b56271cd3efb78c5f2f51855d2bca56ee6f.zip
Qt-28605b56271cd3efb78c5f2f51855d2bca56ee6f.tar.gz
Qt-28605b56271cd3efb78c5f2f51855d2bca56ee6f.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Conflicts: examples/declarative/tutorials/samegame/samegame4/content/samegame.js
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame4')
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml6
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml2
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js11
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml6
5 files changed, 9 insertions, 18 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
index e50aae0..243df75 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Item { id:block
@@ -9,8 +9,8 @@ Item { id:block
property int targetX: 0
property int targetY: 0
- SpringFollow on x { source: targetX; spring: 2; damping: 0.2; enabled: spawned }
- SpringFollow on y { source: targetY; spring: 2; damping: 0.2 }
+ SpringFollow on x { to: targetX; spring: 2; damping: 0.2; enabled: spawned }
+ SpringFollow on y { to: targetY; spring: 2; damping: 0.2 }
//![1]
//![2]
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
index 4a1b2d3..04d1d1f 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
index 1b1b3a2..0716bb3 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index a05e3a3..f88b428 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -22,11 +22,6 @@ function timeStr(msecs) {
return ret;
}
-function getTileSize()
-{
- return tileSize;
-}
-
function initBoard()
{
for(var i = 0; i<maxIndex; i++){
@@ -44,7 +39,6 @@ function initBoard()
nameInputDialog.forceClose();
dialog.forceClose();
- var a = new Date();
//Initialize Board
board = new Array(maxIndex);
gameCanvas.score = 0;
@@ -54,9 +48,6 @@ function initBoard()
createBlock(column,row);
}
}
- timer = new Date();
-
- print(timer.valueOf() - a.valueOf());
}
var fillFound;//Set after a floodFill call to the number of tiles found
@@ -87,7 +78,7 @@ function floodFill(column,row,type)
if(type == -1){
first = true;
type = board[index(column,row)].type;
-
+
//Flood fill initialization
fillFound = 0;
floodBoard = new Array(maxIndex);
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
index 8cc2137..59e0cef 100644
--- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
import "content/samegame.js" as SameGame
@@ -23,8 +23,8 @@ Rectangle {
property int tileSize: 40
z: 20; anchors.centerIn: parent
- width: parent.width - (parent.width % getTileSize());
- height: parent.height - (parent.height % getTileSize());
+ width: parent.width - (parent.width % tileSize);
+ height: parent.height - (parent.height % tileSize);
MouseArea {
anchors.fill: parent; onClicked: SameGame.handleClick(mouse.x,mouse.y);