Exemple #1
0
    def slotTasksSummaryUpdated(self):
        runningCount = app.adapterManager.runningTaskCount
        ulSpeed = app.adapterManager.ulSpeed
        dlSpeed = app.adapterManager.dlSpeed

        self.dlStatus.setText(
            "<img src=':/image/down.png' height=14 width=14>{}/s".format(
                getHumanBytesNumber(dlSpeed)))
        self.dlStatus.setToolTip("{}任务下载中".format(runningCount))

        self.ulStatus.setText(
            "<img src=':/image/up.png' height=14 width=14>{}/s".format(
                getHumanBytesNumber(ulSpeed))
        )
Exemple #2
0
    def slotTasksSummaryUpdated(self, summary):
        if not summary:
            self.dlStatus.setText(
                "<img src=':/image/down.png' height=14 width=14>获取下载状态失败")
            self.dlStatus.setToolTip("")
            self.ulStatus.setText(
                "<img src=':/image/up.png' height=14 width=14>获取上传状态失败")
            return

        self.dlStatus.setText(
            "<img src=':/image/down.png' height=14 width=14>{}/s".format(
                getHumanBytesNumber(summary["dlSpeed"])))
        self.dlStatus.setToolTip("{}任务下载中".format(summary["dlNum"]))

        self.ulStatus.setText(
            "<img src=':/image/up.png' height=14 width=14>{}/s".format(
                getHumanBytesNumber(summary["upSpeed"])))
Exemple #3
0
    def slotTasksSummaryUpdated(self, summary):
        if not summary:
            self.dlStatus.setText(
                "<img src=':/image/down.png' height=14 width=14>获取下载状态失败"
            )
            self.dlStatus.setToolTip("")
            self.ulStatus.setText(
                "<img src=':/image/up.png' height=14 width=14>获取上传状态失败"
            )
            return

        self.dlStatus.setText(
            "<img src=':/image/down.png' height=14 width=14>{}/s".format(
                getHumanBytesNumber(summary["dlSpeed"])))
        self.dlStatus.setToolTip("{}任务下载中".format(summary["dlNum"]))

        self.ulStatus.setText(
            "<img src=':/image/up.png' height=14 width=14>{}/s".format(
                getHumanBytesNumber(summary["upSpeed"]))
        )