# Form implementation generated from reading ui file 'registersubmoduledialog.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_RegisterSubmoduleDialog(object):
    def setupUi(self, RegisterSubmoduleDialog):
        RegisterSubmoduleDialog.setObjectName("RegisterSubmoduleDialog")
        RegisterSubmoduleDialog.setWindowModality(Qt.WindowModality.WindowModal)
        RegisterSubmoduleDialog.resize(444, 221)
        self.formLayout = QFormLayout(RegisterSubmoduleDialog)
        self.formLayout.setFieldGrowthPolicy(QFormLayout.FieldGrowthPolicy.ExpandingFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.pathLabel = QLabel(parent=RegisterSubmoduleDialog)
        self.pathLabel.setObjectName("pathLabel")
        self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.pathLabel)
        self.pathValue = QElidedLabel(parent=RegisterSubmoduleDialog)
        self.pathValue.setEnabled(False)
        sizePolicy = QSizePolicy(QSizePolicy.Policy.MinimumExpanding, QSizePolicy.Policy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pathValue.sizePolicy().hasHeightForWidth())
        self.pathValue.setSizePolicy(sizePolicy)
        self.pathValue.setText("PATH")
        self.pathValue.setObjectName("pathValue")
        self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.pathValue)
        self.nameLabel = QLabel(parent=RegisterSubmoduleDialog)
        self.nameLabel.setObjectName("nameLabel")
        self.formLayout.setWidget(1, QFormLayout.ItemRole.LabelRole, self.nameLabel)
        self.remoteLabel = QLabel(parent=RegisterSubmoduleDialog)
        sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.remoteLabel.sizePolicy().hasHeightForWidth())
        self.remoteLabel.setSizePolicy(sizePolicy)
        self.remoteLabel.setObjectName("remoteLabel")
        self.formLayout.setWidget(2, QFormLayout.ItemRole.LabelRole, self.remoteLabel)
        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.remoteComboBox = QComboBoxWithPreview(parent=RegisterSubmoduleDialog)
        sizePolicy = QSizePolicy(QSizePolicy.Policy.MinimumExpanding, QSizePolicy.Policy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.remoteComboBox.sizePolicy().hasHeightForWidth())
        self.remoteComboBox.setSizePolicy(sizePolicy)
        self.remoteComboBox.setObjectName("remoteComboBox")
        self.horizontalLayout_3.addWidget(self.remoteComboBox)
        self.remoteHint = QHintButton(parent=RegisterSubmoduleDialog)
        self.remoteHint.setObjectName("remoteHint")
        self.horizontalLayout_3.addWidget(self.remoteHint)
        self.formLayout.setLayout(2, QFormLayout.ItemRole.FieldRole, self.horizontalLayout_3)
        spacerItem = QSpacerItem(20, 1, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.MinimumExpanding)
        self.formLayout.setItem(3, QFormLayout.ItemRole.LabelRole, spacerItem)
        self.absorbExplainer = QLabel(parent=RegisterSubmoduleDialog)
        sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.absorbExplainer.sizePolicy().hasHeightForWidth())
        self.absorbExplainer.setSizePolicy(sizePolicy)
        self.absorbExplainer.setWordWrap(True)
        self.absorbExplainer.setObjectName("absorbExplainer")
        self.formLayout.setWidget(4, QFormLayout.ItemRole.SpanningRole, self.absorbExplainer)
        self.buttonBox = QDialogButtonBox(parent=RegisterSubmoduleDialog)
        self.buttonBox.setOrientation(Qt.Orientation.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton.Cancel|QDialogButtonBox.StandardButton.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.formLayout.setWidget(5, QFormLayout.ItemRole.SpanningRole, self.buttonBox)
        self.horizontalLayout_5 = QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.nameEdit = QLineEdit(parent=RegisterSubmoduleDialog)
        self.nameEdit.setObjectName("nameEdit")
        self.horizontalLayout_5.addWidget(self.nameEdit)
        self.nameHint = QHintButton(parent=RegisterSubmoduleDialog)
        self.nameHint.setObjectName("nameHint")
        self.horizontalLayout_5.addWidget(self.nameHint)
        self.formLayout.setLayout(1, QFormLayout.ItemRole.FieldRole, self.horizontalLayout_5)
        self.nameLabel.setBuddy(self.nameEdit)
        self.remoteLabel.setBuddy(self.remoteComboBox)

        self.retranslateUi(RegisterSubmoduleDialog)
        self.buttonBox.accepted.connect(RegisterSubmoduleDialog.accept)
        self.buttonBox.rejected.connect(RegisterSubmoduleDialog.reject)
        RegisterSubmoduleDialog.setTabOrder(self.nameEdit, self.remoteComboBox)
        RegisterSubmoduleDialog.setTabOrder(self.remoteComboBox, self.nameHint)
        RegisterSubmoduleDialog.setTabOrder(self.nameHint, self.remoteHint)

    def retranslateUi(self, RegisterSubmoduleDialog):
        RegisterSubmoduleDialog.setWindowTitle(_p("RegisterSubmoduleDialog", "Register submodule"))
        self.pathLabel.setText(_p("RegisterSubmoduleDialog", "Workdir:"))
        self.nameLabel.setText(_p("RegisterSubmoduleDialog", "&Name:"))
        self.remoteLabel.setText(_p("RegisterSubmoduleDialog", "&Remote:"))
        self.remoteHint.setToolTip(_p("RegisterSubmoduleDialog", "<p>This will be the default remote for this submodule. People who clone your repo will use this remote to download the submodule."))
        self.absorbExplainer.setText(_p("RegisterSubmoduleDialog", "Once absorbed as a submodule, this copy of {sub} cannot be used independently from its superproject, {super}. This cannot be undone!"))
        self.nameHint.setToolTip(_p("RegisterSubmoduleDialog", "<p>This name uniquely identifies your submodule in “.gitmodules”. It can be anything you like, but common practice is to simply name it after the submodule’s workdir."))
from gitfourchette.toolbox.qcomboboxwithpreview import QComboBoxWithPreview
from gitfourchette.toolbox.qelidedlabel import QElidedLabel
from gitfourchette.toolbox.qhintbutton import QHintButton
