tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    12             NumberAnimation { from: 700; to: 50; duration: 2000 }
    12             NumberAnimation { from: 700; to: 50; duration: 2000 }
    13         }
    13         }
    14     }
    14     }
    15 
    15 
    16     Rectangle {
    16     Rectangle {
    17         width: 50; height: 20; y: 60; color: "red"
    17         width: 50; height: 20; x: rect.x; y: 60; color: "red"
    18         SmoothedFollow on x { to: rect.x; velocity: 400; enabled: true }
    18         Behavior on x { SmoothedAnimation { velocity: 400 } }
    19     }
    19     }
    20 
    20 
    21     Rectangle {
    21     Rectangle {
    22         width: 50; height: 20; y: 90; color: "yellow"
    22         width: 50; height: 20; x: rect.x; y: 90; color: "yellow"
    23         SmoothedFollow on x { to: rect.x; velocity: 300; reversingMode: SmoothedAnimation.Immediate; enabled: true }
    23         Behavior on x { SmoothedAnimation { velocity: 300; reversingMode: SmoothedAnimation.Immediate } }
    24     }
    24     }
    25 
    25 
    26     Rectangle {
    26     Rectangle {
    27         width: 50; height: 20; y: 120; color: "green"
    27         width: 50; height: 20; x: rect.x; y: 120; color: "green"
    28         SmoothedFollow on x { to: rect.x; reversingMode: SmoothedAnimation.Sync; enabled: true }
    28         Behavior on x { SmoothedAnimation { reversingMode: SmoothedAnimation.Sync } }
    29     }
    29     }
    30 
    30 
    31     Rectangle {
    31     Rectangle {
    32         width: 50; height: 20; y: 150; color: "purple"
    32         width: 50; height: 20; x: rect.x; y: 150; color: "purple"
    33         SmoothedFollow on x { to: rect.x; maximumEasingTime: 200; enabled: true }
    33         Behavior on x { SmoothedAnimation { maximumEasingTime: 200 } }
    34     }
    34     }
    35 
    35 
    36     Rectangle {
    36     Rectangle {
    37         width: 50; height: 20; y: 180; color: "blue"
    37         width: 50; height: 20; x: rect.x; y: 180; color: "blue"
    38         SmoothedFollow on x { to: rect.x; duration: 300; enabled: true }
    38         Behavior on x { SmoothedAnimation { duration: 300 } }
    39     }
    39     }
    40 }
    40 }