# Form implementation generated from reading ui file 'commitdialog.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_CommitDialog(object):
    def setupUi(self, CommitDialog):
        CommitDialog.setObjectName("CommitDialog")
        CommitDialog.resize(512, 208)
        CommitDialog.setModal(True)
        self.verticalLayout = QVBoxLayout(CommitDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.infoBox = QGroupBox(parent=CommitDialog)
        self.infoBox.setTitle("")
        self.infoBox.setObjectName("infoBox")
        self.horizontalLayout_2 = QHBoxLayout(self.infoBox)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.infoIcon = QLabel(parent=self.infoBox)
        sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.infoIcon.sizePolicy().hasHeightForWidth())
        self.infoIcon.setSizePolicy(sizePolicy)
        self.infoIcon.setMaximumSize(QSize(24, 16777215))
        self.infoIcon.setText("ICON")
        self.infoIcon.setAlignment(Qt.AlignmentFlag.AlignLeading|Qt.AlignmentFlag.AlignLeft|Qt.AlignmentFlag.AlignTop)
        self.infoIcon.setObjectName("infoIcon")
        self.horizontalLayout_2.addWidget(self.infoIcon)
        self.infoText = QLabel(parent=self.infoBox)
        self.infoText.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
        self.infoText.setWordWrap(True)
        self.infoText.setObjectName("infoText")
        self.horizontalLayout_2.addWidget(self.infoText)
        self.verticalLayout.addWidget(self.infoBox)
        self.summaryRowLayout = QHBoxLayout()
        self.summaryRowLayout.setObjectName("summaryRowLayout")
        self.summaryEditor = QLineEdit(parent=CommitDialog)
        self.summaryEditor.setObjectName("summaryEditor")
        self.summaryRowLayout.addWidget(self.summaryEditor)
        self.counterLabel = QLabel(parent=CommitDialog)
        self.counterLabel.setEnabled(False)
        self.counterLabel.setText("000")
        self.counterLabel.setObjectName("counterLabel")
        self.summaryRowLayout.addWidget(self.counterLabel)
        self.verticalLayout.addLayout(self.summaryRowLayout)
        self.descriptionEditor = QPlainTextEdit(parent=CommitDialog)
        self.descriptionEditor.setTabChangesFocus(True)
        self.descriptionEditor.setObjectName("descriptionEditor")
        self.verticalLayout.addWidget(self.descriptionEditor)
        self.signatureBox = QGroupBox(parent=CommitDialog)
        self.signatureBox.setEnabled(True)
        self.signatureBox.setTitle("")
        self.signatureBox.setFlat(False)
        self.signatureBox.setCheckable(False)
        self.signatureBox.setObjectName("signatureBox")
        self.verticalLayout_2 = QVBoxLayout(self.signatureBox)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.signature = SignatureForm(parent=self.signatureBox)
        self.signature.setObjectName("signature")
        self.verticalLayout_2.addWidget(self.signature)
        self.verticalLayout.addWidget(self.signatureBox)
        self.buttonLayout = QHBoxLayout()
        self.buttonLayout.setObjectName("buttonLayout")
        self.revealSignature = QCheckBox(parent=CommitDialog)
        self.revealSignature.setChecked(False)
        self.revealSignature.setObjectName("revealSignature")
        self.buttonLayout.addWidget(self.revealSignature)
        self.signatureButton = QHintButton(parent=CommitDialog)
        self.signatureButton.setFocusPolicy(Qt.FocusPolicy.NoFocus)
        self.signatureButton.setAutoRaise(True)
        self.signatureButton.setObjectName("signatureButton")
        self.buttonLayout.addWidget(self.signatureButton)
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
        self.buttonLayout.addItem(spacerItem)
        self.gpg = GpgButton(parent=CommitDialog)
        self.gpg.setText("&GPG")
        self.gpg.setObjectName("gpg")
        self.buttonLayout.addWidget(self.gpg)
        self.buttonBox = QDialogButtonBox(parent=CommitDialog)
        sizePolicy = QSizePolicy(QSizePolicy.Policy.Maximum, QSizePolicy.Policy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
        self.buttonBox.setSizePolicy(sizePolicy)
        self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton.Cancel|QDialogButtonBox.StandardButton.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.buttonLayout.addWidget(self.buttonBox)
        self.verticalLayout.addLayout(self.buttonLayout)

        self.retranslateUi(CommitDialog)
        self.buttonBox.accepted.connect(CommitDialog.accept) # type: ignore
        self.buttonBox.rejected.connect(CommitDialog.reject) # type: ignore
        self.revealSignature.toggled['bool'].connect(self.signatureBox.setVisible) # type: ignore
        self.revealSignature.toggled['bool'].connect(self.signatureBox.setEnabled) # type: ignore
        CommitDialog.setTabOrder(self.summaryEditor, self.descriptionEditor)

    def retranslateUi(self, CommitDialog):
        CommitDialog.setWindowTitle(_p("CommitDialog", "Commit"))
        self.summaryEditor.setPlaceholderText(_p("CommitDialog", "Enter commit summary"))
        self.counterLabel.setToolTip(_p("CommitDialog", "<p>Length of the summary. Convention is to stay under 50 characters and avoid going over 72. If that’s not enough, use the long-form description.</p>"))
        self.descriptionEditor.setPlaceholderText(_p("CommitDialog", "Long-form description (optional)"))
        self.revealSignature.setText(_p("CommitDialog", "&Edit Author"))
        self.signatureButton.setText(_p("CommitDialog", "Preview"))
from gitfourchette.forms.gpgbutton import GpgButton
from gitfourchette.forms.signatureform import SignatureForm
from gitfourchette.toolbox.qhintbutton import QHintButton
