# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '/pbulk/work/misc/calibre/work/calibre-5.44.0/src/calibre/gui2/preferences/plugboard.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(931, 389)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setTextFormat(QtCore.Qt.PlainText)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
        self.line = QtWidgets.QFrame(Form)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.gridLayout.addWidget(self.line, 1, 0, 1, 2)
        self.device_label = QtWidgets.QLabel(Form)
        self.device_label.setObjectName("device_label")
        self.gridLayout.addWidget(self.device_label, 2, 0, 1, 2)
        self.line1 = QtWidgets.QFrame(Form)
        self.line1.setFrameShape(QtWidgets.QFrame.HLine)
        self.line1.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line1.setObjectName("line1")
        self.gridLayout.addWidget(self.line1, 3, 0, 1, 2)
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.label_6 = QtWidgets.QLabel(Form)
        self.label_6.setAlignment(QtCore.Qt.AlignCenter)
        self.label_6.setObjectName("label_6")
        self.gridLayout_2.addWidget(self.label_6, 0, 1, 1, 1)
        self.label_7 = QtWidgets.QLabel(Form)
        self.label_7.setAlignment(QtCore.Qt.AlignCenter)
        self.label_7.setObjectName("label_7")
        self.gridLayout_2.addWidget(self.label_7, 0, 2, 1, 1)
        self.label_5 = QtWidgets.QLabel(Form)
        self.label_5.setObjectName("label_5")
        self.gridLayout_2.addWidget(self.label_5, 1, 0, 1, 1)
        self.new_format = QtWidgets.QComboBox(Form)
        self.new_format.setObjectName("new_format")
        self.gridLayout_2.addWidget(self.new_format, 1, 1, 1, 1)
        self.new_device = QtWidgets.QComboBox(Form)
        self.new_device.setObjectName("new_device")
        self.gridLayout_2.addWidget(self.new_device, 1, 2, 1, 1)
        self.label_4 = QtWidgets.QLabel(Form)
        self.label_4.setObjectName("label_4")
        self.gridLayout_2.addWidget(self.label_4, 2, 0, 1, 1)
        self.edit_format = QtWidgets.QComboBox(Form)
        self.edit_format.setObjectName("edit_format")
        self.gridLayout_2.addWidget(self.edit_format, 2, 1, 1, 1)
        self.edit_device = QtWidgets.QComboBox(Form)
        self.edit_device.setObjectName("edit_device")
        self.gridLayout_2.addWidget(self.edit_device, 2, 2, 1, 1)
        self.label_41 = QtWidgets.QLabel(Form)
        self.label_41.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.label_41.setObjectName("label_41")
        self.gridLayout_2.addWidget(self.label_41, 3, 0, 1, 1)
        self.existing_plugboards = QtWidgets.QListWidget(Form)
        self.existing_plugboards.setSizeIncrement(QtCore.QSize(0, 0))
        self.existing_plugboards.setObjectName("existing_plugboards")
        self.gridLayout_2.addWidget(self.existing_plugboards, 3, 1, 1, 2)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_2.addItem(spacerItem, 4, 0, 1, 1)
        self.gridLayout.addLayout(self.gridLayout_2, 4, 0, 1, 1)
        self.fields_layout = QtWidgets.QGridLayout()
        self.fields_layout.setObjectName("fields_layout")
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.fields_layout.addWidget(self.label_2, 0, 0, 1, 1)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.fields_layout.addWidget(self.label_3, 0, 1, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.fields_layout.addItem(spacerItem1, 21, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.ok_button = QtWidgets.QPushButton(Form)
        self.ok_button.setObjectName("ok_button")
        self.horizontalLayout.addWidget(self.ok_button)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem3)
        self.del_button = QtWidgets.QPushButton(Form)
        self.del_button.setObjectName("del_button")
        self.horizontalLayout.addWidget(self.del_button)
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem4)
        self.fields_layout.addLayout(self.horizontalLayout, 19, 0, 1, 1)
        self.gridLayout.addLayout(self.fields_layout, 4, 1, 1, 1)
        self.label_5.setBuddy(self.new_format)
        self.label_4.setBuddy(self.edit_format)
        self.label_41.setBuddy(self.existing_plugboards)

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

    def retranslateUi(self, Form):

        Form.setWindowTitle(_("Form"))
        self.label.setText(_("Here you can change the metadata calibre uses to update a book when saving to disk or sending to device.\n"
"\n"
"Use this dialog to define a \'plugboard\' for a format (or all formats) and a device (or all devices). The plugboard specifies what template is connected to what field. The template is used to compute a value, and that value is assigned to the connected field.\n"
"\n"
"Often templates will contain simple references to composite columns, but this is not necessary. You can use any template in a source box that you can use elsewhere in calibre.\n"
"\n"
"One possible use for a plugboard is to alter the title to contain series information. Another would be to change the author sort, something that MOBI users might do to force it to use the \';\' that the Kindle requires. A third would be to specify the language."))
        self.label_6.setText(_("Format (choose first)"))
        self.label_7.setText(_("Device (choose second)"))
        self.label_5.setText(_("Add &new plugboard:"))
        self.label_4.setText(_("Edit &existing plugboard:"))
        self.label_41.setText(_("Existing &plugboards:"))
        self.label_2.setText(_("Source template"))
        self.label_3.setText(_("Destination field"))
        self.ok_button.setText(_("&Save plugboard"))
        self.del_button.setText(_("&Delete plugboard"))
