tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
       
     1 import Qt 4.7
       
     2 
       
     3 /*
       
     4 This test shows a bouncing logo.
       
     5 When the test starts the logo should be resting at the bottom. It should immediately move
       
     6 to the top, and then fall down to bounce at the bottom. There should be a pause, and then
       
     7 one repeat of the sequence.
       
     8 */
       
     9 
       
    10 Rectangle {
       
    11     id: rect
       
    12     width: 120
       
    13     height: 200
       
    14     color: "white"
       
    15     Image {
       
    16         id: img
       
    17         source: "pics/qtlogo.png"
       
    18         x: 60-width/2
       
    19         y: 200-img.height
       
    20         SequentialAnimation on y {
       
    21             loops: Animation.Infinite
       
    22             NumberAnimation {
       
    23                 to: 0; duration: 500
       
    24                 easing.type: "InOutQuad"
       
    25             }
       
    26             NumberAnimation {
       
    27                 to: 200-img.height
       
    28                 easing.type: "OutBounce"
       
    29                 duration: 2000
       
    30             }
       
    31             PauseAnimation {
       
    32                 duration: 1000
       
    33             }
       
    34         }
       
    35     }
       
    36 }