1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
3 import "UIConstants.js" as Const
10 height: taskView.height+Const.DEFAULT_MARGIN
12 function addTask(type,filename)
14 var comp = Qt.createComponent("components/Bar.qml");
15 //var obj = comp.createObject(taskView,{"width": root.width});
16 var obj = comp.createObject(taskView);
18 console.log("Error creating object");
21 //obj.width = root.width
23 obj.cancel.connect(function(file) {
24 Utils.cancelFile(file);
27 obj.isDownload = true;
33 function setProgress(filename, progress)
35 var l = taskView.children.length;
36 for(var i=0;i<l;++i) {
37 var item = taskView.children[i];
38 if(item && item.label==filename) {
39 item.setProgres(progress);
45 function start(filename)
47 var l = taskView.children.length;
48 for(var i=0;i<l;++i) {
49 var item = taskView.children[i];
50 if(item && item.label==filename) {
57 function stop(filename)
59 var l = taskView.children.length;
60 for(var i=0;i<l;++i) {
61 var item = taskView.children[i];
62 if(item && item.label==filename) {
63 //console.log("stop task 2");
74 spacing: Const.DEFAULT_MARGIN
77 font.pixelSize: Const.DEFAULT_FONT_PIXEL_SIZE
78 color: Const.DEFAULT_FOREGROUND_COLOR
80 wrapMode: Text.WordWrap
82 qsTr("No active downloads or uploads") :
83 qsTr("Active downloads and uploads")
84 anchors.bottomMargin: 2*Const.DEFAULT_MARGIN
85 visible: root.count==0