summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-07 08:22:46 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-07 08:22:46 (GMT)
commit8a54ed9524befc4a172cdc19a18d9953f3a01df0 (patch)
treedb94e8e713498d768b34f0e57bcca1f6d1b2e311 /doc
parent19d080d319dccac15654294af80530bed9ef11ea (diff)
downloadQt-8a54ed9524befc4a172cdc19a18d9953f3a01df0.zip
Qt-8a54ed9524befc4a172cdc19a18d9953f3a01df0.tar.gz
Qt-8a54ed9524befc4a172cdc19a18d9953f3a01df0.tar.bz2
typos
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/advtutorial1.qdoc2
-rw-r--r--doc/src/declarative/advtutorial2.qdoc2
-rw-r--r--doc/src/declarative/advtutorial3.qdoc8
-rw-r--r--doc/src/declarative/advtutorial4.qdoc6
-rw-r--r--doc/src/declarative/tutorial1.qdoc2
-rw-r--r--doc/src/declarative/tutorial2.qdoc2
-rw-r--r--doc/src/declarative/tutorial3.qdoc2
7 files changed, 12 insertions, 12 deletions
diff --git a/doc/src/declarative/advtutorial1.qdoc b/doc/src/declarative/advtutorial1.qdoc
index 48b32cd..f9c1f93 100644
--- a/doc/src/declarative/advtutorial1.qdoc
+++ b/doc/src/declarative/advtutorial1.qdoc
@@ -1,8 +1,8 @@
/*!
\page advtutorial1.html
\example declarative/tutorials/samegame/samegame1
-\title Advanced Tutorial 1 - Creating the Game canvas and block
\target advtutorial1
+\title Advanced Tutorial 1 - Creating the Game canvas and block
The first step is to create the items in your application. In Same Game we have a main game screen and the blocks that populate it.
diff --git a/doc/src/declarative/advtutorial2.qdoc b/doc/src/declarative/advtutorial2.qdoc
index 2d2fe19..4a6bb06 100644
--- a/doc/src/declarative/advtutorial2.qdoc
+++ b/doc/src/declarative/advtutorial2.qdoc
@@ -1,7 +1,7 @@
/*!
\page advtutorial2.html
-\title Advanced Tutorial 2 - Populating the Game Canvas
\target advtutorial2
+\title Advanced Tutorial 2 - Populating the Game Canvas
Now that we've written some basic elements, let's start writing the game. The
first thing to do is to generate all of the blocks. Now we need to dynamically
diff --git a/doc/src/declarative/advtutorial3.qdoc b/doc/src/declarative/advtutorial3.qdoc
index 635054b..ffdc960 100644
--- a/doc/src/declarative/advtutorial3.qdoc
+++ b/doc/src/declarative/advtutorial3.qdoc
@@ -1,9 +1,9 @@
/*!
\page advtutorial3.html
-\title Advanced Tutorial 3 - Implementing the Game Logic
\target advtutorial3
+\title Advanced Tutorial 3 - Implementing the Game Logic
-To the initBoard function we added clearing the board before hand, so that clicking new game won't leave the previous game lying around in the background. To the createComponent function we have added setting the type of the block to a number between one and three - it's fundamental to the game logic that the blocks be different types if you want a fun game.
+To the initBoard function we added clearing the board beforehand, so that clicking new game won't leave the previous game lying around in the background. To the createComponent function we have added setting the type of the block to a number between one and three - it's fundamental to the game logic that the blocks be different types if you want a fun game.
The main change was adding the following game logic functions:
\list
@@ -23,9 +23,9 @@ You'll notice them referring to the 'gameCanvas' item. This is an item that has
\snippet declarative/tutorials/samegame/samegame3/samegame.qml 1
-This item is the exact size of the board, contains a score property, and a mouse region for input. The blocks are now created as its children, and its size is used as the noe determining board size. Since it needs to bind its size to a multiple of tileSize, tileSize needs to be moved into a QML property and out of the script file. It can still be accessed from the script.
+This item is the exact size of the board, contains a score property, and a mouse region for input. The blocks are now created as its children, and its size is used to determining the board size. Since it needs to bind its size to a multiple of tileSize, tileSize needs to be moved into a QML property and out of the script file. It can still be accessed from the script.
-The mouse region simply calls handleClick(), which deals with the input events.Should those events cause the player to score, gameCanvas.score is updated. The score display text item has also been changed to bind its text property to gamecanvas.score. Note that if score was a global variable in the samegame.js file yo ucould not bind to it. You can only bind to QML properties.
+The mouse region simply calls handleClick(), which deals with the input events. Should those events cause the player to score, gameCanvas.score is updated. The score display text item has also been changed to bind its text property to gamecanvas.score. Note that if score was a global variable in the samegame.js file you could not bind to it. You can only bind to QML properties.
victoryCheck() mostly just updates score. But it also pops up a dialog saying 'Game Over' when the game is over. In this example we wanted a pure-QML, animated dialog, and since the Fx primitives set doesn't contain one, we wrote our own. Below is the code for the Dialog element, note how it's designed so as to be quite usable imperatively from within the script file:
diff --git a/doc/src/declarative/advtutorial4.qdoc b/doc/src/declarative/advtutorial4.qdoc
index 291d2f2..ae38c5e 100644
--- a/doc/src/declarative/advtutorial4.qdoc
+++ b/doc/src/declarative/advtutorial4.qdoc
@@ -1,7 +1,7 @@
/*!
\page advtutorial4.html
-\title Advanced Tutorial 4 - Finishing Touches
\target advtutorial4
+\title Advanced Tutorial 4 - Finishing Touches
Now we're going to do two things to liven the game up. Animate the blocks and add a web-based high score system.
@@ -9,7 +9,7 @@ If you compare the samegame3 directory with samegame4, you'll noticed that we've
\section2 Animated Blocks
-The most vital animations are that the blocks move fluidly around the board. QML has many tools for fluid behavior, and in this case we're going to use the Follow element. By having the script set targetX and targetY, instead of x and y directly, we can set the x and y of the block to a follow. SpringFollow is a property value source, which means that you can set a property to be one of these elements and it will automatically bind the property to the element's value. The SpringFollow's value follows another value over time, when the value it is tracking changes the SpringFollow's value will also change, but it will move smoothly there over time with a spring-like movement (based on the spring parameters specified). This is shown in the below snippet of code from Block.qml:
+The most vital animations are that the blocks move fluidly around the board. QML has many tools for fluid behavior, and in this case we're going to use the SpringFollow element. By having the script set targetX and targetY, instead of x and y directly, we can set the x and y of the block to a follow. SpringFollow is a property value source, which means that you can set a property to be one of these elements and it will automatically bind the property to the element's value. The SpringFollow's value follows another value over time, when the value it is tracking changes the SpringFollow's value will also change, but it will move smoothly there over time with a spring-like movement (based on the spring parameters specified). This is shown in the below snippet of code from Block.qml:
\code
property int targetX: 0
@@ -19,7 +19,7 @@ The most vital animations are that the blocks move fluidly around the board. QML
y: SpringFollow { source: targetY; spring: 2; damping: 0.2 }
\endcode
-We also have to change the samegame.js code, so that wherever it was setting the x or y it now sets targetX and targetY (including when creating the block). This simple change is all you need to get spring moving blocks that no longer teleport around the board. If you try doing just this though, you'll notice that they now never jump from one point to another, even in the initialization! This gives an odd effect of having them all jump out of the corner (0,0) on start up. We'd rather that they fall down from the top in rows. To do this, we disable the x Follow (but not the y follow) and only enable it after we've set the x in the createBlock function. The above snippet now becomes:
+We also have to change the samegame.js code, so that wherever it was setting the x or y it now sets targetX and targetY (including when creating the block). This simple change is all you need to get spring moving blocks that no longer teleport around the board. If you try doing just this though, you'll notice that they now never jump from one point to another, even in the initialization! This gives an odd effect of having them all jump out of the corner (0,0) on start up. We'd rather that they fall down from the top in rows. To do this, we disable the x follow (but not the y follow) and only enable it after we've set the x in the createBlock function. The above snippet now becomes:
\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 1
diff --git a/doc/src/declarative/tutorial1.qdoc b/doc/src/declarative/tutorial1.qdoc
index d4f1095..e6232af 100644
--- a/doc/src/declarative/tutorial1.qdoc
+++ b/doc/src/declarative/tutorial1.qdoc
@@ -1,7 +1,7 @@
/*!
\page tutorial1.html
-\title Tutorial 1 - Hello World!
\target tutorial1
+\title Tutorial 1 - Hello World!
This first program is a simple "Hello world" example. The picture below is a screenshot of this program.
diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc
index c6fd06b..c97fddf 100644
--- a/doc/src/declarative/tutorial2.qdoc
+++ b/doc/src/declarative/tutorial2.qdoc
@@ -1,7 +1,7 @@
/*!
\page tutorial2.html
-\title Tutorial 2 - Some colors
\target tutorial2
+\title Tutorial 2 - Some colors
This chapter adds a color picker to change the color of the text.
diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc
index a0d842c..bce7e92 100644
--- a/doc/src/declarative/tutorial3.qdoc
+++ b/doc/src/declarative/tutorial3.qdoc
@@ -1,7 +1,7 @@
/*!
\page tutorial3.html
-\title Tutorial 3 - States
\target tutorial3
+\title Tutorial 3 - States
In this chapter, we make this example a little bit more dynamic by introducing states.