# Form implementation generated from reading ui file 'remotedialog.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_RemoteDialog(object):
    def setupUi(self, RemoteDialog):
        RemoteDialog.setObjectName("RemoteDialog")
        RemoteDialog.setEnabled(True)
        RemoteDialog.resize(500, 178)
        RemoteDialog.setModal(True)
        self.formLayout = QFormLayout(RemoteDialog)
        self.formLayout.setFieldGrowthPolicy(QFormLayout.FieldGrowthPolicy.ExpandingFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.urlLabel = QLabel(parent=RemoteDialog)
        self.urlLabel.setObjectName("urlLabel")
        self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.urlLabel)
        self.urlLayout = QHBoxLayout()
        self.urlLayout.setObjectName("urlLayout")
        self.urlEdit = QLineEdit(parent=RemoteDialog)
        self.urlEdit.setObjectName("urlEdit")
        self.urlLayout.addWidget(self.urlEdit)
        self.protocolButton = ProtocolButton(parent=RemoteDialog)
        self.protocolButton.setText("https")
        self.protocolButton.setObjectName("protocolButton")
        self.urlLayout.addWidget(self.protocolButton)
        self.formLayout.setLayout(0, QFormLayout.ItemRole.FieldRole, self.urlLayout)
        self.nameLabel = QLabel(parent=RemoteDialog)
        self.nameLabel.setObjectName("nameLabel")
        self.formLayout.setWidget(1, QFormLayout.ItemRole.LabelRole, self.nameLabel)
        self.nameEdit = QLineEdit(parent=RemoteDialog)
        self.nameEdit.setObjectName("nameEdit")
        self.formLayout.setWidget(1, QFormLayout.ItemRole.FieldRole, self.nameEdit)
        self.skipFetchAllCheckBox = QCheckBox(parent=RemoteDialog)
        self.skipFetchAllCheckBox.setObjectName("skipFetchAllCheckBox")
        self.formLayout.setWidget(2, QFormLayout.ItemRole.SpanningRole, self.skipFetchAllCheckBox)
        spacerItem = QSpacerItem(20, 8, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
        self.formLayout.setItem(3, QFormLayout.ItemRole.LabelRole, spacerItem)
        self.fetchAfterAddCheckBox = QCheckBox(parent=RemoteDialog)
        self.fetchAfterAddCheckBox.setChecked(True)
        self.fetchAfterAddCheckBox.setObjectName("fetchAfterAddCheckBox")
        self.formLayout.setWidget(4, QFormLayout.ItemRole.SpanningRole, self.fetchAfterAddCheckBox)
        self.buttonBox = QDialogButtonBox(parent=RemoteDialog)
        self.buttonBox.setOrientation(Qt.Orientation.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton.Cancel|QDialogButtonBox.StandardButton.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName("buttonBox")
        self.formLayout.setWidget(5, QFormLayout.ItemRole.SpanningRole, self.buttonBox)
        self.urlLabel.setBuddy(self.urlEdit)
        self.nameLabel.setBuddy(self.nameEdit)

        self.retranslateUi(RemoteDialog)
        self.buttonBox.accepted.connect(RemoteDialog.accept) # type: ignore
        self.buttonBox.rejected.connect(RemoteDialog.reject) # type: ignore
        RemoteDialog.setTabOrder(self.urlEdit, self.protocolButton)
        RemoteDialog.setTabOrder(self.protocolButton, self.nameEdit)
        RemoteDialog.setTabOrder(self.nameEdit, self.fetchAfterAddCheckBox)

    def retranslateUi(self, RemoteDialog):
        RemoteDialog.setWindowTitle(_p("RemoteDialog", "Edit remote"))
        self.urlLabel.setText(_p("RemoteDialog", "&URL:"))
        self.nameLabel.setText(_p("RemoteDialog", "&Name:"))
        self.skipFetchAllCheckBox.setToolTip(_p("RemoteDialog", "Tick this box to skip this remote during {cmd}. You can still fetch this remote explicitly, but it won’t be automatically fetched along with the others."))
        self.skipFetchAllCheckBox.setText(_p("RemoteDialog", "Skip when fetching &all remotes"))
        self.fetchAfterAddCheckBox.setText(_p("RemoteDialog", "&Fetch remote branches after adding"))
from gitfourchette.forms.protocolbutton import ProtocolButton
