summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:52:12 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:52:12 (GMT)
commitb88740e48ce82bc118a598358a8d8aff79d2a279 (patch)
tree4274091038e0b375d377acb3f4d5b515e1ab62cb /examples
parent2790cb59f6877c1027c833578b72e168c912758a (diff)
parent172df566d0ff512012afbc5039535e532868a1e5 (diff)
downloadQt-b88740e48ce82bc118a598358a8d8aff79d2a279.zip
Qt-b88740e48ce82bc118a598358a8d8aff79d2a279.tar.gz
Qt-b88740e48ce82bc118a598358a8d8aff79d2a279.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Conflicts: demos/declarative/minehunt/main.cpp demos/declarative/minehunt/minehunt.qml
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/package/Delegate.qml28
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Block.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/pics/background.pngbin313930 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/pics/redStone.pngbin2902 -> 0 bytes
-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/pics/background.pngbin313930 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/pics/redStone.pngbin2902 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Block.qml6
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/background.pngbin313930 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/blueStone.pngbin3054 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/greenStone.pngbin2932 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/redStone.pngbin2902 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml12
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/background.pngbin313930 -> 0 bytes
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/background.jpgbin0 -> 36473 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/blueStar.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.png)bin278 -> 278 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/blueStone.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.png)bin3054 -> 3054 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/greenStar.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.png)bin273 -> 273 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/greenStone.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.png)bin2932 -> 2932 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/redStar.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.png)bin274 -> 274 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/redStone.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.png)bin2902 -> 2902 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/star.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/star.png)bin262 -> 262 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/yellowStone.png (renamed from examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.png)bin3056 -> 3056 bytes
27 files changed, 31 insertions, 27 deletions
diff --git a/examples/declarative/package/Delegate.qml b/examples/declarative/package/Delegate.qml
index 4109633..62198d0 100644
--- a/examples/declarative/package/Delegate.qml
+++ b/examples/declarative/package/Delegate.qml
@@ -2,24 +2,26 @@ import Qt 4.6
//![0]
Package {
- Text { id: listDelegate; width: 200; height: 25; text: "Empty"; Package.name: "list" }
- Text { id: gridDelegate; width: 100; height: 50; text: "Empty"; Package.name: "grid" }
+ Text { id: listDelegate; width: 200; height: 25; text: 'Empty'; Package.name: 'list' }
+ Text { id: gridDelegate; width: 100; height: 50; text: 'Empty'; Package.name: 'grid' }
Rectangle {
id: wrapper
width: 200; height: 25
- color: "lightsteelblue"
+ color: 'lightsteelblue'
+
Text { text: display; anchors.centerIn: parent }
MouseRegion {
anchors.fill: parent
onClicked: {
- if (wrapper.state == "inList")
- wrapper.state = "inGrid";
+ if (wrapper.state == 'inList')
+ wrapper.state = 'inGrid';
else
- wrapper.state = "inList";
+ wrapper.state = 'inList';
}
}
- state: "inList"
+
+ state: 'inList'
states: [
State {
name: 'inList'
@@ -27,15 +29,17 @@ Package {
},
State {
name: 'inGrid'
- ParentChange { target: wrapper; parent: gridDelegate }
- PropertyChanges { target: wrapper; x: 0; y: 0; width: gridDelegate.width; height: gridDelegate.height }
+ ParentChange {
+ target: wrapper; parent: gridDelegate
+ x: 0; y: 0; width: gridDelegate.width; height: gridDelegate.height
+ }
}
]
+
transitions: [
Transition {
- SequentialAnimation {
- ParentAction { target: wrapper }
- NumberAnimation { targets: wrapper; properties: 'x,y,width,height'; duration: 300 }
+ ParentAnimation {
+ NumberAnimation { properties: 'x,y,width,height'; duration: 300 }
}
}
]
diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml
index b76e61a..f133b17 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml
@@ -5,7 +5,7 @@ Item {
id:block
Image { id: img
- source: "pics/redStone.png";
+ source: "../shared/pics/redStone.png";
anchors.fill: parent
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame1/pics/background.png b/examples/declarative/tutorials/samegame/samegame1/pics/background.png
deleted file mode 100644
index 3734a27..0000000
--- a/examples/declarative/tutorials/samegame/samegame1/pics/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame1/pics/redStone.png b/examples/declarative/tutorials/samegame/samegame1/pics/redStone.png
deleted file mode 100644
index 36b09a2..0000000
--- a/examples/declarative/tutorials/samegame/samegame1/pics/redStone.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
index c2d3939..5ed30c9 100644
--- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
@@ -12,7 +12,7 @@ Rectangle {
Image {
id: background
- anchors.fill: parent; source: "pics/background.png"
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml
index 228ac4e..e4b3354 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml
@@ -4,7 +4,7 @@ Item {
id:block
Image { id: img
- source: "pics/redStone.png";
+ source: "../shared/pics/redStone.png";
anchors.fill: parent
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/pics/background.png b/examples/declarative/tutorials/samegame/samegame2/pics/background.png
deleted file mode 100644
index 3734a27..0000000
--- a/examples/declarative/tutorials/samegame/samegame2/pics/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame2/pics/redStone.png b/examples/declarative/tutorials/samegame/samegame2/pics/redStone.png
deleted file mode 100644
index 36b09a2..0000000
--- a/examples/declarative/tutorials/samegame/samegame2/pics/redStone.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
index 8d837da..7e0bc0c 100644
--- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
@@ -14,7 +14,7 @@ Rectangle {
Image {
id: background
- anchors.fill: parent; source: "pics/background.png"
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml
index 30a8d3a..7620104 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml
@@ -8,11 +8,11 @@ Item {
Image { id: img
source: {
if(type == 0){
- "pics/redStone.png";
+ "../shared/pics/redStone.png";
} else if(type == 1) {
- "pics/blueStone.png";
+ "../shared/pics/blueStone.png";
} else {
- "pics/greenStone.png";
+ "../shared/pics/greenStone.png";
}
}
anchors.fill: parent
diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/background.png b/examples/declarative/tutorials/samegame/samegame3/pics/background.png
deleted file mode 100644
index 3734a27..0000000
--- a/examples/declarative/tutorials/samegame/samegame3/pics/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/blueStone.png b/examples/declarative/tutorials/samegame/samegame3/pics/blueStone.png
deleted file mode 100644
index 20e43c7..0000000
--- a/examples/declarative/tutorials/samegame/samegame3/pics/blueStone.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/greenStone.png b/examples/declarative/tutorials/samegame/samegame3/pics/greenStone.png
deleted file mode 100644
index b568a19..0000000
--- a/examples/declarative/tutorials/samegame/samegame3/pics/greenStone.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/redStone.png b/examples/declarative/tutorials/samegame/samegame3/pics/redStone.png
deleted file mode 100644
index 36b09a2..0000000
--- a/examples/declarative/tutorials/samegame/samegame3/pics/redStone.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
index c616397..168bf9b 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
@@ -13,7 +13,7 @@ Rectangle {
Image {
id: background
- anchors.fill: parent; source: "pics/background.png"
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
index 1e3a0ed..9ef455a 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -16,11 +16,11 @@ Item { id:block
Image { id: img
source: {
if(type == 0){
- "pics/redStone.png";
+ "../../shared/pics/redStone.png";
} else if(type == 1) {
- "pics/blueStone.png";
+ "../../shared/pics/blueStone.png";
} else {
- "pics/greenStone.png";
+ "../../shared/pics/greenStone.png";
}
}
opacity: 0
@@ -38,11 +38,11 @@ Item { id:block
velocity: 100; velocityDeviation:30;
source: {
if(type == 0){
- "pics/redStar.png";
+ "../../shared/pics/redStar.png";
} else if (type == 1) {
- "pics/blueStar.png";
+ "../../shared/pics/blueStar.png";
} else {
- "pics/greenStar.png";
+ "../../shared/pics/greenStar.png";
}
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/background.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/background.png
deleted file mode 100644
index 3734a27..0000000
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
index a228e60..c2e8018 100644
--- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
@@ -12,7 +12,7 @@ Rectangle {
Image {
id: background
- anchors.fill: parent; source: "content/pics/background.png"
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
fillMode: Image.PreserveAspectCrop
}
diff --git a/examples/declarative/tutorials/samegame/shared/pics/background.jpg b/examples/declarative/tutorials/samegame/shared/pics/background.jpg
new file mode 100644
index 0000000..903d395
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/background.jpg
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.png b/examples/declarative/tutorials/samegame/shared/pics/blueStar.png
index ff9588f..ff9588f 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/blueStar.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.png b/examples/declarative/tutorials/samegame/shared/pics/blueStone.png
index 20e43c7..20e43c7 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/blueStone.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.png b/examples/declarative/tutorials/samegame/shared/pics/greenStar.png
index cd06854..cd06854 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/greenStar.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.png b/examples/declarative/tutorials/samegame/shared/pics/greenStone.png
index b568a19..b568a19 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/greenStone.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.png b/examples/declarative/tutorials/samegame/shared/pics/redStar.png
index 0a4dffe..0a4dffe 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/redStar.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.png b/examples/declarative/tutorials/samegame/shared/pics/redStone.png
index 36b09a2..36b09a2 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/redStone.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/star.png b/examples/declarative/tutorials/samegame/shared/pics/star.png
index defbde5..defbde5 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/star.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/star.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.png b/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png
index b1ce762..b1ce762 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.png
+++ b/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png
Binary files differ