1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2 import "../UIConstants.js" as Const
8 property bool isDownload: false
9 property bool isUpload: false
16 source: isDownload? "../"+Const.ICON_DOWN : (isUpload? "../"+Const.ICON_UP : "")
17 sourceSize.width: width
18 sourceSize.height: height
19 visible: isDownload || isUpload
25 color: Const.TRANSPARENT
28 border.color: Const.DEFAULT_FOREGROUND_COLOR
30 width: icon.visible? root.width-icon.width-5 : root.width
31 x: icon.visible? icon.width+5 : 0
39 color: Const.DEFAULT_FOREGROUND_COLOR
58 anchors.centerIn: parent
59 //color: Const.DEFAULT_FOREGROUND_COLOR
60 text: root.label.length>28 ? root.label.substring(0,25)+"..." : root.label
66 function setProgres(progress) {
67 console.log("proggress = "+progress);
68 if(bar.state!="progress") {
70 bar.state = "progress"
73 bar.width = bbar.width*progress;
79 bar.width=bbar.width/2;
85 //console.log("stop!");
93 if(bar.x+bar.width>=bbar.width)
98 if(bar.state=="right")
100 else if(bar.state=="left")