Declarative examples: fixed particles/imageparticle example
authorChristiaan Janssen <christiaan.janssen@digia.com>
Fri, 23 Nov 2012 16:17:45 +0000 (17:17 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 23 Nov 2012 17:45:51 +0000 (18:45 +0100)
Change-Id: Idec210a23e85f1460652f938c72aea7b5a2a2458
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
examples/particles/imageparticle/content/sharing.qml
examples/particles/imageparticle/imageparticle.qml

index cbf62a2..433ffe9 100644 (file)
@@ -66,6 +66,7 @@ Rectangle {
                 Text {color: "white"; text: 'Type: ' + type; font.pixelSize: 14 }
                 Text {color: "white"; text: 'Age: ' + age; font.pixelSize: 14 }
             }
+            MouseArea { anchors.fill: parent; onClicked: listView.currentIndex = index; }
             // indent the item if it is the current item
             states: State {
                 name: "Current"
@@ -120,13 +121,14 @@ Rectangle {
         Emitter {
             system: particles
             anchors.fill: parent
-            emitRate: 1
+            emitRate: 0
             lifeSpan: 10000
             size: 24
             sizeVariation: 8
             velocity: AngleDirection { angleVariation: 360; magnitude: 3 }
             maximumEmitted: 10
             startTime: 5000
+            Timer { running: true; interval: 10; onTriggered: parent.emitRate = 1; }
         }
 
         //! [0]
index a5e71a3..5f7ca38 100644 (file)
@@ -54,7 +54,7 @@ Item {
             addExample("Deformation", "Deformed particles",  Qt.resolvedUrl("content/deformation.qml"));
             addExample("Rotation", "Rotated particles",  Qt.resolvedUrl("content/rotation.qml"));
             addExample("Sharing", "Multiple ImageParticles on the same particles",  Qt.resolvedUrl("content/sharing.qml"));
-            addExample("Sprites", "Partiles rendered with sprites",  Qt.resolvedUrl("content/sprites.qml"));
+            addExample("Sprites", "Particles rendered with sprites",  Qt.resolvedUrl("content/sprites.qml"));
         }
     }
 }