0.9.3-1 release
[ubi] / qml / ubi / components / BusyIndicator.qml
1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2
3 Image {
4     id: icon
5
6     property bool running: false
7
8     width: 64
9     height: 64
10
11     source: "../images/progress.png"
12     sourceSize.width: width
13     sourceSize.height: height
14
15     Component.onCompleted: {
16         if(running) animation.start();
17     }
18
19     onRunningChanged: {
20         if(running) {
21             animation.start();
22         } else {
23             animation.stop();
24         }
25     }
26
27     NumberAnimation {
28         id: animation
29         target: icon
30         properties: "rotation"
31         from: 0
32         to: 360
33         duration: 500
34         loops: Animation.Infinite
35     }
36 }