Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / examples / declarative / animation / basics / color-animation.qml
index 2609166..a54091d 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the examples of the Qt Toolkit.
 **
 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
 
-import QtQuick 1.0
-import Qt.labs.particles 1.0
+import QtQuick 2.0
+import QtQuick.Particles 2.0
 
 Item {
     id: window
@@ -80,14 +80,25 @@ Item {
             source: "images/moon.png"; y: parent.height - 74; anchors.horizontalCenter: parent.horizontalCenter
             rotation: -parent.rotation
         }
-        Particles {
-            x: 0; y: parent.height/2; width: parent.width; height: parent.height/2
-            source: "images/star.png"; angleDeviation: 360; velocity: 0
-            velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
-            SequentialAnimation on opacity {
-                loops: Animation.Infinite
-                NumberAnimation { from: 0; to: 1; duration: 5000 }
-                NumberAnimation { from: 1; to: 0; duration: 5000 }
+        ParticleSystem {
+            id: particlesystem
+            x: 0; y: parent.height/2
+            width: parent.width; height: parent.height/2
+            ImageParticle {
+                source: "images/star.png"
+                groups: ["star"]
+                color: "#00333333"
+                SequentialAnimation on opacity {
+                    loops: Animation.Infinite
+                    NumberAnimation { from: 0; to: 1; duration: 5000 }
+                    NumberAnimation { from: 1; to: 0; duration: 5000 }
+                }
+            }
+            Emitter {
+                group: "star"
+                anchors.fill: parent
+                emitRate: parent.width / 50
+                lifeSpan: 5000
             }
         }
     }