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