summaryrefslogtreecommitdiffstats
path: root/basicsuite/Qt5 Cinematic Demo/content/Background.qml
diff options
context:
space:
mode:
authoraavit <eirik.aavitsland@digia.com>2013-03-06 15:00:27 +0100
committeraavit <eirik.aavitsland@digia.com>2013-03-06 15:00:27 +0100
commit2e6e329dcda94df2976c469ef81f810132ec3f8f (patch)
treeac5ee5dfddd238e4130a6c1e173284a2d28821bd /basicsuite/Qt5 Cinematic Demo/content/Background.qml
Added the suite used at Embedded World 2013. See basicsuite/README.
Feel free to add & improve!
Diffstat (limited to 'basicsuite/Qt5 Cinematic Demo/content/Background.qml')
-rw-r--r--basicsuite/Qt5 Cinematic Demo/content/Background.qml40
1 files changed, 40 insertions, 0 deletions
diff --git a/basicsuite/Qt5 Cinematic Demo/content/Background.qml b/basicsuite/Qt5 Cinematic Demo/content/Background.qml
new file mode 100644
index 0000000..8124d01
--- /dev/null
+++ b/basicsuite/Qt5 Cinematic Demo/content/Background.qml
@@ -0,0 +1,40 @@
+import QtQuick 2.0
+import QtQuick.Particles 2.0
+
+Rectangle {
+ id: root
+
+ anchors.fill: parent
+ color: "#ffffff"
+
+ Image {
+ id: backgroundImage
+ anchors.fill: parent
+ source: settings.showColors ? "images/background3.png" : "images/background.png"
+ Behavior on source {
+ SequentialAnimation {
+ NumberAnimation { target: backgroundImage; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InQuad }
+ PropertyAction { target: backgroundImage; property: "source" }
+ NumberAnimation { target: backgroundImage; property: "opacity"; to: 1; duration: 400; easing.type: Easing.OutQuad }
+ }
+ }
+ }
+
+ // Sky stars particles
+ ParticleSystem {
+ width: parent.width
+ height: 220
+ paused: detailsView.isShown || infoView.isShown || !settings.showShootingStarParticles
+ ImageParticle {
+ source: "images/star.png"
+ rotationVariation: 10
+ }
+ Emitter {
+ anchors.fill: parent
+ emitRate: 4
+ lifeSpan: 5000
+ size: 48
+ sizeVariation: 16
+ }
+ }
+}