Пример #1
0
    def __init__(self, parent=None):
        super(inputPannel, self).__init__(parent)

        # 화면 구성
        self.ui = Ui_Form()
        self.ui.setupUi(self)
        self.device_handler = None
        self.location = None

        from src.widgets.inputWidget.protocolAssembler.protocolAssembler import protocolAssembler
        self.protocol_assembler = protocolAssembler(
            self.ui.widget_protocolAssembler)

        from src.widgets.inputWidget.protocolMangerWidget.protocolManagerWidget import protocolManager
        self.protocol_manager = protocolManager(
            self.ui.widget_protocol_manager)

        # 클래스간의 통신을 위한 설정
        self.protocol_assembler.set_handler(self.protocol_manager)
        self.protocol_manager.set_handler(self.protocol_assembler)

        # self.protocol_manager.ui.pb_save.connect(
        #     self.protocol_manager.ui.pb_save,
        #     QtCore.SIGNAL("clicked()"),
        #     self.sig_protocol_manager_save
        #     )

        self.send_thread = threadSendData(self.commSignal)
Пример #2
0
    def __init__(self, parent= None):
        super(inputPannel, self).__init__(parent)

        # 화면 구성
        self.ui = Ui_Form()
        self.ui.setupUi(self)
        self.device_handler = None
        self.location = None

        from src.widgets.inputWidget.protocolAssembler.protocolAssembler import protocolAssembler
        self.protocol_assembler = protocolAssembler(self.ui.widget_protocolAssembler)

        from src.widgets.inputWidget.protocolMangerWidget.protocolManagerWidget import protocolManager
        self.protocol_manager = protocolManager(self.ui.widget_protocol_manager)

        # 클래스간의 통신을 위한 설정
        self.protocol_assembler.set_handler(self.protocol_manager)
        self.protocol_manager.set_handler(self.protocol_assembler)

        # self.protocol_manager.ui.pb_save.connect(
        #     self.protocol_manager.ui.pb_save,
        #     QtCore.SIGNAL("clicked()"),
        #     self.sig_protocol_manager_save
        #     )

        self.send_thread = threadSendData(self.commSignal)
Пример #3
0
    def slot_load(self):
        # 프로토콜 파일에서 읽어오기
        self.file_name = unicode(
            QtGui.QFileDialog.getOpenFileName(None, '프로토콜 파일 불러오기', '.prt'))
        if self.file_name == '':
            return

        self.protocol_handler.openFile(self.file_name)
        self.protocol_handler.open()
        self.reflash_item_list()

    def slot_del(self):
        # 프로토콜 삭제
        self.protocol_handler.delProtocol(
            self.ui.cb_protocol_list.currentIndex())
        self.reflash_item_list()

    def slot_show_dial(self):
        pass


# 모듈 단독 실행 코드
if '__main__' == __name__:
    application = QtGui.QApplication(sys.argv)
    from src.widgets.inputWidget.protocolAssembler.protocolAssembler import protocolAssembler
    prt_manager = protocolAssembler()
    test = protocolManager()
    test.set_handler(prt_manager)
    test.show()
    sys.exit(application.exec_())
Пример #4
0
                self.selected_protocol['protocol'][i]['name'], ''
            )


    def slot_load(self):
        # 프로토콜 파일에서 읽어오기
        self.file_name = unicode(QtGui.QFileDialog.getOpenFileName(None, '프로토콜 파일 불러오기', '.prt'))
        if self.file_name == '':
            return

        self.protocol_handler.openFile(self.file_name)
        self.protocol_handler.open()
        self.reflash_item_list()

    def slot_del(self):
        # 프로토콜 삭제
        self.protocol_handler.delProtocol(self.ui.cb_protocol_list.currentIndex())
        self.reflash_item_list()

    def slot_show_dial(self):
        pass

# 모듈 단독 실행 코드
if '__main__' == __name__:
    application = QtGui.QApplication(sys.argv)
    from src.widgets.inputWidget.protocolAssembler.protocolAssembler import protocolAssembler
    prt_manager = protocolAssembler()
    test = protocolManager()
    test.set_handler(prt_manager)
    test.show()
    sys.exit(application.exec_())