1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
3 import "UIConstants.js" as Const
10 height: taskView.height
12 function addTask(type,filename)
14 //emptyLabel.visible = Utils.emptyQuee();
15 //emptyLabel.visible = false;
16 var comp = Qt.createComponent("components/Bar.qml");
17 var obj = comp.createObject(taskView);
19 console.log("Error creating object");
22 obj.width = root.width
25 obj.isDownload = true;
31 function setProgress(filename, progress)
33 var l = taskView.children.length;
34 for(var i=0;i<l;++i) {
35 var item = taskView.children[i];
36 if(item && item.label==filename)
37 item.setProgres(progress);
41 function start(filename)
43 var l = taskView.children.length;
44 for(var i=0;i<l;++i) {
45 var item = taskView.children[i];
46 if(item && item.label==filename)
51 function stop(filename)
53 console.log("stop task");
54 var l = taskView.children.length;
55 for(var i=0;i<l;++i) {
56 var item = taskView.children[i];
57 if(item && item.label==filename) {
58 //console.log("stop task 2");
63 //emptyLabel.visible = Utils.emptyQuee();
69 spacing: Const.DEFAULT_MARGIN
72 font.pixelSize: Const.DEFAULT_FONT_PIXEL_SIZE
73 color: Const.DEFAULT_FOREGROUND_COLOR
74 text: qsTr("No active downloads")
75 visible: taskBar.isEmpty