# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'brickv/plugin_system/plugins/master/ui/rs485.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_RS485(object):
    def setupUi(self, RS485):
        RS485.setObjectName("RS485")
        RS485.resize(557, 484)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(RS485)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.scrollArea = QtWidgets.QScrollArea(RS485)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 537, 464))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label_7 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 0, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 5, 0, 1, 1)
        self.label_address = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_address.setObjectName("label_address")
        self.gridLayout.addWidget(self.label_address, 6, 0, 1, 1)
        self.save_button = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        self.save_button.setObjectName("save_button")
        self.gridLayout.addWidget(self.save_button, 12, 0, 1, 2)
        self.line_3 = QtWidgets.QFrame(self.scrollAreaWidgetContents)
        self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.gridLayout.addWidget(self.line_3, 11, 0, 1, 2)
        self.rs485_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.rs485_type.sizePolicy().hasHeightForWidth())
        self.rs485_type.setSizePolicy(sizePolicy)
        self.rs485_type.setObjectName("rs485_type")
        self.rs485_type.addItem("")
        self.rs485_type.addItem("")
        self.gridLayout.addWidget(self.rs485_type, 0, 1, 1, 1)
        self.speed_spinbox = QtWidgets.QSpinBox(self.scrollAreaWidgetContents)
        self.speed_spinbox.setMinimum(9000)
        self.speed_spinbox.setMaximum(2000000)
        self.speed_spinbox.setProperty("value", 2000000)
        self.speed_spinbox.setObjectName("speed_spinbox")
        self.gridLayout.addWidget(self.speed_spinbox, 2, 1, 1, 1)
        self.parity_combobox = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
        self.parity_combobox.setObjectName("parity_combobox")
        self.parity_combobox.addItem("")
        self.parity_combobox.addItem("")
        self.parity_combobox.addItem("")
        self.gridLayout.addWidget(self.parity_combobox, 4, 1, 1, 1)
        self.stopbits_spinbox = QtWidgets.QSpinBox(self.scrollAreaWidgetContents)
        self.stopbits_spinbox.setMinimum(1)
        self.stopbits_spinbox.setMaximum(2)
        self.stopbits_spinbox.setObjectName("stopbits_spinbox")
        self.gridLayout.addWidget(self.stopbits_spinbox, 5, 1, 1, 1)
        self.address_spinbox = QtWidgets.QSpinBox(self.scrollAreaWidgetContents)
        self.address_spinbox.setMinimum(1)
        self.address_spinbox.setMaximum(255)
        self.address_spinbox.setObjectName("address_spinbox")
        self.gridLayout.addWidget(self.address_spinbox, 6, 1, 1, 1)
        self.lineedit_slave_addresses = QtWidgets.QLineEdit(self.scrollAreaWidgetContents)
        self.lineedit_slave_addresses.setObjectName("lineedit_slave_addresses")
        self.gridLayout.addWidget(self.lineedit_slave_addresses, 7, 1, 1, 1)
        self.label_slave_addresses_help = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_slave_addresses_help.sizePolicy().hasHeightForWidth())
        self.label_slave_addresses_help.setSizePolicy(sizePolicy)
        self.label_slave_addresses_help.setWordWrap(True)
        self.label_slave_addresses_help.setObjectName("label_slave_addresses_help")
        self.gridLayout.addWidget(self.label_slave_addresses_help, 8, 1, 1, 1)
        self.label_slave_addresses = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_slave_addresses.setObjectName("label_slave_addresses")
        self.gridLayout.addWidget(self.label_slave_addresses, 7, 0, 1, 1)
        self.label_speed_warning = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_speed_warning.setStyleSheet("color: red;")
        self.label_speed_warning.setWordWrap(True)
        self.label_speed_warning.setObjectName("label_speed_warning")
        self.gridLayout.addWidget(self.label_speed_warning, 3, 1, 1, 1)
        self.label_type_warning = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_type_warning.setStyleSheet("color:red;")
        self.label_type_warning.setWordWrap(True)
        self.label_type_warning.setObjectName("label_type_warning")
        self.gridLayout.addWidget(self.label_type_warning, 1, 1, 1, 1)
        self.label = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 10, 0, 1, 1)
        self.label_crc_errors = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_crc_errors.setObjectName("label_crc_errors")
        self.gridLayout.addWidget(self.label_crc_errors, 10, 1, 1, 1)
        self.line = QtWidgets.QFrame(self.scrollAreaWidgetContents)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.gridLayout.addWidget(self.line, 9, 0, 1, 2)
        self.verticalLayout.addLayout(self.gridLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.verticalLayout_2.addWidget(self.scrollArea)

        self.retranslateUi(RS485)
        QtCore.QMetaObject.connectSlotsByName(RS485)
        RS485.setTabOrder(self.scrollArea, self.rs485_type)
        RS485.setTabOrder(self.rs485_type, self.speed_spinbox)
        RS485.setTabOrder(self.speed_spinbox, self.parity_combobox)
        RS485.setTabOrder(self.parity_combobox, self.stopbits_spinbox)
        RS485.setTabOrder(self.stopbits_spinbox, self.address_spinbox)
        RS485.setTabOrder(self.address_spinbox, self.lineedit_slave_addresses)
        RS485.setTabOrder(self.lineedit_slave_addresses, self.save_button)

    def retranslateUi(self, RS485):
        _translate = QtCore.QCoreApplication.translate
        RS485.setWindowTitle(_translate("RS485", "Form"))
        self.label_7.setText(_translate("RS485", "Type:"))
        self.label_2.setText(_translate("RS485", "Speed (baud):"))
        self.label_3.setText(_translate("RS485", "Parity:"))
        self.label_4.setText(_translate("RS485", "Stop Bits:"))
        self.label_address.setText(_translate("RS485", "Address:"))
        self.save_button.setText(_translate("RS485", "Save RS485 Configuration"))
        self.rs485_type.setItemText(0, _translate("RS485", "Slave"))
        self.rs485_type.setItemText(1, _translate("RS485", "Master"))
        self.parity_combobox.setItemText(0, _translate("RS485", "None"))
        self.parity_combobox.setItemText(1, _translate("RS485", "Even"))
        self.parity_combobox.setItemText(2, _translate("RS485", "Odd"))
        self.label_slave_addresses_help.setText(_translate("RS485", "As comma separated list, e.g. \"5\" (one slave with address 5) or \"1,2,42\" (three slaves with addresses 1, 2 and 42)."))
        self.label_slave_addresses.setText(_translate("RS485", "Slave Addresses:"))
        self.label_speed_warning.setText(_translate("RS485", "Only the following speeds are supported: 500000, 250000, 166666, 125000, 100000, 83333, 71428, 62500, 55555, 50000, 45454 and 41666 baud."))
        self.label_type_warning.setText(_translate("RS485", "Slave type is not yet supported."))
        self.label.setText(_translate("RS485", "CRC Errors:"))
        self.label_crc_errors.setText(_translate("RS485", "?"))
