tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    20         x: 92.5; y: 27
    20         x: 92.5; y: 27
    21         source: "content/hour.png"
    21         source: "content/hour.png"
    22         smooth: true
    22         smooth: true
    23         transform: Rotation {
    23         transform: Rotation {
    24             id: hourRotation
    24             id: hourRotation
    25             origin.x: 7.5; origin.y: 73; angle: 0
    25             origin.x: 7.5; origin.y: 73
    26             SpringFollow on angle {
    26             angle: (clock.hours * 30) + (clock.minutes * 0.5)
    27                 spring: 2; damping: 0.2; modulus: 360
    27 
    28                 to: (clock.hours * 30) + (clock.minutes * 0.5)
    28             Behavior on angle {
       
    29                 SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
    29             }
    30             }
    30         }
    31         }
    31     }
    32     }
    32 
    33 
    33     Image {
    34     Image {
    34         x: 93.5; y: 17
    35         x: 93.5; y: 17
    35         source: "content/minute.png"
    36         source: "content/minute.png"
    36         smooth: true
    37         smooth: true
    37         transform: Rotation {
    38         transform: Rotation {
    38             id: minuteRotation
    39             id: minuteRotation
    39             origin.x: 6.5; origin.y: 83; angle: 0
    40             origin.x: 6.5; origin.y: 83
    40             SpringFollow on angle {
    41             angle: clock.minutes * 6
    41                 spring: 2; damping: 0.2; modulus: 360
    42 
    42                 to: clock.minutes * 6
    43             Behavior on angle {
       
    44                 SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
    43             }
    45             }
    44         }
    46         }
    45     }
    47     }
    46 
    48 
    47     Image {
    49     Image {
    48         x: 97.5; y: 20
    50         x: 97.5; y: 20
    49         source: "content/second.png"
    51         source: "content/second.png"
    50         smooth: true
    52         smooth: true
    51         transform: Rotation {
    53         transform: Rotation {
    52             id: secondRotation
    54             id: secondRotation
    53             origin.x: 2.5; origin.y: 80; angle: 0
    55             origin.x: 2.5; origin.y: 80
    54             SpringFollow on angle {
    56             angle: clock.seconds * 6
    55                 spring: 5; damping: 0.25; modulus: 360
    57 
    56                 to: clock.seconds * 6
    58             Behavior on angle {
       
    59                 SpringAnimation { spring: 5; damping: 0.25; modulus: 360 }
    57             }
    60             }
    58         }
    61         }
    59     }
    62     }
    60 
    63 
    61     Image {
    64     Image {