def handle(self): connected = [] for t in self.tasks: if t.state == Task.RUNNING: t.done.connect(self.passParam) connected.append(t) elif t.state == Task.DONE or t.state == Task.EXCEPTION: [u.done.disconnect(self.passParam) for u in connected] self.wakeup(t) return else: raise Exception("Unknown %s state %d" % (t, t.state)) # timoeut passed? if self.timeoutMs: self.timerId = QObject.startTimer(self, self.timeoutMs)
def handle( self ): connected = [] for t in self.tasks: if t.state == Task.RUNNING: t.done.connect( self.passParam ) connected.append( t ) elif t.state == Task.DONE or t.state == Task.EXCEPTION: [u.done.disconnect( self.passParam ) for u in connected ] self.wakeup( t ) return else: raise Exception( 'Unknown %s state %d' % (t, t.state) ) # timoeut passed? if self.timeoutMs: self.timerId = QObject.startTimer( self, self.timeoutMs )
def handle(self): # QObject is the QT library class. SytemCall inherits QObject. # QObject.timerEvent will be called after self.ms milliseconds self.timerId = QObject.startTimer(self, self.ms)
def handle( self ): # QObject is the QT library class. SytemCall inherits QObject. # QObject.timerEvent will be called after self.ms milliseconds self.timerId = QObject.startTimer( self, self.ms )