summaryrefslogtreecommitdiffstats
path: root/examples
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
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')
-rw-r--r--examples/declarative/animations/color-animation.qml2
-rw-r--r--examples/declarative/animations/easing.qml2
-rw-r--r--examples/declarative/animations/property-animation.qml2
-rw-r--r--examples/declarative/aspectratio/face_fit.qml2
-rw-r--r--examples/declarative/aspectratio/face_fit_animated.qml6
-rw-r--r--examples/declarative/aspectratio/scale_and_crop.qml2
-rw-r--r--examples/declarative/aspectratio/scale_and_crop_simple.qml2
-rw-r--r--examples/declarative/aspectratio/scale_and_sidecrop.qml2
-rw-r--r--examples/declarative/aspectratio/scale_to_fit.qml2
-rw-r--r--examples/declarative/aspectratio/scale_to_fit_simple.qml2
-rw-r--r--examples/declarative/behaviors/SideRect.qml2
-rw-r--r--examples/declarative/behaviors/behavior-example.qml2
-rw-r--r--examples/declarative/border-image/animated.qml2
-rw-r--r--examples/declarative/border-image/borders.qml2
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml2
-rw-r--r--examples/declarative/clocks/clocks.qml2
-rw-r--r--examples/declarative/clocks/content/Clock.qml8
-rw-r--r--examples/declarative/connections/connections-example.qml2
-rw-r--r--examples/declarative/connections/content/Button.qml2
-rw-r--r--examples/declarative/dial/content/Dial.qml4
-rw-r--r--examples/declarative/dial/dial-example.qml2
-rw-r--r--examples/declarative/dynamic/dynamic.qml4
-rw-r--r--examples/declarative/dynamic/qml/Button.qml2
-rw-r--r--examples/declarative/dynamic/qml/GenericItem.qml2
-rw-r--r--examples/declarative/dynamic/qml/PaletteItem.qml2
-rw-r--r--examples/declarative/dynamic/qml/PerspectiveItem.qml2
-rw-r--r--examples/declarative/dynamic/qml/Sun.qml2
-rw-r--r--examples/declarative/effects/effects.qml2
-rw-r--r--examples/declarative/fillmode/fillmode.qml2
-rw-r--r--examples/declarative/flipable/content/Card.qml2
-rw-r--r--examples/declarative/flipable/flipable-example.qml2
-rw-r--r--examples/declarative/focus/Core/ContextMenu.qml2
-rw-r--r--examples/declarative/focus/Core/GridMenu.qml2
-rw-r--r--examples/declarative/focus/Core/ListViewDelegate.qml2
-rw-r--r--examples/declarative/focus/Core/ListViews.qml2
-rw-r--r--examples/declarative/focus/Core/qmldir2
-rw-r--r--examples/declarative/focus/focus.qml4
-rw-r--r--examples/declarative/fonts/banner.qml2
-rw-r--r--examples/declarative/fonts/fonts.qml2
-rw-r--r--examples/declarative/fonts/hello.qml2
-rw-r--r--examples/declarative/gridview/gridview-example.qml2
-rw-r--r--examples/declarative/imageprovider/imageprovider-example.qml2
-rw-r--r--examples/declarative/images/images.qml2
-rw-r--r--examples/declarative/layouts/Button.qml2
-rw-r--r--examples/declarative/layouts/layouts.qml2
-rw-r--r--examples/declarative/layouts/positioners.qml2
-rw-r--r--examples/declarative/listmodel-threaded/timedisplay.qml2
-rw-r--r--examples/declarative/listview/content/ClickAutoRepeating.qml2
-rw-r--r--examples/declarative/listview/content/MediaButton.qml2
-rw-r--r--examples/declarative/listview/dummydata/MyPetsModel.qml2
-rw-r--r--examples/declarative/listview/dummydata/Recipes.qml2
-rw-r--r--examples/declarative/listview/dynamic.qml2
-rw-r--r--examples/declarative/listview/highlight.qml4
-rw-r--r--examples/declarative/listview/itemlist.qml2
-rw-r--r--examples/declarative/listview/listview-example.qml2
-rw-r--r--examples/declarative/listview/recipes.qml8
-rw-r--r--examples/declarative/listview/sections.qml2
-rw-r--r--examples/declarative/mousearea/mouse.qml2
-rw-r--r--examples/declarative/objectlistmodel/view.qml2
-rw-r--r--examples/declarative/package/Delegate.qml2
-rw-r--r--examples/declarative/package/view.qml2
-rw-r--r--examples/declarative/parallax/parallax.qml2
-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml2
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml2
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/Clock.qml6
-rw-r--r--examples/declarative/progressbar/content/ProgressBar.qml2
-rw-r--r--examples/declarative/progressbar/progressbars.qml2
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.qml2
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml2
-rw-r--r--examples/declarative/scrollbar/display.qml2
-rw-r--r--examples/declarative/searchbox/SearchBox.qml2
-rw-r--r--examples/declarative/searchbox/main.qml2
-rw-r--r--examples/declarative/slideswitch/content/Switch.qml2
-rw-r--r--examples/declarative/slideswitch/slideswitch.qml2
-rw-r--r--examples/declarative/sql/hello.qml2
-rw-r--r--examples/declarative/states/states.qml2
-rw-r--r--examples/declarative/states/transitions.qml2
-rw-r--r--examples/declarative/tabwidget/TabWidget.qml2
-rw-r--r--examples/declarative/tabwidget/tabs.qml8
-rw-r--r--examples/declarative/tic-tac-toe/content/Button.qml2
-rw-r--r--examples/declarative/tic-tac-toe/content/TicTac.qml2
-rw-r--r--examples/declarative/tic-tac-toe/content/tic-tac-toe.js145
-rw-r--r--examples/declarative/tic-tac-toe/tic-tac-toe.qml4
-rw-r--r--examples/declarative/tutorials/helloworld/Cell.qml2
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial1.qml2
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial2.qml2
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial3.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Block.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Block.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Block.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Dialog.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.qml2
-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
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml8
-rw-r--r--examples/declarative/velocity/Day.qml132
-rw-r--r--examples/declarative/velocity/cork.jpgbin88766 -> 149337 bytes
-rw-r--r--examples/declarative/velocity/note-yellow.pngbin0 -> 54559 bytes
-rw-r--r--examples/declarative/velocity/sticky.pngbin15319 -> 0 bytes
-rw-r--r--examples/declarative/velocity/velocity.qml96
-rw-r--r--examples/declarative/webview/alerts.qml4
-rw-r--r--examples/declarative/webview/autosize.qml2
-rw-r--r--examples/declarative/webview/content/FieldText.qml2
-rw-r--r--examples/declarative/webview/content/Mapping/Map.qml2
-rw-r--r--examples/declarative/webview/content/SpinSquare.qml2
-rw-r--r--examples/declarative/webview/googleMaps.qml2
-rw-r--r--examples/declarative/webview/inline-html.qml2
-rw-r--r--examples/declarative/webview/newwindows.qml2
-rw-r--r--examples/declarative/webview/transparent.qml2
-rw-r--r--examples/declarative/workerscript/workerscript.qml2
-rw-r--r--examples/declarative/xmldata/daringfireball.qml4
-rw-r--r--examples/declarative/xmldata/yahoonews.qml4
-rw-r--r--examples/declarative/xmlhttprequest/test.qml2
121 files changed, 379 insertions, 289 deletions
diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml
index d8361ba..3616a31 100644
--- a/examples/declarative/animations/color-animation.qml
+++ b/examples/declarative/animations/color-animation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Item {
diff --git a/examples/declarative/animations/easing.qml b/examples/declarative/animations/easing.qml
index 8f2655e..bed4b5f9 100644
--- a/examples/declarative/animations/easing.qml
+++ b/examples/declarative/animations/easing.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: window
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
index fd5eb3c..5afe8ef 100644
--- a/examples/declarative/animations/property-animation.qml
+++ b/examples/declarative/animations/property-animation.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: window
diff --git a/examples/declarative/aspectratio/face_fit.qml b/examples/declarative/aspectratio/face_fit.qml
index 6a031a4..52cd4c2 100644
--- a/examples/declarative/aspectratio/face_fit.qml
+++ b/examples/declarative/aspectratio/face_fit.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// Here, we implement a hybrid of the "scale to fit" and "scale and crop"
// behaviours which will crop up to 25% from *one* dimension if necessary
diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml
index 79e99e9..63fc9c6 100644
--- a/examples/declarative/aspectratio/face_fit_animated.qml
+++ b/examples/declarative/aspectratio/face_fit_animated.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// Here, we extend the "face_fit" example with animation to show how truly
// diverse and usage-specific behaviours are made possible by NOT putting a
@@ -19,8 +19,8 @@ Rectangle {
x: (parent.width-width*scale)/2
y: (parent.height-height*scale)/2
SpringFollow on scale {
- source: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height),
- Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333))
+ to: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height),
+ Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333))
spring: 1
damping: 0.05
}
diff --git a/examples/declarative/aspectratio/scale_and_crop.qml b/examples/declarative/aspectratio/scale_and_crop.qml
index 2e2b6ed..a438104 100644
--- a/examples/declarative/aspectratio/scale_and_crop.qml
+++ b/examples/declarative/aspectratio/scale_and_crop.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// Here, we implement "Scale and Crop" behaviour.
//
diff --git a/examples/declarative/aspectratio/scale_and_crop_simple.qml b/examples/declarative/aspectratio/scale_and_crop_simple.qml
index e720ce7..1160ec5 100644
--- a/examples/declarative/aspectratio/scale_and_crop_simple.qml
+++ b/examples/declarative/aspectratio/scale_and_crop_simple.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// Here, we implement "Scale to Fit" behaviour, using the
// fillMode property.
diff --git a/examples/declarative/aspectratio/scale_and_sidecrop.qml b/examples/declarative/aspectratio/scale_and_sidecrop.qml
index 8230e49..5593ab8 100644
--- a/examples/declarative/aspectratio/scale_and_sidecrop.qml
+++ b/examples/declarative/aspectratio/scale_and_sidecrop.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// Here, we implement a variant of "Scale and Crop" behaviour, where we
// crop the sides if necessary to fully fit vertically, but not the reverse.
diff --git a/examples/declarative/aspectratio/scale_to_fit.qml b/examples/declarative/aspectratio/scale_to_fit.qml
index eae4d16..724a36e 100644
--- a/examples/declarative/aspectratio/scale_to_fit.qml
+++ b/examples/declarative/aspectratio/scale_to_fit.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// Here, we implement "Scale to Fit" behaviour "manually", rather
// than using the preserveAspect property.
diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml
index 7389581..0e960b4 100644
--- a/examples/declarative/aspectratio/scale_to_fit_simple.qml
+++ b/examples/declarative/aspectratio/scale_to_fit_simple.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// Here, we implement "Scale to Fit" behaviour, using the
// fillMode property.
diff --git a/examples/declarative/behaviors/SideRect.qml b/examples/declarative/behaviors/SideRect.qml
index 7caac45..d06f73c 100644
--- a/examples/declarative/behaviors/SideRect.qml
+++ b/examples/declarative/behaviors/SideRect.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: myRect
diff --git a/examples/declarative/behaviors/behavior-example.qml b/examples/declarative/behaviors/behavior-example.qml
index 8da1ada..b21f4f0 100644
--- a/examples/declarative/behaviors/behavior-example.qml
+++ b/examples/declarative/behaviors/behavior-example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "#343434"
diff --git a/examples/declarative/border-image/animated.qml b/examples/declarative/border-image/animated.qml
index 29c02b3..730aeca 100644
--- a/examples/declarative/border-image/animated.qml
+++ b/examples/declarative/border-image/animated.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/examples/declarative/border-image/borders.qml b/examples/declarative/border-image/borders.qml
index 9879416..8956128 100644
--- a/examples/declarative/border-image/borders.qml
+++ b/examples/declarative/border-image/borders.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
index f0c3cfc..f65f093 100644
--- a/examples/declarative/border-image/content/MyBorderImage.qml
+++ b/examples/declarative/border-image/content/MyBorderImage.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property alias horizontalMode: image.horizontalTileMode
diff --git a/examples/declarative/clocks/clocks.qml b/examples/declarative/clocks/clocks.qml
index c5aa1dc..22cf820 100644
--- a/examples/declarative/clocks/clocks.qml
+++ b/examples/declarative/clocks/clocks.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml
index 90c6be8..c853174 100644
--- a/examples/declarative/clocks/content/Clock.qml
+++ b/examples/declarative/clocks/content/Clock.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: clock
@@ -36,7 +36,7 @@ Item {
origin.x: 7.5; origin.y: 73; angle: 0
SpringFollow on angle {
spring: 2; damping: 0.2; modulus: 360
- source: (clock.hours * 30) + (clock.minutes * 0.5)
+ to: (clock.hours * 30) + (clock.minutes * 0.5)
}
}
}
@@ -50,7 +50,7 @@ Item {
origin.x: 6.5; origin.y: 83; angle: 0
SpringFollow on angle {
spring: 2; damping: 0.2; modulus: 360
- source: clock.minutes * 6
+ to: clock.minutes * 6
}
}
}
@@ -64,7 +64,7 @@ Item {
origin.x: 2.5; origin.y: 80; angle: 0
SpringFollow on angle {
spring: 5; damping: 0.25; modulus: 360
- source: clock.seconds * 6
+ to: clock.seconds * 6
}
}
}
diff --git a/examples/declarative/connections/connections-example.qml b/examples/declarative/connections/connections-example.qml
index c35bda5..0b4ca45 100644
--- a/examples/declarative/connections/connections-example.qml
+++ b/examples/declarative/connections/connections-example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/examples/declarative/connections/content/Button.qml b/examples/declarative/connections/content/Button.qml
index 0e33c78..f95afbb 100644
--- a/examples/declarative/connections/content/Button.qml
+++ b/examples/declarative/connections/content/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: button
diff --git a/examples/declarative/dial/content/Dial.qml b/examples/declarative/dial/content/Dial.qml
index ad4717a..f9ab3e3 100644
--- a/examples/declarative/dial/content/Dial.qml
+++ b/examples/declarative/dial/content/Dial.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
@@ -29,7 +29,7 @@ Item {
SpringFollow on angle {
spring: 1.4
damping: .15
- source: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
+ to: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
}
}
}
diff --git a/examples/declarative/dial/dial-example.qml b/examples/declarative/dial/dial-example.qml
index 3aed70e..1ca958a 100644
--- a/examples/declarative/dial/dial-example.qml
+++ b/examples/declarative/dial/dial-example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml
index 7de4d38..7331b3f 100644
--- a/examples/declarative/dynamic/dynamic.qml
+++ b/examples/declarative/dynamic/dynamic.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
import "qml"
@@ -110,7 +110,7 @@ Item {
focusOnPress: true
font.pixelSize: 14
- text: "import Qt 4.6\nImage {\n id: smile;\n x: 500*Math.random();\n y: 200*Math.random(); \n source: 'images/face-smile.png';\n NumberAnimation on opacity { \n to: 0; duration: 1500;\n }\n Component.onCompleted: smile.destroy(1500);\n}"
+ text: "import Qt 4.7\nImage {\n id: smile;\n x: 500*Math.random();\n y: 200*Math.random(); \n source: 'images/face-smile.png';\n NumberAnimation on opacity { \n to: 0; duration: 1500;\n }\n Component.onCompleted: smile.destroy(1500);\n}"
}
Button {
text: "Create"
diff --git a/examples/declarative/dynamic/qml/Button.qml b/examples/declarative/dynamic/qml/Button.qml
index 757e295..946da21 100644
--- a/examples/declarative/dynamic/qml/Button.qml
+++ b/examples/declarative/dynamic/qml/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/examples/declarative/dynamic/qml/GenericItem.qml b/examples/declarative/dynamic/qml/GenericItem.qml
index 10e3dba..faac06d 100644
--- a/examples/declarative/dynamic/qml/GenericItem.qml
+++ b/examples/declarative/dynamic/qml/GenericItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item{
property bool created: false
diff --git a/examples/declarative/dynamic/qml/PaletteItem.qml b/examples/declarative/dynamic/qml/PaletteItem.qml
index 08bdc40..e8f2ed4 100644
--- a/examples/declarative/dynamic/qml/PaletteItem.qml
+++ b/examples/declarative/dynamic/qml/PaletteItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "itemCreation.js" as Code
GenericItem {
diff --git a/examples/declarative/dynamic/qml/PerspectiveItem.qml b/examples/declarative/dynamic/qml/PerspectiveItem.qml
index a0dfad3..3cbe64a 100644
--- a/examples/declarative/dynamic/qml/PerspectiveItem.qml
+++ b/examples/declarative/dynamic/qml/PerspectiveItem.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Image {
id: tree
diff --git a/examples/declarative/dynamic/qml/Sun.qml b/examples/declarative/dynamic/qml/Sun.qml
index 81b6e9b..3627964 100644
--- a/examples/declarative/dynamic/qml/Sun.qml
+++ b/examples/declarative/dynamic/qml/Sun.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Image {
id: sun
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
index 2280a2a..d325e11 100644
--- a/examples/declarative/effects/effects.qml
+++ b/examples/declarative/effects/effects.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml
index 3f2020c..249674b 100644
--- a/examples/declarative/fillmode/fillmode.qml
+++ b/examples/declarative/fillmode/fillmode.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Image {
width: 400
diff --git a/examples/declarative/flipable/content/Card.qml b/examples/declarative/flipable/content/Card.qml
index 6b8fa69..2577d89 100644
--- a/examples/declarative/flipable/content/Card.qml
+++ b/examples/declarative/flipable/content/Card.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Flipable {
id: container
diff --git a/examples/declarative/flipable/flipable-example.qml b/examples/declarative/flipable/flipable-example.qml
index eebc721..171353f 100644
--- a/examples/declarative/flipable/flipable-example.qml
+++ b/examples/declarative/flipable/flipable-example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/examples/declarative/focus/Core/ContextMenu.qml b/examples/declarative/focus/Core/ContextMenu.qml
index bd6d8a2..56a1b3e 100644
--- a/examples/declarative/focus/Core/ContextMenu.qml
+++ b/examples/declarative/focus/Core/ContextMenu.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
FocusScope {
id: container
diff --git a/examples/declarative/focus/Core/GridMenu.qml b/examples/declarative/focus/Core/GridMenu.qml
index 03d837a..75f6be0 100644
--- a/examples/declarative/focus/Core/GridMenu.qml
+++ b/examples/declarative/focus/Core/GridMenu.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
FocusScope {
property alias interactive: gridView.interactive
diff --git a/examples/declarative/focus/Core/ListViewDelegate.qml b/examples/declarative/focus/Core/ListViewDelegate.qml
index b7e067a..35c04cf 100644
--- a/examples/declarative/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/focus/Core/ListViewDelegate.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Component {
Item {
diff --git a/examples/declarative/focus/Core/ListViews.qml b/examples/declarative/focus/Core/ListViews.qml
index 3cc4836..b28cc1c 100644
--- a/examples/declarative/focus/Core/ListViews.qml
+++ b/examples/declarative/focus/Core/ListViews.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
FocusScope {
clip: true
diff --git a/examples/declarative/focus/Core/qmldir b/examples/declarative/focus/Core/qmldir
index 0460d9c..e25d63c 100644
--- a/examples/declarative/focus/Core/qmldir
+++ b/examples/declarative/focus/Core/qmldir
@@ -1,4 +1,4 @@
ContextMenu ContextMenu.qml
GridMenu GridMenu.qml
-ListViews Listviews.qml
+ListViews ListViews.qml
ListViewDelegate ListViewDelegate.qml
diff --git a/examples/declarative/focus/focus.qml b/examples/declarative/focus/focus.qml
index a8dc3c8..d9b6549 100644
--- a/examples/declarative/focus/focus.qml
+++ b/examples/declarative/focus/focus.qml
@@ -1,5 +1,5 @@
-import Qt 4.6
-import "Core" 1.0
+import Qt 4.7
+import "Core"
Rectangle {
id: window; width: 800; height: 480; color: "#3E606F"
diff --git a/examples/declarative/fonts/banner.qml b/examples/declarative/fonts/banner.qml
index 957246f..b7f5344 100644
--- a/examples/declarative/fonts/banner.qml
+++ b/examples/declarative/fonts/banner.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: screen
diff --git a/examples/declarative/fonts/fonts.qml b/examples/declarative/fonts/fonts.qml
index e928df4..49c3d0a 100644
--- a/examples/declarative/fonts/fonts.qml
+++ b/examples/declarative/fonts/fonts.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
property string myText: "The quick brown fox jumps over the lazy dog."
diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml
index e15a0f0..9d926fb 100644
--- a/examples/declarative/fonts/hello.qml
+++ b/examples/declarative/fonts/hello.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: screen; width: 800; height: 480; color: "black"
diff --git a/examples/declarative/gridview/gridview-example.qml b/examples/declarative/gridview/gridview-example.qml
index 93931c7..fd5f430 100644
--- a/examples/declarative/gridview/gridview-example.qml
+++ b/examples/declarative/gridview/gridview-example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 300; height: 400; color: "white"
diff --git a/examples/declarative/imageprovider/imageprovider-example.qml b/examples/declarative/imageprovider/imageprovider-example.qml
index a895821..9d22576 100644
--- a/examples/declarative/imageprovider/imageprovider-example.qml
+++ b/examples/declarative/imageprovider/imageprovider-example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "ImageProviderCore"
//![0]
ListView {
diff --git a/examples/declarative/images/images.qml b/examples/declarative/images/images.qml
index 35ce1ab..7980088 100644
--- a/examples/declarative/images/images.qml
+++ b/examples/declarative/images/images.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml
index 7cbf68a..0f08893 100644
--- a/examples/declarative/layouts/Button.qml
+++ b/examples/declarative/layouts/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + textelement.width + 13; height: pix.height + 10; id: page
property string text
diff --git a/examples/declarative/layouts/layouts.qml b/examples/declarative/layouts/layouts.qml
index 4b2a3f8..231605e 100644
--- a/examples/declarative/layouts/layouts.qml
+++ b/examples/declarative/layouts/layouts.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.widgets 4.6
Item {
id: resizable
diff --git a/examples/declarative/layouts/positioners.qml b/examples/declarative/layouts/positioners.qml
index bce53bd..ef225d0 100644
--- a/examples/declarative/layouts/positioners.qml
+++ b/examples/declarative/layouts/positioners.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/listmodel-threaded/timedisplay.qml b/examples/declarative/listmodel-threaded/timedisplay.qml
index e8d8fe2..848192e 100644
--- a/examples/declarative/listmodel-threaded/timedisplay.qml
+++ b/examples/declarative/listmodel-threaded/timedisplay.qml
@@ -1,5 +1,5 @@
// ![0]
-import Qt 4.6
+import Qt 4.7
ListView {
width: 200
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml
index cbf1f3b..f65c2b3 100644
--- a/examples/declarative/listview/content/ClickAutoRepeating.qml
+++ b/examples/declarative/listview/content/ClickAutoRepeating.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: page
diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml
index e9065c1..ec69000 100644
--- a/examples/declarative/listview/content/MediaButton.qml
+++ b/examples/declarative/listview/content/MediaButton.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property var text
diff --git a/examples/declarative/listview/dummydata/MyPetsModel.qml b/examples/declarative/listview/dummydata/MyPetsModel.qml
index 1ac37bb..f15dda3 100644
--- a/examples/declarative/listview/dummydata/MyPetsModel.qml
+++ b/examples/declarative/listview/dummydata/MyPetsModel.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
// ListModel allows free form list models to be defined and populated.
diff --git a/examples/declarative/listview/dummydata/Recipes.qml b/examples/declarative/listview/dummydata/Recipes.qml
index 68e94ac..f707c82 100644
--- a/examples/declarative/listview/dummydata/Recipes.qml
+++ b/examples/declarative/listview/dummydata/Recipes.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
ListModel {
id: recipesModel
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
index 81550d7..32483fa 100644
--- a/examples/declarative/listview/dynamic.qml
+++ b/examples/declarative/listview/dynamic.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
import "../scrollbar"
diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml
index 5e4911d..2b54dd8 100644
--- a/examples/declarative/listview/highlight.qml
+++ b/examples/declarative/listview/highlight.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 400; height: 300; color: "white"
@@ -44,7 +44,7 @@ Rectangle {
id: petHighlight
Rectangle {
width: 200; height: 50; color: "#FFFF88"
- SpringFollow on y { source: list1.currentItem.y; spring: 3; damping: 0.1 }
+ SpringFollow on y { to: list1.currentItem.y; spring: 3; damping: 0.1 }
}
}
ListView {
diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml
index 41aa860..2f4aa31 100644
--- a/examples/declarative/listview/itemlist.qml
+++ b/examples/declarative/listview/itemlist.qml
@@ -1,7 +1,7 @@
// This example demonstrates placing items in a view using
// a VisualItemModel
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "lightgray"
diff --git a/examples/declarative/listview/listview-example.qml b/examples/declarative/listview/listview-example.qml
index 92acce1..d648b60 100644
--- a/examples/declarative/listview/listview-example.qml
+++ b/examples/declarative/listview/listview-example.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 600; height: 300; color: "white"
diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/listview/recipes.qml
index b76a9ab..66c4109 100644
--- a/examples/declarative/listview/recipes.qml
+++ b/examples/declarative/listview/recipes.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
// This example illustrates expanding a list item to show a more detailed view
@@ -60,7 +60,9 @@ Rectangle {
opacity: wrapper.detailsOpacity
}
Text {
- text: ingredients; wrap: true; width: parent.width
+ text: ingredients
+ wrapMode: Text.WordWrap
+ width: parent.width
opacity: wrapper.detailsOpacity
}
}
@@ -82,7 +84,7 @@ Rectangle {
id: flick
anchors.top: methodTitle.bottom; anchors.bottom: parent.bottom
width: parent.width; contentHeight: methodText.height; clip: true
- Text { id: methodText; text: method; wrap: true; width: details.width }
+ Text { id: methodText; text: method; wrapMode: Text.WordWrap; width: details.width }
}
Image {
anchors.right: flick.right; anchors.top: flick.top
diff --git a/examples/declarative/listview/sections.qml b/examples/declarative/listview/sections.qml
index 877026b..7c132a4 100644
--- a/examples/declarative/listview/sections.qml
+++ b/examples/declarative/listview/sections.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
//! [0]
Rectangle {
diff --git a/examples/declarative/mousearea/mouse.qml b/examples/declarative/mousearea/mouse.qml
index 9191f8a..efbfb53 100644
--- a/examples/declarative/mousearea/mouse.qml
+++ b/examples/declarative/mousearea/mouse.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
diff --git a/examples/declarative/objectlistmodel/view.qml b/examples/declarative/objectlistmodel/view.qml
index 5f5e415..908e388 100644
--- a/examples/declarative/objectlistmodel/view.qml
+++ b/examples/declarative/objectlistmodel/view.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
ListView {
width: 100
diff --git a/examples/declarative/package/Delegate.qml b/examples/declarative/package/Delegate.qml
index f35314f..785fde6 100644
--- a/examples/declarative/package/Delegate.qml
+++ b/examples/declarative/package/Delegate.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
//![0]
Package {
diff --git a/examples/declarative/package/view.qml b/examples/declarative/package/view.qml
index 07bba0c..67f896b 100644
--- a/examples/declarative/package/view.qml
+++ b/examples/declarative/package/view.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
width: 400
diff --git a/examples/declarative/parallax/parallax.qml b/examples/declarative/parallax/parallax.qml
index 6193f27..cb0437d 100644
--- a/examples/declarative/parallax/parallax.qml
+++ b/examples/declarative/parallax/parallax.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "../clocks/content"
import "qml"
diff --git a/examples/declarative/parallax/qml/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml
index 08193ae..8f5f290 100644
--- a/examples/declarative/parallax/qml/ParallaxView.qml
+++ b/examples/declarative/parallax/qml/ParallaxView.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: root
diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml
index c13b879..b1e1ae8 100644
--- a/examples/declarative/parallax/qml/Smiley.qml
+++ b/examples/declarative/parallax/qml/Smiley.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: window
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml b/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
index 622fcf9..ce1dd69 100644
--- a/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
+++ b/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: clock
@@ -20,7 +20,7 @@ Rectangle {
origin.x: 7.5; origin.y: 73; angle: 0
SpringFollow on angle {
spring: 2; damping: 0.2; modulus: 360
- source: (clock.hours * 30) + (clock.minutes * 0.5)
+ to: (clock.hours * 30) + (clock.minutes * 0.5)
}
}
}
@@ -34,7 +34,7 @@ Rectangle {
origin.x: 6.5; origin.y: 83; angle: 0
SpringFollow on angle {
spring: 2; damping: 0.2; modulus: 360
- source: clock.minutes * 6
+ to: clock.minutes * 6
}
}
}
diff --git a/examples/declarative/progressbar/content/ProgressBar.qml b/examples/declarative/progressbar/content/ProgressBar.qml
index aafb12e..d82d89d 100644
--- a/examples/declarative/progressbar/content/ProgressBar.qml
+++ b/examples/declarative/progressbar/content/ProgressBar.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: progressbar
diff --git a/examples/declarative/progressbar/progressbars.qml b/examples/declarative/progressbar/progressbars.qml
index c8022b0..e10c9f0 100644
--- a/examples/declarative/progressbar/progressbars.qml
+++ b/examples/declarative/progressbar/progressbars.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/examples/declarative/proxywidgets/proxywidgets.qml b/examples/declarative/proxywidgets/proxywidgets.qml
index 023de71..6fa0c40 100644
--- a/examples/declarative/proxywidgets/proxywidgets.qml
+++ b/examples/declarative/proxywidgets/proxywidgets.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "ProxyWidgets" 1.0
Rectangle {
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml
index 802b537..d2f52d5 100644
--- a/examples/declarative/scrollbar/ScrollBar.qml
+++ b/examples/declarative/scrollbar/ScrollBar.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: scrollBar
diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml
index 84763d2..421cb7f 100644
--- a/examples/declarative/scrollbar/display.qml
+++ b/examples/declarative/scrollbar/display.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 640
diff --git a/examples/declarative/searchbox/SearchBox.qml b/examples/declarative/searchbox/SearchBox.qml
index 524b652..be85023 100644
--- a/examples/declarative/searchbox/SearchBox.qml
+++ b/examples/declarative/searchbox/SearchBox.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
FocusScope {
id: focusScope
diff --git a/examples/declarative/searchbox/main.qml b/examples/declarative/searchbox/main.qml
index 9b33be3..eb95a23 100644
--- a/examples/declarative/searchbox/main.qml
+++ b/examples/declarative/searchbox/main.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 500; height: 250; color: "#edecec"
diff --git a/examples/declarative/slideswitch/content/Switch.qml b/examples/declarative/slideswitch/content/Switch.qml
index 758aee6..e16198d 100644
--- a/examples/declarative/slideswitch/content/Switch.qml
+++ b/examples/declarative/slideswitch/content/Switch.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Item {
id: toggleswitch
diff --git a/examples/declarative/slideswitch/slideswitch.qml b/examples/declarative/slideswitch/slideswitch.qml
index 396749f..51c3c77 100644
--- a/examples/declarative/slideswitch/slideswitch.qml
+++ b/examples/declarative/slideswitch/slideswitch.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import "content"
Rectangle {
diff --git a/examples/declarative/sql/hello.qml b/examples/declarative/sql/hello.qml
index 29e084c..a9f77ca 100644
--- a/examples/declarative/sql/hello.qml
+++ b/examples/declarative/sql/hello.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Text {
function findGreetings() {
diff --git a/examples/declarative/states/states.qml b/examples/declarative/states/states.qml
index 89f2421..c35cd63 100644
--- a/examples/declarative/states/states.qml
+++ b/examples/declarative/states/states.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml
index 8ad61ad..3cb5543 100644
--- a/examples/declarative/states/transitions.qml
+++ b/examples/declarative/states/transitions.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/tabwidget/TabWidget.qml b/examples/declarative/tabwidget/TabWidget.qml
index f0f7164..e6b40fd 100644
--- a/examples/declarative/tabwidget/TabWidget.qml
+++ b/examples/declarative/tabwidget/TabWidget.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: tabWidget
diff --git a/examples/declarative/tabwidget/tabs.qml b/examples/declarative/tabwidget/tabs.qml
index 1d11b03..e1bbdef 100644
--- a/examples/declarative/tabwidget/tabs.qml
+++ b/examples/declarative/tabwidget/tabs.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
TabWidget {
id: tabs
@@ -13,7 +13,7 @@ TabWidget {
Text {
anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
text: "Roses are red"; font.pixelSize: 20
- wrap: true; width: parent.width - 20
+ wrapMode: Text.WordWrap; width: parent.width - 20
}
}
}
@@ -27,7 +27,7 @@ TabWidget {
Text {
anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
text: "Flower stems are green"; font.pixelSize: 20
- wrap: true; width: parent.width - 20
+ wrapMode: Text.WordWrap; width: parent.width - 20
}
}
}
@@ -41,7 +41,7 @@ TabWidget {
Text {
anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
text: "Violets are blue"; font.pixelSize: 20
- wrap: true; width: parent.width - 20
+ wrapMode: Text.WordWrap; width: parent.width - 20
}
}
}
diff --git a/examples/declarative/tic-tac-toe/content/Button.qml b/examples/declarative/tic-tac-toe/content/Button.qml
index cfc2f04..05d3f8d 100644
--- a/examples/declarative/tic-tac-toe/content/Button.qml
+++ b/examples/declarative/tic-tac-toe/content/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/examples/declarative/tic-tac-toe/content/TicTac.qml b/examples/declarative/tic-tac-toe/content/TicTac.qml
index ccb7b78..d247943 100644
--- a/examples/declarative/tic-tac-toe/content/TicTac.qml
+++ b/examples/declarative/tic-tac-toe/content/TicTac.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
signal clicked
diff --git a/examples/declarative/tic-tac-toe/content/tic-tac-toe.js b/examples/declarative/tic-tac-toe/content/tic-tac-toe.js
new file mode 100644
index 0000000..f8d6d9f
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/content/tic-tac-toe.js
@@ -0,0 +1,145 @@
+function winner(board)
+{
+ for (var i=0; i<3; ++i) {
+ if (board.children[i].state!=""
+ && board.children[i].state==board.children[i+3].state
+ && board.children[i].state==board.children[i+6].state)
+ return true
+
+ if (board.children[i*3].state!=""
+ && board.children[i*3].state==board.children[i*3+1].state
+ && board.children[i*3].state==board.children[i*3+2].state)
+ return true
+ }
+
+ if (board.children[0].state!=""
+ && board.children[0].state==board.children[4].state!=""
+ && board.children[0].state==board.children[8].state!="")
+ return true
+
+ if (board.children[2].state!=""
+ && board.children[2].state==board.children[4].state!=""
+ && board.children[2].state==board.children[6].state!="")
+ return true
+
+ return false
+}
+
+function restart()
+{
+ // No moves left - start again
+ for (var i=0; i<9; ++i)
+ board.children[i].state = ""
+}
+
+function makeMove(pos,player)
+{
+ board.children[pos].state = player
+ if (winner(board)) {
+ win(player + " wins")
+ return true
+ } else {
+ return false
+ }
+}
+
+function computerTurn()
+{
+ var r = Math.random();
+ if(r < game.difficulty){
+ smartAI();
+ }else{
+ randAI();
+ }
+}
+
+function smartAI()
+{
+ function boardCopy(a){
+ var ret = new Object;
+ ret.children = new Array(9);
+ for(var i = 0; i<9; i++){
+ ret.children[i] = new Object;
+ ret.children[i].state = a.children[i].state;
+ }
+ return ret;
+ }
+ for(var i=0; i<9; i++){
+ var simpleBoard = boardCopy(board);
+ if (board.children[i].state == "") {
+ simpleBoard.children[i].state = "O";
+ if(winner(simpleBoard)){
+ makeMove(i,"O")
+ return
+ }
+ }
+ }
+ for(var i=0; i<9; i++){
+ var simpleBoard = boardCopy(board);
+ if (board.children[i].state == "") {
+ simpleBoard.children[i].state = "X";
+ if(winner(simpleBoard)){
+ makeMove(i,"O")
+ return
+ }
+ }
+ }
+ function thwart(a,b,c){//If they are at a, try b or c
+ if (board.children[a].state == "X") {
+ if (board.children[b].state == "") {
+ makeMove(b,"O")
+ return true
+ }else if (board.children[c].state == "") {
+ makeMove(c,"O")
+ return true
+ }
+ }
+ return false;
+ }
+ if(thwart(4,0,2)) return;
+ if(thwart(0,4,3)) return;
+ if(thwart(2,4,1)) return;
+ if(thwart(6,4,7)) return;
+ if(thwart(8,4,5)) return;
+ if(thwart(1,4,2)) return;
+ if(thwart(3,4,0)) return;
+ if(thwart(5,4,8)) return;
+ if(thwart(7,4,6)) return;
+ for(var i =0; i<9; i++){//Backup
+ if (board.children[i].state == "") {
+ makeMove(i,"O")
+ return
+ }
+ }
+ restart();
+}
+
+function randAI()
+{
+ var open = 0;
+ for (var i=0; i<9; ++i)
+ if (board.children[i].state == "") {
+ open += 1;
+ }
+ if(open == 0){
+ restart();
+ return;
+ }
+ var openA = new Array(open);//JS doesn't have lists I can append to (i think)
+ var acc = 0;
+ for (var i=0; i<9; ++i)
+ if (board.children[i].state == "") {
+ openA[acc] = i;
+ acc += 1;
+ }
+ var choice = openA[Math.floor(Math.random() * open)];
+ makeMove(choice, "O");
+}
+
+function win(s)
+{
+ msg.text = s
+ msg.opacity = 1
+ endtimer.running = true
+}
+
diff --git a/examples/declarative/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/tic-tac-toe/tic-tac-toe.qml
index 4bb1e3f..ca66a46 100644
--- a/examples/declarative/tic-tac-toe/tic-tac-toe.qml
+++ b/examples/declarative/tic-tac-toe/tic-tac-toe.qml
@@ -1,6 +1,6 @@
-import Qt 4.6
+import Qt 4.7
import "content"
-import "tic-tac-toe.js" as Logic
+import "content/tic-tac-toe.js" as Logic
Item {
id: game
diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/declarative/tutorials/helloworld/Cell.qml
index 9249ffe..1e52a67 100644
--- a/examples/declarative/tutorials/helloworld/Cell.qml
+++ b/examples/declarative/tutorials/helloworld/Cell.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
//![1]
Item {
diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/declarative/tutorials/helloworld/tutorial1.qml
index 93d3c34..5e27b45 100644
--- a/examples/declarative/tutorials/helloworld/tutorial1.qml
+++ b/examples/declarative/tutorials/helloworld/tutorial1.qml
@@ -1,6 +1,6 @@
//![0]
//![3]
-import Qt 4.6
+import Qt 4.7
//![3]
//![1]
diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/declarative/tutorials/helloworld/tutorial2.qml
index 38447e2..085efa4 100644
--- a/examples/declarative/tutorials/helloworld/tutorial2.qml
+++ b/examples/declarative/tutorials/helloworld/tutorial2.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml
index d851c49..4bf4970 100644
--- a/examples/declarative/tutorials/helloworld/tutorial3.qml
+++ b/examples/declarative/tutorials/helloworld/tutorial3.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml
index f133b17..7cf819b 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Item {
id:block
diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml
index b77804c..6798c32 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
index 6e3a513..ae881ba 100644
--- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: screen
diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml
index e4b3354..44ff5d7 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id:block
diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml
index 4a1b2d3..04d1d1f 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
index d23280f..d98d383 100644
--- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
//![2]
import "samegame.js" as SameGame
//![2]
diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml
index 7620104..bb48ac8 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Item {
id:block
diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml
index 4a1b2d3..04d1d1f 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
index 9108fd9..6c358d6 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: page
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
index 60b2f9a..9623932 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
@@ -1,5 +1,5 @@
//![0]
-import Qt 4.6
+import Qt 4.7
import "samegame.js" as SameGame
Rectangle {
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);
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
index fcb285d..240183f 100644
--- a/examples/declarative/tvtennis/tvtennis.qml
+++ b/examples/declarative/tvtennis/tvtennis.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import Qt.multimedia 4.7
Rectangle {
@@ -31,7 +31,7 @@ Rectangle {
}
// Make y follow the target y coordinate, with a velocity of 200
- SpringFollow on y { source: ball.targetY; velocity: 200 }
+ SpringFollow on y { to: ball.targetY; velocity: 200 }
// Detect the ball hitting the top or bottom of the view and bounce it
onYChanged: {
@@ -52,7 +52,7 @@ Rectangle {
color: "Lime"
x: 2; width: 20; height: 90
SpringFollow on y {
- source: ball.y - 45; velocity: 300
+ to: ball.y - 45; velocity: 300
enabled: ball.direction == 'left'
}
}
@@ -61,7 +61,7 @@ Rectangle {
color: "Lime"
x: page.width - 22; width: 20; height: 90
SpringFollow on y {
- source: ball.y-45; velocity: 300
+ to: ball.y-45; velocity: 300
enabled: ball.direction == 'right'
}
}
diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml
index f4c24a5..724fcc8 100644
--- a/examples/declarative/velocity/Day.qml
+++ b/examples/declarative/velocity/Day.qml
@@ -1,78 +1,92 @@
-import Qt 4.6
+import Qt 4.7
-Rectangle {
- property alias day: dayText.text
- property var stickies
+Component {
+ Item {
+ property var stickies
- id: page
- width: 400; height: 500; radius: 7
- border.color: "black"
+ id: page
+ width: 840; height: 480
- Image { x: 10; y: 10; source: "cork.jpg" }
+ Image { source: "cork.jpg" }
- Text {
- id: dayText; x: 20; y: 20
- height: 40; width: 370
- font.pointSize: 14; font.bold: true
- style: Text.Outline; styleColor: "#dedede"
- }
-
- Repeater {
- model: page.stickies
-
- Item {
- id: stickyPage
- x: Math.random() * 200 + 100
- y: Math.random() * 300 + 50
- SpringFollow on rotation {
- source: -flickable.horizontalVelocity / 100
- spring: 2.0; damping: 0.1
- }
+ Text {
+ text: name; x: 15; y: 8; height: 40; width: 370
+ font.pixelSize: 18; font.bold: true; color: "white"
+ style: Text.Outline; styleColor: "black"
+ }
+ Repeater {
+ model: notes
Item {
- id: sticky
- scale: 0.5
- Image {
- id: stickyImage; source: "sticky.png"; transformOrigin: Item.TopLeft
- smooth: true; y: -20; x: 8 + -width * 0.6 / 2; scale: 0.6
- }
+ property int randomX: Math.random() * 500 + 100
+ property int randomY: Math.random() * 200 + 50
- TextEdit {
- id: myText; smooth: true; font.pointSize: 28
- readOnly: false; x: -104; y: 36; wrap: true
- rotation: -8; text: noteText; width: 195; height: 172
+ id: stickyPage
+ x: randomX; y: randomY
+
+ SpringFollow on rotation {
+ to: -flickable.horizontalVelocity / 100
+ spring: 2.0; damping: 0.15
}
Item {
- y: -20
- x: stickyImage.x
- width: stickyImage.width * stickyImage.scale
- height: stickyImage.height * stickyImage.scale
- MouseArea {
- id: mouse
- onClicked: { myText.focus = true }
- anchors.fill: parent
- drag.target: stickyPage; drag.axis: MouseArea.XandYAxis; drag.minimumY: 0; drag.maximumY: 500
- drag.minimumX: 0; drag.maximumX: 400
+ id: sticky
+ scale: 0.7
+ Image {
+ id: stickyImage
+ source: "note-yellow.png"; transformOrigin: Item.TopLeft
+ smooth: true; y: -20; x: 8 + -width * 0.6 / 2; scale: 0.6
+ }
+
+ TextEdit {
+ id: myText; smooth: true; font.pixelSize: 24
+ readOnly: false; x: -104; y: 36
+ rotation: -8; text: noteText; width: 215; height: 200
+ }
+
+ Item {
+ y: -20
+ x: stickyImage.x
+ width: stickyImage.width * stickyImage.scale
+ height: stickyImage.height * stickyImage.scale
+ MouseArea {
+ id: mouse
+ onClicked: { myText.focus = true }
+ anchors.fill: parent
+ drag.target: stickyPage
+ drag.axis: "XandYAxis"
+ drag.minimumY: 0
+ drag.maximumY: page.height - 80
+ drag.minimumX: 100
+ drag.maximumX: page.width - 140
+ }
}
}
- }
- Image {
- source: "tack.png"; transformOrigin: Item.TopLeft
- x: -width / 2; y: -height * 0.7 / 2; scale: 0.7
- }
+ Image {
+ source: "tack.png"; transformOrigin: Item.TopLeft
+ x: -width / 2; y: -height * 0.5 / 2; scale: 0.7
+ }
- states: State {
- name: "pressed"
- when: mouse.pressed
- PropertyChanges { target: sticky; rotation: 8; scale: 1 }
- PropertyChanges { target: page; z: 8 }
- }
+ states: State {
+ name: "pressed"
+ when: mouse.pressed
+ PropertyChanges { target: sticky; rotation: 8; scale: 1 }
+ PropertyChanges { target: page; z: 8 }
+ }
- transitions: Transition {
- NumberAnimation { properties: "rotation,scale"; duration: 200 }
+ transitions: Transition {
+ NumberAnimation { properties: "rotation,scale"; duration: 200 }
+ }
}
}
}
}
+
+
+
+
+
+
+
+
diff --git a/examples/declarative/velocity/cork.jpg b/examples/declarative/velocity/cork.jpg
index d4d706c..160bc00 100644
--- a/examples/declarative/velocity/cork.jpg
+++ b/examples/declarative/velocity/cork.jpg
Binary files differ
diff --git a/examples/declarative/velocity/note-yellow.png b/examples/declarative/velocity/note-yellow.png
new file mode 100644
index 0000000..8ddecc8
--- /dev/null
+++ b/examples/declarative/velocity/note-yellow.png
Binary files differ
diff --git a/examples/declarative/velocity/sticky.png b/examples/declarative/velocity/sticky.png
deleted file mode 100644
index 73df3cd..0000000
--- a/examples/declarative/velocity/sticky.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/velocity/velocity.qml
index 0d1881e..20821d6 100644
--- a/examples/declarative/velocity/velocity.qml
+++ b/examples/declarative/velocity/velocity.qml
@@ -1,108 +1,46 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
- color: "lightSteelBlue"
- width: 800; height: 600
+ width: 800; height: 480; color: "#464646"
ListModel {
id: list
ListElement {
name: "Sunday"
- dayColor: "#808080"
- notes: [
- ListElement {
- noteText: "Lunch"
- },
- ListElement {
- noteText: "Party"
- }
- ]
+ notes: [ ListElement { noteText: "Lunch" }, ListElement { noteText: "Birthday Party" } ]
}
ListElement {
name: "Monday"
- dayColor: "blue"
- notes: [
- ListElement {
- noteText: "Pickup kids"
- },
- ListElement {
- noteText: "Checkout kinetic"
- },
- ListElement {
- noteText: "Read email"
- }
- ]
+ notes: [ ListElement { noteText: "Pickup kids from\nschool\n4.30pm" },
+ ListElement { noteText: "Checkout Qt" }, ListElement { noteText: "Read email" } ]
}
ListElement {
name: "Tuesday"
- dayColor: "yellow"
- notes: [
- ListElement {
- noteText: "Walk dog"
- },
- ListElement {
- noteText: "Buy newspaper"
- }
- ]
+ notes: [ ListElement { noteText: "Walk dog" }, ListElement { noteText: "Buy newspaper" } ]
}
ListElement {
- name: "Wednesday"
- dayColor: "purple"
- notes: [
- ListElement {
- noteText: "Cook dinner"
- },
- ListElement {
- noteText: "Eat dinner"
- }
- ]
+ name: "Wednesday"; notes: [ ListElement { noteText: "Cook dinner" } ]
}
ListElement {
name: "Thursday"
- dayColor: "blue"
- notes: [
- ListElement {
- noteText: "5:30pm Meeting"
- },
- ListElement {
- noteText: "Weed garden"
- }
- ]
+ notes: [ ListElement { noteText: "Meeting\n5.30pm" }, ListElement { noteText: "Weed garden" } ]
}
ListElement {
name: "Friday"
- dayColor: "green"
- notes: [
- ListElement {
- noteText: "Still work"
- },
- ListElement {
- noteText: "Drink"
- }
- ]
+ notes: [ ListElement { noteText: "More work" }, ListElement { noteText: "Grocery shopping" } ]
}
ListElement {
name: "Saturday"
- dayColor: "orange"
- notes: [
- ListElement {
- noteText: "Drink"
- },
- ListElement {
- noteText: "Drink"
- }
- ]
+ notes: [ ListElement { noteText: "Drink" }, ListElement { noteText: "Download Qt\nPlay with QML" } ]
}
}
- Flickable {
+
+ ListView {
id: flickable
- anchors.fill: parent; contentWidth: lay.width
- Row {
- id: lay
- Repeater {
- model: list
- Component { Day { day: name; color: dayColor; stickies: notes } }
- }
- }
+ anchors.fill: parent; focus: true
+ model: list; delegate: Day { }
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ orientation: ListView.Horizontal
+ snapMode: ListView.SnapOneItem
}
}
diff --git a/examples/declarative/webview/alerts.qml b/examples/declarative/webview/alerts.qml
index ab2e860..2ba4300 100644
--- a/examples/declarative/webview/alerts.qml
+++ b/examples/declarative/webview/alerts.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
WebView {
@@ -51,7 +51,7 @@ WebView {
color: "white"
font.pixelSize: 20
width: webView.width*0.75
- wrap: true
+ wrapMode: Text.WordWrap
horizontalAlignment: "AlignHCenter"
}
}
diff --git a/examples/declarative/webview/autosize.qml b/examples/declarative/webview/autosize.qml
index 3c00ee6..c4a502e 100644
--- a/examples/declarative/webview/autosize.qml
+++ b/examples/declarative/webview/autosize.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
// The WebView size is determined by the width, height,
diff --git a/examples/declarative/webview/content/FieldText.qml b/examples/declarative/webview/content/FieldText.qml
index 1da9219..d1d003f 100644
--- a/examples/declarative/webview/content/FieldText.qml
+++ b/examples/declarative/webview/content/FieldText.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
id: fieldText
diff --git a/examples/declarative/webview/content/Mapping/Map.qml b/examples/declarative/webview/content/Mapping/Map.qml
index 38c42dd..5d3ba81 100644
--- a/examples/declarative/webview/content/Mapping/Map.qml
+++ b/examples/declarative/webview/content/Mapping/Map.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Item {
diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/webview/content/SpinSquare.qml
index 62c0ce2..ccd68df 100644
--- a/examples/declarative/webview/content/SpinSquare.qml
+++ b/examples/declarative/webview/content/SpinSquare.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Item {
property var period : 250
diff --git a/examples/declarative/webview/googleMaps.qml b/examples/declarative/webview/googleMaps.qml
index a0926f5..4702dea 100644
--- a/examples/declarative/webview/googleMaps.qml
+++ b/examples/declarative/webview/googleMaps.qml
@@ -5,7 +5,7 @@
// API, but users from QML don't need to understand the implementation in
// order to create a Map.
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
import "content/Mapping"
diff --git a/examples/declarative/webview/inline-html.qml b/examples/declarative/webview/inline-html.qml
index 41dfec3..eec7fc6 100644
--- a/examples/declarative/webview/inline-html.qml
+++ b/examples/declarative/webview/inline-html.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
// Inline HTML with loose formatting can be
diff --git a/examples/declarative/webview/newwindows.qml b/examples/declarative/webview/newwindows.qml
index c62aba6..2e4a72e 100644
--- a/examples/declarative/webview/newwindows.qml
+++ b/examples/declarative/webview/newwindows.qml
@@ -3,7 +3,7 @@
// Note that to open windows from JavaScript, you will need to
// allow it on WebView with settings.javascriptCanOpenWindows: true
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
Grid {
diff --git a/examples/declarative/webview/transparent.qml b/examples/declarative/webview/transparent.qml
index 5530819..a0676f4 100644
--- a/examples/declarative/webview/transparent.qml
+++ b/examples/declarative/webview/transparent.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
import org.webkit 1.0
// The WebView background is transparent
diff --git a/examples/declarative/workerscript/workerscript.qml b/examples/declarative/workerscript/workerscript.qml
index 0566f1f..1c7a920 100644
--- a/examples/declarative/workerscript/workerscript.qml
+++ b/examples/declarative/workerscript/workerscript.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 480; height: 320;
diff --git a/examples/declarative/xmldata/daringfireball.qml b/examples/declarative/xmldata/daringfireball.qml
index 456f309..c5732c0 100644
--- a/examples/declarative/xmldata/daringfireball.qml
+++ b/examples/declarative/xmldata/daringfireball.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
color: "white"
@@ -32,7 +32,7 @@ Rectangle {
x: 10
text: content
anchors.top: titleText.bottom
- width: 580; wrap: true
+ width: 580; wrapMode: Text.WordWrap
onLinkActivated: { console.log('link clicked: ' + link) }
}
}
diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml
index f7c269c..e6cb373 100644
--- a/examples/declarative/xmldata/yahoonews.qml
+++ b/examples/declarative/xmldata/yahoonews.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
gradient: Gradient {
@@ -45,7 +45,7 @@ Rectangle {
id: descriptionText
text: description
width: 560
- wrap: true
+ wrapMode: Text.WordWrap
font.family: "Helvetica"
anchors.top: titleText.bottom
anchors.topMargin: 5
diff --git a/examples/declarative/xmlhttprequest/test.qml b/examples/declarative/xmlhttprequest/test.qml
index 15ac54b..ef9d5f3 100644
--- a/examples/declarative/xmlhttprequest/test.qml
+++ b/examples/declarative/xmlhttprequest/test.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 800; height: 600