From a32cd00668076674b6968b821d4b7377c95ddee9 Mon Sep 17 00:00:00 2001
From: Martin Jones <martin.jones@nokia.com>
Date: Tue, 16 Mar 2010 15:49:27 +1000
Subject: Update more animation on property value source docs.

---
 doc/src/declarative/animation.qdoc             |  9 +++++----
 doc/src/declarative/dynamicobjects.qdoc        | 25 +++++++++++++------------
 src/declarative/util/qdeclarativeanimation.cpp |  2 +-
 3 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 2b75211..7e0a787 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -58,7 +58,8 @@ types listed above. If the property you are animating is a number or color, you
 NumberAnimation or ColorAnimation. These elements don't add any additional functionality,
 but will help enforce type correctness and are slightly more efficient.
 
-A property animation can be specified as a value source. This is especially useful for repeating animations.
+A property animation can be specified as a value source using the \e Animation \bold on \e property syntax. This is especially useful
+for repeating animations.
 
 The following example creates a bouncing effect:
 \qml
@@ -70,7 +71,7 @@ Rectangle {
         source: "qt-logo.png"
         x: 60-img.width/2
         y: 0
-        y: SequentialAnimation {
+        SequentialAnimation on y {
             repeat: true
             NumberAnimation { to: 200-img.height; easing.type: "OutBounce"; duration: 2000 }
             PauseAnimation { duration: 1000 }
@@ -93,7 +94,7 @@ Rectangle {
     Rectangle {
         color: "red"
         width: 50; height: 50
-        x: NumberAnimation { to: 50; }
+        NumberAnimation on x { to: 50; }
     }
 }
 \endqml
@@ -226,7 +227,7 @@ Rectangle {
     id: redRect
     color: "red"
     width: 100; height: 100
-    x: Behavior { NumberAnimation { duration: 300; easing.type: "InOutQuad" } }
+    Behavior on x { NumberAnimation { duration: 300; easing.type: "InOutQuad" } }
 }
 \endqml
 
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index 033c0d1..b2e3f90 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -76,25 +76,25 @@ the component. Example QML script is below. Remember that QML files that might b
     \code
         var component;
         var sprite;
-        function finishCreation(){
-            if(component.isReady()){
+        function finishCreation() {
+            if(component.isReady()) {
                 sprite = component.createObject();
-                if(sprite == 0){
+                if(sprite == 0) {
                     // Error Handling
-                }else{
+                } else {
                     sprite.parent = page;
                     sprite.x = 200;
                     //...
                 }
-            }else if(component.isError()){
+            } else if(component.isError()) {
                 // Error Handling
             }
         }
 
         component = createComponent("Sprite.qml");
-        if(component.isReady()){
+        if(component.isReady()) {
             finishCreation();
-        }else{
+        } else {
             component.statusChanged.connect(finishCreation);
         }
     \endcode
@@ -104,10 +104,10 @@ the component. Example QML script is below. Remember that QML files that might b
     \code
         component = createComponent("Sprite.qml");
         sprite = component.createObject();
-        if(sprite == 0){
+        if(sprite == 0) {
             // Error Handling
             console.log(component.errorsString());
-        }else{
+        } else {
             sprite.parent = page;
             sprite.x = 200;
             //...
@@ -122,7 +122,7 @@ If the QML does not exist until runtime, you can create a QML item from
 a string of QML using the createQmlObject function, as in the following example:
 
     \code
-    newObject = createQmlObject('import Qt 4.6; Rectangle {color: "red"; width: 20; height: 20}',
+    newObject = createQmlObject('import Qt 4.6; Rectangle { color: "red"; width: 20; height: 20 }',
         targetItem, "dynamicSnippet1");
     \endcode
 The first argument is the string of QML to create. Just like in a new file, you will need to
@@ -158,11 +158,12 @@ argument, which is an approximate delay in ms and which defaults to zero. This
 allows you to wait until the completion of an animation or transition. An example:
 
 \code
-    Component{ id:fadesOut
+    Component {
+        id: fadesOut
         Rectangle{
             id: rect
             width: 40; height: 40;
-            opacity: NumberAnimation{from:1; to:0; duration: 1000;}
+            NumberAnimation on opacity { from:1; to:0; duration: 1000 }
             Component.onCompleted: rect.destroy(1000);
         }
     }
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 009e07f..49206b7 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -132,7 +132,7 @@ QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QDeclarativeAbstrac
     using the \c start() and \c stop() methods.
 
     By default, animations are not running. Though, when the animations are assigned to properties,
-    as property value sources, they are set to running by default.
+    as property value sources using the \e on syntax, they are set to running by default.
 */
 bool QDeclarativeAbstractAnimation::isRunning() const
 {
-- 
cgit v0.12