# Form implementation generated from reading ui file 'identitydialog.ui'
#
# Created by: PyQt6 UI code generator 6.10.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again.  Do not edit this file unless you know what you are doing.


from gitfourchette.localization import *
from gitfourchette.qt import *


class Ui_IdentityDialog(object):
    def setupUi(self, IdentityDialog):
        IdentityDialog.setObjectName("IdentityDialog")
        IdentityDialog.resize(465, 269)
        self.formLayout = QFormLayout(IdentityDialog)
        self.formLayout.setFieldGrowthPolicy(QFormLayout.FieldGrowthPolicy.ExpandingFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.nameLabel = QLabel(parent=IdentityDialog)
        self.nameLabel.setObjectName("nameLabel")
        self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.nameLabel)
        self.nameEdit = QLineEdit(parent=IdentityDialog)
        self.nameEdit.setObjectName("nameEdit")
        self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.nameEdit)
        self.emailLabel = QLabel(parent=IdentityDialog)
        self.emailLabel.setObjectName("emailLabel")
        self.formLayout.setWidget(1, QFormLayout.ItemRole.LabelRole, self.emailLabel)
        self.emailEdit = QLineEdit(parent=IdentityDialog)
        self.emailEdit.setObjectName("emailEdit")
        self.formLayout.setWidget(1, QFormLayout.ItemRole.FieldRole, self.emailEdit)
        self.buttonBox = QDialogButtonBox(parent=IdentityDialog)
        self.buttonBox.setOrientation(Qt.Orientation.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton.Cancel|QDialogButtonBox.StandardButton.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.formLayout.setWidget(7, QFormLayout.ItemRole.SpanningRole, self.buttonBox)
        self.warningLabel = QLabel(parent=IdentityDialog)
        self.warningLabel.setEnabled(False)
        sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.warningLabel.sizePolicy().hasHeightForWidth())
        self.warningLabel.setSizePolicy(sizePolicy)
        self.warningLabel.setWordWrap(True)
        self.warningLabel.setObjectName("warningLabel")
        self.formLayout.setWidget(4, QFormLayout.ItemRole.SpanningRole, self.warningLabel)
        self.configPathLabel = QLabel(parent=IdentityDialog)
        self.configPathLabel.setEnabled(False)
        self.configPathLabel.setObjectName("configPathLabel")
        self.formLayout.setWidget(3, QFormLayout.ItemRole.SpanningRole, self.configPathLabel)
        spacerItem = QSpacerItem(20, 1, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
        self.formLayout.setItem(2, QFormLayout.ItemRole.LabelRole, spacerItem)
        self.nameLabel.setBuddy(self.nameEdit)
        self.emailLabel.setBuddy(self.emailEdit)

        self.retranslateUi(IdentityDialog)
        self.buttonBox.accepted.connect(IdentityDialog.accept)
        self.buttonBox.rejected.connect(IdentityDialog.reject)
        IdentityDialog.setTabOrder(self.nameEdit, self.emailEdit)

    def retranslateUi(self, IdentityDialog):
        IdentityDialog.setWindowTitle(_p("IdentityDialog", "Set up your Git identity"))
        self.nameLabel.setText(_p("IdentityDialog", "&Name:"))
        self.emailLabel.setText(_p("IdentityDialog", "&Email:"))
        self.warningLabel.setText(_p("IdentityDialog", "Note: This will not apply to the current repository, because its configuration file defines a custom identity."))
        self.configPathLabel.setText(_p("IdentityDialog", "This information will be saved in {0}."))
