summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/declarative')
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml54
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.pngbin0 -> 278 bytes
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.pngbin0 -> 2691 bytes
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.pngbin0 -> 273 bytes
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.pngbin0 -> 2662 bytes
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.pngbin0 -> 274 bytes
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.pngbin0 -> 2604 bytes
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.pngbin0 -> 2667 bytes
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp1
9 files changed, 55 insertions, 0 deletions
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml
new file mode 100644
index 0000000..8a505da
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml
@@ -0,0 +1,54 @@
+import Qt 4.6
+
+Item { id:block
+ property bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property int targetX: 0
+ property int targetY: 0
+
+ x: Follow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
+ y: Follow { source: targetY; spring: 2; damping: 0.2 }
+
+ Image { id: img
+ source: {
+ if(type == 0){
+ "pics/redStone.png";
+ } else if(type == 1) {
+ "pics/blueStone.png";
+ } else {
+ "pics/greenStone.png";
+ }
+ }
+ opacity: 0
+ opacity: Behavior { NumberAnimation { properties:"opacity"; duration: 200 } }
+ anchors.fill: parent
+ }
+
+ Particles { id: particles
+ width:1; height:1; anchors.centerIn: parent; opacity: 0
+ lifeSpan: 700; lifeSpanDeviation: 600; count:0; streamIn: false
+ angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30
+ source: {
+ if(type == 0){
+ "pics/redStar.png";
+ } else if (type == 1) {
+ "pics/blueStar.png";
+ } else {
+ "pics/greenStar.png";
+ }
+ }
+ }
+
+ states: [
+ State{ name: "AliveState"; when: spawned == true && dying == false
+ SetProperties { target: img; opacity: 1 }
+ },
+ State{ name: "DeathState"; when: dying == true
+ SetProperties { target: particles; count: 50 }
+ SetProperties { target: particles; opacity: 1 }
+ SetProperties { target: particles; emitting: false } // i.e. emit only once
+ SetProperties { target: img; opacity: 0 }
+ }
+ ]
+}
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png
new file mode 100644
index 0000000..ff9588f
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png
new file mode 100644
index 0000000..bf342e0
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png
new file mode 100644
index 0000000..cd06854
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png
new file mode 100644
index 0000000..5ac14a5
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png
new file mode 100644
index 0000000..0a4dffe
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png
new file mode 100644
index 0000000..b099f60
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png
new file mode 100644
index 0000000..c56124a
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp
index 1920bf2..f032004 100644
--- a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp
+++ b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp
@@ -60,6 +60,7 @@ void tst_qmlcomponent::creation_data()
QTest::newRow("MyQmlObject: basic binding") << "myqmlobject_binding.txt";
QTest::newRow("Synthesized properties") << "synthesized_properties.txt";
QTest::newRow("Synthesized properties.2") << "synthesized_properties.2.txt";
+ QTest::newRow("SameGame - BoomBlock") << "samegame/BoomBlock.qml";
}
void tst_qmlcomponent::creation()