Esempio n. 1
0
 def addRobotPolicyFunc(self, ind: int):
     myDebug(self.__class__.__name__, get_current_function_name())
     register = getRobotPolicyRegister()
     items = register.getNames()
     dialog = QInputDialog(self)
     dialog.setModal(True)
     dialog.setStyleSheet("""
     background-color: rgba(0, 0, 0, 200);
     border:1px solid rgba(0, 200, 200, 150);
     """)
     dialog.setFixedSize(350, 250)
     dialog.setWindowTitle('Set Input Flow for Improcessor')
     dialog.setComboBoxItems(items)
     dialog.textValueSelected.connect(lambda: self._addRobotPolicy(
         ind, register[dialog.findChild(QComboBox).currentIndex()]
     ) if dialog.findChild(QComboBox).currentIndex() >= 0 else None)
     dialog.show()
Esempio n. 2
0
 def addImageFlowFunc(self, ind:int):
     myDebug(self.__class__.__name__, get_current_function_name())
     input_flow_list = self.controller.getInputFlowList()
     items = [item.getName() for item in input_flow_list]
     # print(input_flow_list)
     dialog = QInputDialog(self)
     dialog.setModal(True)
     dialog.setStyleSheet("""
     background-color: rgba(0, 0, 0, 200);
     border:1px solid rgba(0, 200, 200, 150);
     """)
     dialog.setFixedSize(350,250)
     dialog.setWindowTitle('Set Input Flow for Improcessor')
     dialog.setComboBoxItems(items)
     dialog.textValueSelected.connect(lambda x: self._addImageFlow(input_flow_list[dialog.findChild(QComboBox).currentIndex()]) if dialog.findChild(QComboBox).currentIndex() >= 0 else None)
     dialog.show()