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
13 width: mainWindow.width-3*Const.DEFAULT_MARGIN
15 signal cancel(string file);
18 spacing: Const.DEFAULT_MARGIN
19 anchors.verticalCenter: parent.verticalCenter
23 source: isDownload? "../images/download.png" :
24 isUpload? "../images/upload.png" : ""
25 visible: isDownload || isUpload
26 anchors.verticalCenter: parent.verticalCenter
31 anchors.verticalCenter: parent.verticalCenter
32 color: Const.TRANSPARENT
35 border.color: Const.DEFAULT_FOREGROUND_COLOR
38 root.width-icon.width-button.width-2*Const.DEFAULT_MARGIN :
39 root.width-button.width-1*Const.DEFAULT_MARGIN
40 //x: icon.visible? icon.width+5 : 0
47 color: Const.DEFAULT_FOREGROUND_COLOR
66 anchors.centerIn: parent
67 //color: Const.DEFAULT_FOREGROUND_COLOR
70 elide: Text.ElideRight
71 horizontalAlignment: Text.AlignHCenter
78 anchors.verticalCenter: parent.verticalCenter
79 iconSource: "images/close.png"
80 onButtonClicked: root.cancel(root.label)
84 function setProgres(progress) {
85 //console.log("proggress = "+progress);
86 if(bar.state!="progress") {
88 bar.state = "progress"
91 bar.width = bbar.width*progress;
97 bar.width=bbar.width/2;
103 //console.log("stop!");
111 if(bar.x+bar.width>=bbar.width)
116 if(bar.state=="right")
118 else if(bar.state=="left")