X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2Fubi%2Fcomponents%2FBusyIndicator.qml;fp=qml%2Fubi%2Fcomponents%2FBusyIndicator.qml;h=27a2a7d0159a89c7f2d6fb91abb591b165e070b7;hb=4b7d3c9a2ffcba5ec4f6479dccb09d6b16988773;hp=0000000000000000000000000000000000000000;hpb=7f0e071fbec9953213b41b6298a419c921850fa8;p=ubi diff --git a/qml/ubi/components/BusyIndicator.qml b/qml/ubi/components/BusyIndicator.qml new file mode 100644 index 0000000..27a2a7d --- /dev/null +++ b/qml/ubi/components/BusyIndicator.qml @@ -0,0 +1,37 @@ +import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 +//import "../UIConstants.js" as Const + +Image { + id: icon + + property bool running: false + + width: 64 + height: 64 + + source: "../images/progress.png" + sourceSize.width: width + sourceSize.height: height + + Component.onCompleted: { + if(running) animation.start(); + } + + onRunningChanged: { + if(running) { + animation.start(); + } else { + animation.stop(); + } + } + + NumberAnimation { + id: animation + target: icon + properties: "rotation" + from: 0 + to: 360 + duration: 500 + loops: Animation.Infinite + } +}