from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(765, 359)
        self.gridLayout_3 = QtWidgets.QGridLayout(Dialog)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.groupBox_setting = QtWidgets.QGroupBox(Dialog)
        self.groupBox_setting.setObjectName("groupBox_setting")
        self.gridLayout_9 = QtWidgets.QGridLayout(self.groupBox_setting)
        self.gridLayout_9.setObjectName("gridLayout_9")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.groupBox_crlf = QtWidgets.QGroupBox(self.groupBox_setting)
        self.groupBox_crlf.setObjectName("groupBox_crlf")
        self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_crlf)
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.gridLayout_6 = QtWidgets.QGridLayout()
        self.gridLayout_6.setObjectName("gridLayout_6")
        self.label_8 = QtWidgets.QLabel(self.groupBox_crlf)
        self.label_8.setObjectName("label_8")
        self.gridLayout_6.addWidget(self.label_8, 0, 0, 1, 1)
        self.comboBox_TT = QtWidgets.QComboBox(self.groupBox_crlf)
        self.comboBox_TT.setObjectName("comboBox_TT")
        self.comboBox_TT.addItem("")
        self.comboBox_TT.addItem("")
        self.comboBox_TT.addItem("")
        self.comboBox_TT.addItem("")
        self.gridLayout_6.addWidget(self.comboBox_TT, 0, 1, 1, 1)
        self.gridLayout_5.addLayout(self.gridLayout_6, 0, 0, 1, 1)
        self.gridLayout.addWidget(self.groupBox_crlf, 1, 0, 1, 1)
        self.groupBox_2 = QtWidgets.QGroupBox(self.groupBox_setting)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_7 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_7.setObjectName("gridLayout_7")
        self.gridLayout_4 = QtWidgets.QGridLayout()
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(self.groupBox_2)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.comboBox_port = QtWidgets.QComboBox(self.groupBox_2)
        self.comboBox_port.setObjectName("comboBox_port")
        self.horizontalLayout.addWidget(self.comboBox_port)
        self.pushButton_refresh = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButton_refresh.setObjectName("pushButton_refresh")
        self.horizontalLayout.addWidget(self.pushButton_refresh)
        self.gridLayout_4.addLayout(self.horizontalLayout, 0, 0, 1, 1)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.label_5 = QtWidgets.QLabel(self.groupBox_2)
        self.label_5.setObjectName("label_5")
        self.horizontalLayout_4.addWidget(self.label_5)
        self.comboBox_parity = QtWidgets.QComboBox(self.groupBox_2)
        self.comboBox_parity.setObjectName("comboBox_parity")
        self.comboBox_parity.addItem("")
        self.comboBox_parity.addItem("")
        self.comboBox_parity.addItem("")
        self.comboBox_parity.addItem("")
        self.comboBox_parity.addItem("")
        self.horizontalLayout_4.addWidget(self.comboBox_parity)
        self.gridLayout_4.addLayout(self.horizontalLayout_4, 1, 0, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label_3 = QtWidgets.QLabel(self.groupBox_2)
        self.label_3.setObjectName("label_3")
        self.horizontalLayout_2.addWidget(self.label_3)
        self.comboBox_byteSize = QtWidgets.QComboBox(self.groupBox_2)
        self.comboBox_byteSize.setObjectName("comboBox_byteSize")
        self.comboBox_byteSize.addItem("")
        self.comboBox_byteSize.addItem("")
        self.comboBox_byteSize.addItem("")
        self.comboBox_byteSize.addItem("")
        self.horizontalLayout_2.addWidget(self.comboBox_byteSize)
        self.gridLayout_4.addLayout(self.horizontalLayout_2, 2, 0, 1, 1)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label_4 = QtWidgets.QLabel(self.groupBox_2)
        self.label_4.setObjectName("label_4")
        self.horizontalLayout_3.addWidget(self.label_4)
        self.comboBox_stopBits = QtWidgets.QComboBox(self.groupBox_2)
        self.comboBox_stopBits.setObjectName("comboBox_stopBits")
        self.comboBox_stopBits.addItem("")
        self.comboBox_stopBits.addItem("")
        self.horizontalLayout_3.addWidget(self.comboBox_stopBits)
        self.gridLayout_4.addLayout(self.horizontalLayout_3, 3, 0, 1, 1)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.label_2 = QtWidgets.QLabel(self.groupBox_2)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_5.addWidget(self.label_2)
        self.comboBox_baudRate = QtWidgets.QComboBox(self.groupBox_2)
        self.comboBox_baudRate.setObjectName("comboBox_baudRate")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.comboBox_baudRate.addItem("")
        self.horizontalLayout_5.addWidget(self.comboBox_baudRate)
        self.gridLayout_4.addLayout(self.horizontalLayout_5, 4, 0, 1, 1)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.label_6 = QtWidgets.QLabel(self.groupBox_2)
        self.label_6.setObjectName("label_6")
        self.horizontalLayout_6.addWidget(self.label_6)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem)
        self.lineEdit_timeout = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_timeout.setObjectName("lineEdit_timeout")
        self.horizontalLayout_6.addWidget(self.lineEdit_timeout)
        self.label_7 = QtWidgets.QLabel(self.groupBox_2)
        self.label_7.setObjectName("label_7")
        self.horizontalLayout_6.addWidget(self.label_7)
        self.horizontalLayout_6.setStretch(0, 1)
        self.horizontalLayout_6.setStretch(2, 1)
        self.gridLayout_4.addLayout(self.horizontalLayout_6, 5, 0, 1, 1)
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.pushButton_set = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButton_set.setObjectName("pushButton_set")
        self.horizontalLayout_7.addWidget(self.pushButton_set)
        self.pushButton_close = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButton_close.setObjectName("pushButton_close")
        self.horizontalLayout_7.addWidget(self.pushButton_close)
        self.gridLayout_4.addLayout(self.horizontalLayout_7, 6, 0, 1, 1)
        self.gridLayout_7.addLayout(self.gridLayout_4, 0, 0, 1, 1)
        self.gridLayout.addWidget(self.groupBox_2, 0, 0, 1, 1)
        self.gridLayout.setRowStretch(0, 4)
        self.gridLayout.setRowStretch(1, 1)
        self.gridLayout_9.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.gridLayout_2.addWidget(self.groupBox_setting, 0, 0, 1, 1)
        self.groupBox_command = QtWidgets.QGroupBox(Dialog)
        self.groupBox_command.setObjectName("groupBox_command")
        self.gridLayout_8 = QtWidgets.QGridLayout(self.groupBox_command)
        self.gridLayout_8.setObjectName("gridLayout_8")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.lineEdit_command = QtWidgets.QLineEdit(self.groupBox_command)
        self.lineEdit_command.setObjectName("lineEdit_command")
        self.horizontalLayout_8.addWidget(self.lineEdit_command)
        self.pushButton_send = QtWidgets.QPushButton(self.groupBox_command)
        self.pushButton_send.setObjectName("pushButton_send")
        self.horizontalLayout_8.addWidget(self.pushButton_send)
        self.verticalLayout_2.addLayout(self.horizontalLayout_8)
        self.plainTextEdit = QtWidgets.QPlainTextEdit(self.groupBox_command)
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.verticalLayout_2.addWidget(self.plainTextEdit)
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
        self.pushButton_clear = QtWidgets.QPushButton(self.groupBox_command)
        self.pushButton_clear.setObjectName("pushButton_clear")
        self.horizontalLayout_9.addWidget(self.pushButton_clear)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_9.addItem(spacerItem1)
        self.pushButton_export = QtWidgets.QPushButton(self.groupBox_command)
        self.pushButton_export.setObjectName("pushButton_export")
        self.horizontalLayout_9.addWidget(self.pushButton_export)
        self.verticalLayout_2.addLayout(self.horizontalLayout_9)
        self.gridLayout_8.addLayout(self.verticalLayout_2, 0, 0, 1, 1)
        self.gridLayout_2.addWidget(self.groupBox_command, 0, 1, 1, 1)
        self.gridLayout_2.setColumnStretch(0, 3)
        self.gridLayout_2.setColumnStretch(1, 5)
        self.gridLayout_3.addLayout(self.gridLayout_2, 0, 0, 1, 1)

        self.retranslateUi(Dialog)
        self.comboBox_baudRate.setCurrentIndex(3)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Pigeon v1.0.0 (by Sub\'s)"))
        self.groupBox_setting.setTitle(_translate("Dialog", "SETTING"))
        self.groupBox_crlf.setTitle(_translate("Dialog", "CR-LF Setting"))
        self.label_8.setText(_translate("Dialog", "Transmitting Text"))
        self.comboBox_TT.setItemText(0, _translate("Dialog", "N/A"))
        self.comboBox_TT.setItemText(1, _translate("Dialog", "CR"))
        self.comboBox_TT.setItemText(2, _translate("Dialog", "LF"))
        self.comboBox_TT.setItemText(3, _translate("Dialog", "CR/LF"))
        self.groupBox_2.setTitle(_translate("Dialog", "Port Setting"))
        self.label.setText(_translate("Dialog", "COM port :"))
        self.pushButton_refresh.setText(_translate("Dialog", "Refresh"))
        self.label_5.setText(_translate("Dialog", "Parity :"))
        self.comboBox_parity.setItemText(0, _translate("Dialog", "None"))
        self.comboBox_parity.setItemText(1, _translate("Dialog", "Even"))
        self.comboBox_parity.setItemText(2, _translate("Dialog", "Odd"))
        self.comboBox_parity.setItemText(3, _translate("Dialog", "Mark"))
        self.comboBox_parity.setItemText(4, _translate("Dialog", "Space"))
        self.label_3.setText(_translate("Dialog", "Byte Size :"))
        self.comboBox_byteSize.setItemText(0, _translate("Dialog", "8"))
        self.comboBox_byteSize.setItemText(1, _translate("Dialog", "7"))
        self.comboBox_byteSize.setItemText(2, _translate("Dialog", "6"))
        self.comboBox_byteSize.setItemText(3, _translate("Dialog", "5"))
        self.label_4.setText(_translate("Dialog", "Stop Bits :"))
        self.comboBox_stopBits.setItemText(0, _translate("Dialog", "1"))
        self.comboBox_stopBits.setItemText(1, _translate("Dialog", "2"))
        self.label_2.setText(_translate("Dialog", "Baud Rate :"))
        self.comboBox_baudRate.setCurrentText(_translate("Dialog", "9600"))
        self.comboBox_baudRate.setItemText(0, _translate("Dialog", "1200"))
        self.comboBox_baudRate.setItemText(1, _translate("Dialog", "2400"))
        self.comboBox_baudRate.setItemText(2, _translate("Dialog", "4800"))
        self.comboBox_baudRate.setItemText(3, _translate("Dialog", "9600"))
        self.comboBox_baudRate.setItemText(4, _translate("Dialog", "14400"))
        self.comboBox_baudRate.setItemText(5, _translate("Dialog", "19200"))
        self.comboBox_baudRate.setItemText(6, _translate("Dialog", "28800"))
        self.comboBox_baudRate.setItemText(7, _translate("Dialog", "38400"))
        self.comboBox_baudRate.setItemText(8, _translate("Dialog", "57600"))
        self.comboBox_baudRate.setItemText(9, _translate("Dialog", "115200"))
        self.comboBox_baudRate.setItemText(10, _translate("Dialog", "230400"))
        self.label_6.setText(_translate("Dialog", "Timeout :"))
        self.lineEdit_timeout.setText(_translate("Dialog", "0"))
        self.label_7.setText(_translate("Dialog", "s"))
        self.pushButton_set.setText(_translate("Dialog", "Initiate"))
        self.pushButton_close.setText(_translate("Dialog", "Close"))
        self.groupBox_command.setTitle(_translate("Dialog", "COMMAND"))
        self.pushButton_send.setText(_translate("Dialog", "Send"))
        self.pushButton_clear.setText(_translate("Dialog", "Clear"))
        self.pushButton_export.setText(_translate("Dialog", "Export"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Dialog = QtWidgets.QDialog()
    ui = Ui_Dialog()
    ui.setupUi(Dialog)
    Dialog.show()
    sys.exit(app.exec_())

