import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 import "components" import "UIConstants.js" as Const Item { id: root property int count: 0 /*Rectangle { anchors.fill: parent color: "red" }*/ height: taskView.height+Const.DEFAULT_MARGIN function addTask(type,filename) { //emptyLabel.visible = Utils.emptyQuee(); //emptyLabel.visible = false; //console.log("1. taskView.childrens.length: "+taskView.children.length); //console.log("1. taskView.height: "+taskView.height); var comp = Qt.createComponent("components/Bar.qml"); //var obj = comp.createObject(taskView,{"width": root.width}); var obj = comp.createObject(taskView); if (obj==null) { console.log("Error creating object"); } else { root.count++; //obj.width = root.width obj.label = filename; obj.cancel.connect(function(file) { Utils.cancelFile(file); }); if(type=="download") obj.isDownload = true; if(type=="upload") obj.isUpload = true; } //console.log("2. taskView.childrens.length: "+taskView.children.length); //console.log("2. taskView.height: "+taskView.height); } function setProgress(filename, progress) { var l = taskView.children.length; for(var i=0;i