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

# Form implementation generated from reading ui file 'mqttmanager.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# 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_diag_mqtt(object):
    def setupUi(self, diag_mqtt):
        diag_mqtt.setObjectName("diag_mqtt")
        diag_mqtt.resize(489, 709)
        self.verticalLayout = QtWidgets.QVBoxLayout(diag_mqtt)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gb_basetopic = QtWidgets.QGroupBox(diag_mqtt)
        self.gb_basetopic.setObjectName("gb_basetopic")
        self.gridLayout = QtWidgets.QGridLayout(self.gb_basetopic)
        self.gridLayout.setObjectName("gridLayout")
        self.lbl_basetopic_description = QtWidgets.QLabel(self.gb_basetopic)
        self.lbl_basetopic_description.setMaximumSize(QtCore.QSize(450, 16777215))
        self.lbl_basetopic_description.setWordWrap(True)
        self.lbl_basetopic_description.setObjectName("lbl_basetopic_description")
        self.gridLayout.addWidget(self.lbl_basetopic_description, 1, 0, 1, 4)
        self.lbl_basetopic = QtWidgets.QLabel(self.gb_basetopic)
        self.lbl_basetopic.setObjectName("lbl_basetopic")
        self.gridLayout.addWidget(self.lbl_basetopic, 0, 0, 1, 1)
        self.txt_basetopic = QtWidgets.QLineEdit(self.gb_basetopic)
        self.txt_basetopic.setObjectName("txt_basetopic")
        self.gridLayout.addWidget(self.txt_basetopic, 0, 1, 1, 1)
        self.verticalLayout.addWidget(self.gb_basetopic)
        self.gb_send_on_event = QtWidgets.QGroupBox(diag_mqtt)
        self.gb_send_on_event.setObjectName("gb_send_on_event")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.gb_send_on_event)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.lbl_sendinterval = QtWidgets.QLabel(self.gb_send_on_event)
        self.lbl_sendinterval.setObjectName("lbl_sendinterval")
        self.gridLayout_2.addWidget(self.lbl_sendinterval, 0, 0, 1, 1)
        self.sbx_sendinterval = QtWidgets.QSpinBox(self.gb_send_on_event)
        self.sbx_sendinterval.setMinimum(1)
        self.sbx_sendinterval.setMaximum(21600)
        self.sbx_sendinterval.setObjectName("sbx_sendinterval")
        self.gridLayout_2.addWidget(self.sbx_sendinterval, 0, 1, 1, 1)
        self.lbl_topic_io = QtWidgets.QLabel(self.gb_send_on_event)
        self.lbl_topic_io.setObjectName("lbl_topic_io")
        self.gridLayout_2.addWidget(self.lbl_topic_io, 1, 0, 1, 2)
        self.cbx_send_on_event = QtWidgets.QCheckBox(self.gb_send_on_event)
        self.cbx_send_on_event.setObjectName("cbx_send_on_event")
        self.gridLayout_2.addWidget(self.cbx_send_on_event, 2, 0, 1, 2)
        self.lbl_topic_event = QtWidgets.QLabel(self.gb_send_on_event)
        self.lbl_topic_event.setObjectName("lbl_topic_event")
        self.gridLayout_2.addWidget(self.lbl_topic_event, 3, 0, 1, 2)
        self.verticalLayout.addWidget(self.gb_send_on_event)
        self.gb_write_outputs = QtWidgets.QGroupBox(diag_mqtt)
        self.gb_write_outputs.setObjectName("gb_write_outputs")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.gb_write_outputs)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.lbl_write_outputs = QtWidgets.QLabel(self.gb_write_outputs)
        self.lbl_write_outputs.setMaximumSize(QtCore.QSize(450, 16777215))
        self.lbl_write_outputs.setWordWrap(True)
        self.lbl_write_outputs.setObjectName("lbl_write_outputs")
        self.gridLayout_3.addWidget(self.lbl_write_outputs, 1, 0, 1, 1)
        self.cbx_write_outputs = QtWidgets.QCheckBox(self.gb_write_outputs)
        self.cbx_write_outputs.setObjectName("cbx_write_outputs")
        self.gridLayout_3.addWidget(self.cbx_write_outputs, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.gb_write_outputs)
        self.gb_broker = QtWidgets.QGroupBox(diag_mqtt)
        self.gb_broker.setObjectName("gb_broker")
        self.formLayout = QtWidgets.QFormLayout(self.gb_broker)
        self.formLayout.setObjectName("formLayout")
        self.lbl_broker_address = QtWidgets.QLabel(self.gb_broker)
        self.lbl_broker_address.setObjectName("lbl_broker_address")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.lbl_broker_address)
        self.txt_broker_address = QtWidgets.QLineEdit(self.gb_broker)
        self.txt_broker_address.setObjectName("txt_broker_address")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.txt_broker_address)
        self.lbl_port = QtWidgets.QLabel(self.gb_broker)
        self.lbl_port.setObjectName("lbl_port")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.lbl_port)
        self.lbl_username = QtWidgets.QLabel(self.gb_broker)
        self.lbl_username.setObjectName("lbl_username")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.lbl_username)
        self.lbl_password = QtWidgets.QLabel(self.gb_broker)
        self.lbl_password.setObjectName("lbl_password")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.lbl_password)
        self.lbl_client_id = QtWidgets.QLabel(self.gb_broker)
        self.lbl_client_id.setObjectName("lbl_client_id")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.lbl_client_id)
        self.txt_username = QtWidgets.QLineEdit(self.gb_broker)
        self.txt_username.setObjectName("txt_username")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.txt_username)
        self.txt_password = QtWidgets.QLineEdit(self.gb_broker)
        self.txt_password.setObjectName("txt_password")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.txt_password)
        self.txt_client_id = QtWidgets.QLineEdit(self.gb_broker)
        self.txt_client_id.setObjectName("txt_client_id")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.txt_client_id)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.sbx_port = QtWidgets.QSpinBox(self.gb_broker)
        self.sbx_port.setMinimum(1)
        self.sbx_port.setMaximum(65535)
        self.sbx_port.setObjectName("sbx_port")
        self.horizontalLayout.addWidget(self.sbx_port)
        self.cbx_tls_set = QtWidgets.QCheckBox(self.gb_broker)
        self.cbx_tls_set.setObjectName("cbx_tls_set")
        self.horizontalLayout.addWidget(self.cbx_tls_set)
        self.formLayout.setLayout(1, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout)
        self.verticalLayout.addWidget(self.gb_broker)
        self.btn_box = QtWidgets.QDialogButtonBox(diag_mqtt)
        self.btn_box.setOrientation(QtCore.Qt.Horizontal)
        self.btn_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.btn_box.setObjectName("btn_box")
        self.verticalLayout.addWidget(self.btn_box)

        self.retranslateUi(diag_mqtt)
        self.btn_box.accepted.connect(diag_mqtt.accept) # type: ignore
        self.btn_box.rejected.connect(diag_mqtt.reject) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(diag_mqtt)

    def retranslateUi(self, diag_mqtt):
        _translate = QtCore.QCoreApplication.translate
        diag_mqtt.setWindowTitle(_translate("diag_mqtt", "MQTT settings"))
        self.gb_basetopic.setTitle(_translate("diag_mqtt", "Base topic"))
        self.lbl_basetopic_description.setText(_translate("diag_mqtt", "The base topic is the first part of any mqtt topic, the Revolution Pi will publish. You can use any character includig \'/\' to structure the messages on your broker.\n"
"\n"
"For example: revpi0000/data"))
        self.lbl_basetopic.setText(_translate("diag_mqtt", "Base topic:"))
        self.gb_send_on_event.setTitle(_translate("diag_mqtt", "Publish settings"))
        self.lbl_sendinterval.setText(_translate("diag_mqtt", "Publish all exported values every n seconds:"))
        self.lbl_topic_io.setText(_translate("diag_mqtt", "Topic:    [basetopic]/io/[ioname]"))
        self.cbx_send_on_event.setText(_translate("diag_mqtt", "Send exported values immediately on value change"))
        self.lbl_topic_event.setText(_translate("diag_mqtt", "Topic:    [basetopic]/event/[ioname]"))
        self.gb_write_outputs.setTitle(_translate("diag_mqtt", "Set outputs"))
        self.lbl_write_outputs.setText(_translate("diag_mqtt", "The Revolution Pi will subscribe a topic on which your mqtt client can publish messages with the new io value as payload.\n"
"\n"
"Publish values with topic:    [basetopic]/set/[outputname]"))
        self.cbx_write_outputs.setText(_translate("diag_mqtt", "Allow MQTT to to set outputs on Revolution Pi"))
        self.gb_broker.setTitle(_translate("diag_mqtt", "Broker settings"))
        self.lbl_broker_address.setText(_translate("diag_mqtt", "Broker address:"))
        self.lbl_port.setText(_translate("diag_mqtt", "Broker port:"))
        self.lbl_username.setText(_translate("diag_mqtt", "User name:"))
        self.lbl_password.setText(_translate("diag_mqtt", "Password:"))
        self.lbl_client_id.setText(_translate("diag_mqtt", "Client ID:"))
        self.cbx_tls_set.setText(_translate("diag_mqtt", "Use TLS"))


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