def onThreadAdded(threadid, threadsrunning, threads): rt = "Threads running: " c = 0 for i in range(len(threadsrunning)): tn = threadmanager.getThread(threadsrunning[i], threads)["tn"] rt += tn if c + 1 < len(threadsrunning) and len(threadsrunning) > 2: rt += ", " if c + 2 == len(threadsrunning): rt += "and " c += 1 QtCore.QMetaObject.invokeMethod(ui.notroot, "setText", QtCore.Qt.QueuedConnection, QtCore.Q_ARG("QString", rt)) if ui.notroot.isHidden(): QtCore.QMetaObject.invokeMethod(ui.notroot, "show", QtCore.Qt.QueuedConnection)
def onThreadAdded(threadid, threadsrunning, threads): rt = "Threads running: " c = 0 for i in range(len(threadsrunning)): tn = threadmanager.getThread(threadsrunning[i], threads)["tn"] rt += tn if c + 1 < len(threadsrunning) and len(threadsrunning) > 2: rt += ", " if c + 2 == len(threadsrunning): rt += "and " c += 1 QtCore.QMetaObject.invokeMethod(ui.notroot, "setText", QtCore.Qt.QueuedConnection, QtCore.Q_ARG("QString", rt)) if ui.notroot.isHidden(): QtCore.QMetaObject.invokeMethod(ui.notroot, "show", QtCore.Qt.QueuedConnection )
def onThreadRemoved(threadid, threadsrunning, threads): tn = threadmanager.getThread(threadid, threads)["tn"] setProgress(tn, 100) onThreadAdded(threadid, threadsrunning, threads)
def onThreadRemoved(threadid, threadsrunning, threads): tn = threadmanager.getThread(threadid, threads)["tn"] setProgress(tn, 100) onThreadAdded(threadid, threadsrunning, threads) page["boxes"][threadid].set(False)