Ejemplo n.º 1
0
 def removeCommandFromQueue(self, commandId):
     for function in self.queue:
         if commandId == function.getId():
             self.queue.remove(function)
             return True
     current = functionDivider.getFunctionDivider().currentCommandObject
     if current is not None and current.getId() == commandId:
         functionDivider.getFunctionDivider().interuptCurrentCommand()
         return True
     return False
Ejemplo n.º 2
0
 def getAllCommandOutputsInQueue(self):
     output = [command.output() for command in self.queue]
     current = functionDivider.getFunctionDivider().currentCommandObject
     if current is not None:
         output.insert(0, current.output())
     return output
Ejemplo n.º 3
0
 def cancelCurrentCommand(self):
     if functionDivider.getFunctionDivider().interuptCurrentCommand() is not None and len(self.queue) > 0:
         self.queue.pop(0)