from gettext import gettext as _

from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_PageNetwork(object):
    def setupUi(self, PageNetwork):
        PageNetwork.setObjectName("PageNetwork")
        PageNetwork.resize(693, 620)
        PageNetwork.setWindowTitle("")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(PageNetwork)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.frame = QtWidgets.QFrame(parent=PageNetwork)
        self.frame.setMinimumSize(QtCore.QSize(550, 0))
        self.frame.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
        self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
        self.frame.setObjectName("frame")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame)
        self.verticalLayout_2.setSpacing(15)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label = QtWidgets.QLabel(parent=self.frame)
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.verticalLayout_2.addWidget(self.label)
        self.proxyCheckBox = QtWidgets.QGroupBox(parent=self.frame)
        self.proxyCheckBox.setCheckable(True)
        self.proxyCheckBox.setChecked(False)
        self.proxyCheckBox.setObjectName("proxyCheckBox")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.proxyCheckBox)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.formLayout_3 = QtWidgets.QFormLayout()
        self.formLayout_3.setHorizontalSpacing(6)
        self.formLayout_3.setVerticalSpacing(9)
        self.formLayout_3.setObjectName("formLayout_3")
        self.setHostName = QtWidgets.QLineEdit(parent=self.proxyCheckBox)
        self.setHostName.setObjectName("setHostName")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.setHostName)
        self.portLabel = QtWidgets.QLabel(parent=self.proxyCheckBox)
        self.portLabel.setObjectName("portLabel")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.portLabel)
        self.setPort = QtWidgets.QLineEdit(parent=self.proxyCheckBox)
        self.setPort.setObjectName("setPort")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.setPort)
        self.userLabel = QtWidgets.QLabel(parent=self.proxyCheckBox)
        self.userLabel.setObjectName("userLabel")
        self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.ItemRole.LabelRole, self.userLabel)
        self.setUser = QtWidgets.QLineEdit(parent=self.proxyCheckBox)
        self.setUser.setObjectName("setUser")
        self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.ItemRole.FieldRole, self.setUser)
        self.passwordLabel = QtWidgets.QLabel(parent=self.proxyCheckBox)
        self.passwordLabel.setObjectName("passwordLabel")
        self.formLayout_3.setWidget(5, QtWidgets.QFormLayout.ItemRole.LabelRole, self.passwordLabel)
        self.setPassword = QtWidgets.QLineEdit(parent=self.proxyCheckBox)
        self.setPassword.setObjectName("setPassword")
        self.formLayout_3.setWidget(5, QtWidgets.QFormLayout.ItemRole.FieldRole, self.setPassword)
        self.hostNameLabel = QtWidgets.QLabel(parent=self.proxyCheckBox)
        self.hostNameLabel.setObjectName("hostNameLabel")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.hostNameLabel)
        self.label_3 = QtWidgets.QLabel(parent=self.proxyCheckBox)
        self.label_3.setObjectName("label_3")
        self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3)
        self.proxyComboBox = QtWidgets.QComboBox(parent=self.proxyCheckBox)
        self.proxyComboBox.setObjectName("proxyComboBox")
        self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.proxyComboBox)
        self.proxyDescription = QtWidgets.QLabel(parent=self.proxyCheckBox)
        self.proxyDescription.setMinimumSize(QtCore.QSize(0, 0))
        font = QtGui.QFont()
        font.setPointSize(11)
        self.proxyDescription.setFont(font)
        self.proxyDescription.setWordWrap(True)
        self.proxyDescription.setObjectName("proxyDescription")
        self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.proxyDescription)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setContentsMargins(-1, -1, -1, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.btn_ok = QtWidgets.QPushButton(parent=self.proxyCheckBox)
        self.btn_ok.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.PointingHandCursor))
        self.btn_ok.setObjectName("btn_ok")
        self.horizontalLayout_2.addWidget(self.btn_ok)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.btn_restore = QtWidgets.QPushButton(parent=self.proxyCheckBox)
        self.btn_restore.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.PointingHandCursor))
        self.btn_restore.setObjectName("btn_restore")
        self.horizontalLayout_2.addWidget(self.btn_restore)
        self.formLayout_3.setLayout(6, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.horizontalLayout_2)
        self.horizontalLayout_3.addLayout(self.formLayout_3)
        self.verticalLayout_2.addWidget(self.proxyCheckBox)
        self.webrtcShieldCheckBox = QtWidgets.QCheckBox(parent=self.frame)
        self.webrtcShieldCheckBox.setObjectName("webrtcShieldCheckBox")
        self.verticalLayout_2.addWidget(self.webrtcShieldCheckBox)
        self.horizontalLayout.addWidget(self.frame)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.verticalLayout_3.addLayout(self.horizontalLayout)
        spacerItem3 = QtWidgets.QSpacerItem(20, 295, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
        self.verticalLayout_3.addItem(spacerItem3)

        self.retranslateUi(PageNetwork)
        QtCore.QMetaObject.connectSlotsByName(PageNetwork)

    def retranslateUi(self, PageNetwork):
        
        self.label.setText(_("Network"))
        self.proxyCheckBox.setTitle(_("Network proxy"))
        self.portLabel.setText(_("Port"))
        self.userLabel.setText(_("User"))
        self.passwordLabel.setText(_("Password"))
        self.hostNameLabel.setText(_("Hostname"))
        self.label_3.setText(_("ProxyType"))
        self.proxyDescription.setText(_("Description"))
        self.btn_ok.setText(_("Apply"))
        self.btn_restore.setText(_("Restore"))
        self.webrtcShieldCheckBox.setToolTip(_("Prevents websites from discovering your network address using WebRTC."))
        self.webrtcShieldCheckBox.setText(_("Prevent WebRTC IP leak (Mask local IPs)"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    PageNetwork = QtWidgets.QWidget()
    ui = Ui_PageNetwork()
    ui.setupUi(PageNetwork)
    PageNetwork.show()
    sys.exit(app.exec())
