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

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk.ui'
#
# Created: Thu Feb  3 20:54:57 2011
#      by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_MetadataBulkDialog(object):
    def setupUi(self, MetadataBulkDialog):
        MetadataBulkDialog.setObjectName(_fromUtf8("MetadataBulkDialog"))
        MetadataBulkDialog.resize(962, 645)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("edit_input.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MetadataBulkDialog.setWindowIcon(icon)
        self.gridLayout_2 = QtGui.QGridLayout(MetadataBulkDialog)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.box_title = QtGui.QLabel(MetadataBulkDialog)
        self.box_title.setText(_fromUtf8(""))
        self.box_title.setAlignment(QtCore.Qt.AlignCenter)
        self.box_title.setObjectName(_fromUtf8("box_title"))
        self.gridLayout_2.addWidget(self.box_title, 0, 0, 1, 1)
        self.scrollArea = QtGui.QScrollArea(MetadataBulkDialog)
        self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
        self.scrollArea.setLineWidth(0)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
        self.scrollAreaWidgetContents = QtGui.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 954, 584))
        self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout_2.setMargin(0)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.central_widget = QtGui.QTabWidget(self.scrollAreaWidgetContents)
        self.central_widget.setObjectName(_fromUtf8("central_widget"))
        self.tabWidgetPage1 = QtGui.QWidget()
        self.tabWidgetPage1.setObjectName(_fromUtf8("tabWidgetPage1"))
        self.gridLayout = QtGui.QGridLayout(self.tabWidgetPage1)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label_2 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.authors = MultiCompleteComboBox(self.tabWidgetPage1)
        self.authors.setEditable(True)
        self.authors.setObjectName(_fromUtf8("authors"))
        self.gridLayout.addWidget(self.authors, 0, 1, 1, 1)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.auto_author_sort = QtGui.QCheckBox(self.tabWidgetPage1)
        self.auto_author_sort.setObjectName(_fromUtf8("auto_author_sort"))
        self.horizontalLayout_2.addWidget(self.auto_author_sort)
        self.swap_title_and_author = QtGui.QCheckBox(self.tabWidgetPage1)
        self.swap_title_and_author.setObjectName(_fromUtf8("swap_title_and_author"))
        self.horizontalLayout_2.addWidget(self.swap_title_and_author)
        self.gridLayout.addLayout(self.horizontalLayout_2, 1, 1, 1, 1)
        self.label_8 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_8.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.gridLayout.addWidget(self.label_8, 2, 0, 1, 1)
        self.author_sort = EnLineEdit(self.tabWidgetPage1)
        self.author_sort.setObjectName(_fromUtf8("author_sort"))
        self.gridLayout.addWidget(self.author_sort, 2, 1, 1, 1)
        self.label_6 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout.addWidget(self.label_6, 3, 0, 1, 1)
        self.rating = QtGui.QSpinBox(self.tabWidgetPage1)
        self.rating.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.rating.setMinimum(-1)
        self.rating.setMaximum(5)
        self.rating.setProperty(_fromUtf8("value"), -1)
        self.rating.setObjectName(_fromUtf8("rating"))
        self.gridLayout.addWidget(self.rating, 3, 1, 1, 1)
        self.label_3 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
        self.publisher = MultiCompleteComboBox(self.tabWidgetPage1)
        self.publisher.setEditable(True)
        self.publisher.setObjectName(_fromUtf8("publisher"))
        self.gridLayout.addWidget(self.publisher, 4, 1, 1, 1)
        self.label_4 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout.addWidget(self.label_4, 5, 0, 1, 1)
        self.tags = MultiCompleteLineEdit(self.tabWidgetPage1)
        self.tags.setObjectName(_fromUtf8("tags"))
        self.gridLayout.addWidget(self.tags, 5, 1, 1, 1)
        self.tag_editor_button = QtGui.QToolButton(self.tabWidgetPage1)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I("chapters.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.tag_editor_button.setIcon(icon1)
        self.tag_editor_button.setObjectName(_fromUtf8("tag_editor_button"))
        self.gridLayout.addWidget(self.tag_editor_button, 5, 2, 1, 1)
        self.label = QtGui.QLabel(self.tabWidgetPage1)
        self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 6, 0, 1, 1)
        self.remove_tags = MultiCompleteLineEdit(self.tabWidgetPage1)
        self.remove_tags.setObjectName(_fromUtf8("remove_tags"))
        self.gridLayout.addWidget(self.remove_tags, 6, 1, 1, 1)
        self.remove_all_tags = QtGui.QCheckBox(self.tabWidgetPage1)
        self.remove_all_tags.setObjectName(_fromUtf8("remove_all_tags"))
        self.gridLayout.addWidget(self.remove_all_tags, 6, 2, 1, 1)
        self.label_7 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_7.setTextFormat(QtCore.Qt.PlainText)
        self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.gridLayout.addWidget(self.label_7, 7, 0, 1, 1)
        self.series = MultiCompleteComboBox(self.tabWidgetPage1)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.series.sizePolicy().hasHeightForWidth())
        self.series.setSizePolicy(sizePolicy)
        self.series.setEditable(True)
        self.series.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
        self.series.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLengthWithIcon)
        self.series.setMinimumContentsLength(40)
        self.series.setObjectName(_fromUtf8("series"))
        self.gridLayout.addWidget(self.series, 7, 1, 1, 1)
        self.clear_series = QtGui.QCheckBox(self.tabWidgetPage1)
        self.clear_series.setObjectName(_fromUtf8("clear_series"))
        self.gridLayout.addWidget(self.clear_series, 7, 2, 1, 1)
        self.HLayout_3 = QtGui.QHBoxLayout()
        self.HLayout_3.setObjectName(_fromUtf8("HLayout_3"))
        self.autonumber_series = QtGui.QCheckBox(self.tabWidgetPage1)
        self.autonumber_series.setObjectName(_fromUtf8("autonumber_series"))
        self.HLayout_3.addWidget(self.autonumber_series)
        self.series_numbering_restarts = QtGui.QCheckBox(self.tabWidgetPage1)
        self.series_numbering_restarts.setEnabled(False)
        self.series_numbering_restarts.setObjectName(_fromUtf8("series_numbering_restarts"))
        self.HLayout_3.addWidget(self.series_numbering_restarts)
        self.series_start_number = QtGui.QSpinBox(self.tabWidgetPage1)
        self.series_start_number.setEnabled(False)
        self.series_start_number.setMinimum(1)
        self.series_start_number.setMaximum(990000)
        self.series_start_number.setProperty(_fromUtf8("value"), 1)
        self.series_start_number.setObjectName(_fromUtf8("series_start_number"))
        self.HLayout_3.addWidget(self.series_start_number)
        self.gridLayout.addLayout(self.HLayout_3, 8, 1, 1, 1)
        self.label_10 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_10.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.gridLayout.addWidget(self.label_10, 9, 0, 1, 1)
        self.horizontalLayout_5 = QtGui.QHBoxLayout()
        self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
        self.adddate = QtGui.QDateEdit(self.tabWidgetPage1)
        self.adddate.setCalendarPopup(True)
        self.adddate.setObjectName(_fromUtf8("adddate"))
        self.horizontalLayout_5.addWidget(self.adddate)
        self.clear_adddate_button = QtGui.QToolButton(self.tabWidgetPage1)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(I("trash.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.clear_adddate_button.setIcon(icon2)
        self.clear_adddate_button.setObjectName(_fromUtf8("clear_adddate_button"))
        self.horizontalLayout_5.addWidget(self.clear_adddate_button)
        self.gridLayout.addLayout(self.horizontalLayout_5, 9, 1, 1, 1)
        self.apply_adddate = QtGui.QCheckBox(self.tabWidgetPage1)
        self.apply_adddate.setObjectName(_fromUtf8("apply_adddate"))
        self.gridLayout.addWidget(self.apply_adddate, 9, 2, 1, 1)
        self.label_9 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_9.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.gridLayout.addWidget(self.label_9, 10, 0, 1, 1)
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
        self.pubdate = QtGui.QDateEdit(self.tabWidgetPage1)
        self.pubdate.setCalendarPopup(True)
        self.pubdate.setObjectName(_fromUtf8("pubdate"))
        self.horizontalLayout_4.addWidget(self.pubdate)
        self.clear_pubdate_button = QtGui.QToolButton(self.tabWidgetPage1)
        self.clear_pubdate_button.setIcon(icon2)
        self.clear_pubdate_button.setObjectName(_fromUtf8("clear_pubdate_button"))
        self.horizontalLayout_4.addWidget(self.clear_pubdate_button)
        self.gridLayout.addLayout(self.horizontalLayout_4, 10, 1, 1, 1)
        self.apply_pubdate = QtGui.QCheckBox(self.tabWidgetPage1)
        self.apply_pubdate.setObjectName(_fromUtf8("apply_pubdate"))
        self.gridLayout.addWidget(self.apply_pubdate, 10, 2, 1, 1)
        self.label_5 = QtGui.QLabel(self.tabWidgetPage1)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.gridLayout.addWidget(self.label_5, 11, 0, 1, 1)
        self.remove_format = QtGui.QComboBox(self.tabWidgetPage1)
        self.remove_format.setMaximumSize(QtCore.QSize(120, 16777215))
        self.remove_format.setObjectName(_fromUtf8("remove_format"))
        self.gridLayout.addWidget(self.remove_format, 11, 1, 1, 1)
        spacerItem = QtGui.QSpacerItem(20, 15, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        self.gridLayout.addItem(spacerItem, 12, 0, 1, 1)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.change_title_to_title_case = QtGui.QCheckBox(self.tabWidgetPage1)
        self.change_title_to_title_case.setObjectName(_fromUtf8("change_title_to_title_case"))
        self.horizontalLayout_3.addWidget(self.change_title_to_title_case)
        self.update_title_sort = QtGui.QCheckBox(self.tabWidgetPage1)
        self.update_title_sort.setObjectName(_fromUtf8("update_title_sort"))
        self.horizontalLayout_3.addWidget(self.update_title_sort)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem1)
        self.remove_conversion_settings = QtGui.QCheckBox(self.tabWidgetPage1)
        self.remove_conversion_settings.setObjectName(_fromUtf8("remove_conversion_settings"))
        self.horizontalLayout_3.addWidget(self.remove_conversion_settings)
        self.gridLayout.addLayout(self.horizontalLayout_3, 13, 0, 1, 3)
        self.groupBox = QtGui.QGroupBox(self.tabWidgetPage1)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.groupBox)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.cover_generate = QtGui.QRadioButton(self.groupBox)
        self.cover_generate.setObjectName(_fromUtf8("cover_generate"))
        self.horizontalLayout.addWidget(self.cover_generate)
        self.cover_remove = QtGui.QRadioButton(self.groupBox)
        self.cover_remove.setObjectName(_fromUtf8("cover_remove"))
        self.horizontalLayout.addWidget(self.cover_remove)
        self.cover_from_fmt = QtGui.QRadioButton(self.groupBox)
        self.cover_from_fmt.setObjectName(_fromUtf8("cover_from_fmt"))
        self.horizontalLayout.addWidget(self.cover_from_fmt)
        self.gridLayout.addWidget(self.groupBox, 14, 0, 1, 3)
        spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem2, 15, 0, 1, 1)
        self.central_widget.addTab(self.tabWidgetPage1, _fromUtf8(""))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.central_widget.addTab(self.tab, _fromUtf8(""))
        self.tabWidgetPage3 = QtGui.QWidget()
        self.tabWidgetPage3.setObjectName(_fromUtf8("tabWidgetPage3"))
        self.vargrid = QtGui.QGridLayout(self.tabWidgetPage3)
        self.vargrid.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
        self.vargrid.setObjectName(_fromUtf8("vargrid"))
        self.s_r_heading = QtGui.QLabel(self.tabWidgetPage3)
        self.s_r_heading.setWordWrap(True)
        self.s_r_heading.setOpenExternalLinks(True)
        self.s_r_heading.setObjectName(_fromUtf8("s_r_heading"))
        self.vargrid.addWidget(self.s_r_heading, 0, 0, 1, 4)
        self.filler = QtGui.QLabel(self.tabWidgetPage3)
        self.filler.setText(_fromUtf8(""))
        self.filler.setObjectName(_fromUtf8("filler"))
        self.vargrid.addWidget(self.filler, 1, 0, 1, 1)
        self.line = QtGui.QFrame(self.tabWidgetPage3)
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName(_fromUtf8("line"))
        self.vargrid.addWidget(self.line, 2, 0, 1, 3)
        self.xlabel_22 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_22.setObjectName(_fromUtf8("xlabel_22"))
        self.vargrid.addWidget(self.xlabel_22, 3, 0, 1, 1)
        self.query_field = QtGui.QComboBox(self.tabWidgetPage3)
        self.query_field.setObjectName(_fromUtf8("query_field"))
        self.vargrid.addWidget(self.query_field, 3, 1, 1, 1)
        self.horizontalLayout_6 = QtGui.QHBoxLayout()
        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
        spacerItem3 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem3)
        self.save_button = QtGui.QPushButton(self.tabWidgetPage3)
        self.save_button.setObjectName(_fromUtf8("save_button"))
        self.horizontalLayout_6.addWidget(self.save_button)
        self.remove_button = QtGui.QPushButton(self.tabWidgetPage3)
        self.remove_button.setObjectName(_fromUtf8("remove_button"))
        self.horizontalLayout_6.addWidget(self.remove_button)
        spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem4)
        self.vargrid.addLayout(self.horizontalLayout_6, 3, 2, 1, 1)
        self.xlabel_21 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_21.setObjectName(_fromUtf8("xlabel_21"))
        self.vargrid.addWidget(self.xlabel_21, 4, 0, 1, 1)
        self.search_field = QtGui.QComboBox(self.tabWidgetPage3)
        self.search_field.setObjectName(_fromUtf8("search_field"))
        self.vargrid.addWidget(self.search_field, 4, 1, 1, 1)
        self.HLayout_31 = QtGui.QHBoxLayout()
        self.HLayout_31.setObjectName(_fromUtf8("HLayout_31"))
        self.xlabel_24 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_24.setObjectName(_fromUtf8("xlabel_24"))
        self.HLayout_31.addWidget(self.xlabel_24)
        self.search_mode = QtGui.QComboBox(self.tabWidgetPage3)
        self.search_mode.setObjectName(_fromUtf8("search_mode"))
        self.HLayout_31.addWidget(self.search_mode)
        spacerItem5 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.HLayout_31.addItem(spacerItem5)
        self.vargrid.addLayout(self.HLayout_31, 4, 2, 1, 1)
        self.template_label = QtGui.QLabel(self.tabWidgetPage3)
        self.template_label.setObjectName(_fromUtf8("template_label"))
        self.vargrid.addWidget(self.template_label, 5, 0, 1, 1)
        self.s_r_template = HistoryLineEdit(self.tabWidgetPage3)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.s_r_template.sizePolicy().hasHeightForWidth())
        self.s_r_template.setSizePolicy(sizePolicy)
        self.s_r_template.setObjectName(_fromUtf8("s_r_template"))
        self.vargrid.addWidget(self.s_r_template, 5, 1, 1, 1)
        self.xlabel_2 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_2.setObjectName(_fromUtf8("xlabel_2"))
        self.vargrid.addWidget(self.xlabel_2, 6, 0, 1, 1)
        self.search_for = HistoryLineEdit(self.tabWidgetPage3)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.search_for.sizePolicy().hasHeightForWidth())
        self.search_for.setSizePolicy(sizePolicy)
        self.search_for.setObjectName(_fromUtf8("search_for"))
        self.vargrid.addWidget(self.search_for, 6, 1, 1, 1)
        self.case_sensitive = QtGui.QCheckBox(self.tabWidgetPage3)
        self.case_sensitive.setChecked(True)
        self.case_sensitive.setObjectName(_fromUtf8("case_sensitive"))
        self.vargrid.addWidget(self.case_sensitive, 6, 2, 1, 1)
        self.xlabel_4 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_4.setObjectName(_fromUtf8("xlabel_4"))
        self.vargrid.addWidget(self.xlabel_4, 7, 0, 1, 1)
        self.replace_with = HistoryLineEdit(self.tabWidgetPage3)
        self.replace_with.setObjectName(_fromUtf8("replace_with"))
        self.vargrid.addWidget(self.replace_with, 7, 1, 1, 1)
        self.verticalLayout = QtGui.QHBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label_41 = QtGui.QLabel(self.tabWidgetPage3)
        self.label_41.setObjectName(_fromUtf8("label_41"))
        self.verticalLayout.addWidget(self.label_41)
        self.replace_func = QtGui.QComboBox(self.tabWidgetPage3)
        self.replace_func.setObjectName(_fromUtf8("replace_func"))
        self.verticalLayout.addWidget(self.replace_func)
        spacerItem6 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.verticalLayout.addItem(spacerItem6)
        self.vargrid.addLayout(self.verticalLayout, 7, 2, 1, 1)
        self.destination_field_label = QtGui.QLabel(self.tabWidgetPage3)
        self.destination_field_label.setObjectName(_fromUtf8("destination_field_label"))
        self.vargrid.addWidget(self.destination_field_label, 8, 0, 1, 1)
        self.destination_field = QtGui.QComboBox(self.tabWidgetPage3)
        self.destination_field.setObjectName(_fromUtf8("destination_field"))
        self.vargrid.addWidget(self.destination_field, 8, 1, 1, 1)
        self.verticalLayout1 = QtGui.QHBoxLayout()
        self.verticalLayout1.setObjectName(_fromUtf8("verticalLayout1"))
        self.replace_mode_label = QtGui.QLabel(self.tabWidgetPage3)
        self.replace_mode_label.setObjectName(_fromUtf8("replace_mode_label"))
        self.verticalLayout1.addWidget(self.replace_mode_label)
        self.replace_mode = QtGui.QComboBox(self.tabWidgetPage3)
        self.replace_mode.setObjectName(_fromUtf8("replace_mode"))
        self.verticalLayout1.addWidget(self.replace_mode)
        self.comma_separated = QtGui.QCheckBox(self.tabWidgetPage3)
        self.comma_separated.setChecked(True)
        self.comma_separated.setObjectName(_fromUtf8("comma_separated"))
        self.verticalLayout1.addWidget(self.comma_separated)
        spacerItem7 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.verticalLayout1.addItem(spacerItem7)
        self.vargrid.addLayout(self.verticalLayout1, 8, 2, 1, 1)
        self.horizontalLayout_21 = QtGui.QHBoxLayout()
        self.horizontalLayout_21.setObjectName(_fromUtf8("horizontalLayout_21"))
        spacerItem8 = QtGui.QSpacerItem(20, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_21.addItem(spacerItem8)
        self.xlabel_412 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_412.setObjectName(_fromUtf8("xlabel_412"))
        self.horizontalLayout_21.addWidget(self.xlabel_412)
        self.results_count = QtGui.QSpinBox(self.tabWidgetPage3)
        self.results_count.setEnabled(True)
        self.results_count.setMinimum(1)
        self.results_count.setMaximum(999)
        self.results_count.setProperty(_fromUtf8("value"), 999)
        self.results_count.setObjectName(_fromUtf8("results_count"))
        self.horizontalLayout_21.addWidget(self.results_count)
        self.xlabel_4121 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_4121.setObjectName(_fromUtf8("xlabel_4121"))
        self.horizontalLayout_21.addWidget(self.xlabel_4121)
        self.starting_from = QtGui.QSpinBox(self.tabWidgetPage3)
        self.starting_from.setEnabled(True)
        self.starting_from.setMinimum(1)
        self.starting_from.setMaximum(999)
        self.starting_from.setProperty(_fromUtf8("value"), 1)
        self.starting_from.setObjectName(_fromUtf8("starting_from"))
        self.horizontalLayout_21.addWidget(self.starting_from)
        self.xlabel_41 = QtGui.QLabel(self.tabWidgetPage3)
        self.xlabel_41.setObjectName(_fromUtf8("xlabel_41"))
        self.horizontalLayout_21.addWidget(self.xlabel_41)
        self.multiple_separator = QtGui.QLineEdit(self.tabWidgetPage3)
        self.multiple_separator.setObjectName(_fromUtf8("multiple_separator"))
        self.horizontalLayout_21.addWidget(self.multiple_separator)
        self.vargrid.addLayout(self.horizontalLayout_21, 9, 1, 1, 2)
        self.scrollArea11 = QtGui.QScrollArea(self.tabWidgetPage3)
        self.scrollArea11.setFrameShape(QtGui.QFrame.NoFrame)
        self.scrollArea11.setWidgetResizable(True)
        self.scrollArea11.setObjectName(_fromUtf8("scrollArea11"))
        self.gridLayoutWidget_2 = QtGui.QWidget()
        self.gridLayoutWidget_2.setGeometry(QtCore.QRect(0, 0, 938, 268))
        self.gridLayoutWidget_2.setObjectName(_fromUtf8("gridLayoutWidget_2"))
        self.testgrid = QtGui.QGridLayout(self.gridLayoutWidget_2)
        self.testgrid.setObjectName(_fromUtf8("testgrid"))
        self.xlabel_3 = QtGui.QLabel(self.gridLayoutWidget_2)
        self.xlabel_3.setObjectName(_fromUtf8("xlabel_3"))
        self.testgrid.addWidget(self.xlabel_3, 7, 1, 1, 1)
        self.xlabel_31 = QtGui.QLabel(self.gridLayoutWidget_2)
        self.xlabel_31.setObjectName(_fromUtf8("xlabel_31"))
        self.testgrid.addWidget(self.xlabel_31, 7, 2, 1, 1)
        self.label_31 = QtGui.QLabel(self.gridLayoutWidget_2)
        self.label_31.setObjectName(_fromUtf8("label_31"))
        self.testgrid.addWidget(self.label_31, 8, 0, 1, 1)
        self.test_text = HistoryLineEdit(self.gridLayoutWidget_2)
        self.test_text.setObjectName(_fromUtf8("test_text"))
        self.testgrid.addWidget(self.test_text, 8, 1, 1, 1)
        self.test_result = QtGui.QLineEdit(self.gridLayoutWidget_2)
        self.test_result.setObjectName(_fromUtf8("test_result"))
        self.testgrid.addWidget(self.test_result, 8, 2, 1, 1)
        spacerItem9 = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.testgrid.addItem(spacerItem9, 25, 0, 1, 2)
        self.scrollArea11.setWidget(self.gridLayoutWidget_2)
        self.vargrid.addWidget(self.scrollArea11, 10, 0, 1, 4)
        self.central_widget.addTab(self.tabWidgetPage3, _fromUtf8(""))
        self.verticalLayout_2.addWidget(self.central_widget)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.gridLayout_2.addWidget(self.scrollArea, 1, 0, 1, 1)
        self.button_box = QtGui.QDialogButtonBox(MetadataBulkDialog)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtGui.QDialogButtonBox.Apply|QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.button_box.setObjectName(_fromUtf8("button_box"))
        self.gridLayout_2.addWidget(self.button_box, 2, 0, 1, 1)
        self.label_2.setBuddy(self.authors)
        self.label_8.setBuddy(self.author_sort)
        self.label_6.setBuddy(self.rating)
        self.label_3.setBuddy(self.publisher)
        self.label_4.setBuddy(self.tags)
        self.label.setBuddy(self.remove_tags)
        self.label_7.setBuddy(self.series)
        self.label_10.setBuddy(self.adddate)
        self.label_9.setBuddy(self.pubdate)
        self.label_5.setBuddy(self.remove_format)
        self.xlabel_22.setBuddy(self.search_field)
        self.xlabel_21.setBuddy(self.search_field)
        self.xlabel_24.setBuddy(self.search_mode)
        self.template_label.setBuddy(self.s_r_template)
        self.xlabel_2.setBuddy(self.search_for)
        self.xlabel_4.setBuddy(self.replace_with)
        self.label_41.setBuddy(self.replace_func)
        self.destination_field_label.setBuddy(self.destination_field)
        self.replace_mode_label.setBuddy(self.replace_mode)
        self.xlabel_412.setBuddy(self.results_count)
        self.xlabel_4121.setBuddy(self.starting_from)
        self.xlabel_41.setBuddy(self.multiple_separator)

        self.retranslateUi(MetadataBulkDialog)
        self.central_widget.setCurrentIndex(0)
        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL(_fromUtf8("accepted()")), MetadataBulkDialog.accept)
        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL(_fromUtf8("rejected()")), MetadataBulkDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(MetadataBulkDialog)
        MetadataBulkDialog.setTabOrder(self.authors, self.auto_author_sort)
        MetadataBulkDialog.setTabOrder(self.auto_author_sort, self.author_sort)
        MetadataBulkDialog.setTabOrder(self.author_sort, self.rating)
        MetadataBulkDialog.setTabOrder(self.rating, self.publisher)
        MetadataBulkDialog.setTabOrder(self.publisher, self.tags)
        MetadataBulkDialog.setTabOrder(self.tags, self.tag_editor_button)
        MetadataBulkDialog.setTabOrder(self.tag_editor_button, self.remove_tags)
        MetadataBulkDialog.setTabOrder(self.remove_tags, self.remove_all_tags)
        MetadataBulkDialog.setTabOrder(self.remove_all_tags, self.series)
        MetadataBulkDialog.setTabOrder(self.series, self.autonumber_series)
        MetadataBulkDialog.setTabOrder(self.autonumber_series, self.series_numbering_restarts)
        MetadataBulkDialog.setTabOrder(self.series_numbering_restarts, self.series_start_number)
        MetadataBulkDialog.setTabOrder(self.series_start_number, self.button_box)
        MetadataBulkDialog.setTabOrder(self.button_box, self.query_field)
        MetadataBulkDialog.setTabOrder(self.query_field, self.save_button)
        MetadataBulkDialog.setTabOrder(self.save_button, self.remove_button)
        MetadataBulkDialog.setTabOrder(self.remove_button, self.search_field)
        MetadataBulkDialog.setTabOrder(self.search_field, self.search_mode)
        MetadataBulkDialog.setTabOrder(self.search_mode, self.s_r_template)
        MetadataBulkDialog.setTabOrder(self.s_r_template, self.search_for)
        MetadataBulkDialog.setTabOrder(self.search_for, self.case_sensitive)
        MetadataBulkDialog.setTabOrder(self.case_sensitive, self.replace_with)
        MetadataBulkDialog.setTabOrder(self.replace_with, self.replace_func)
        MetadataBulkDialog.setTabOrder(self.replace_func, self.destination_field)
        MetadataBulkDialog.setTabOrder(self.destination_field, self.replace_mode)
        MetadataBulkDialog.setTabOrder(self.replace_mode, self.comma_separated)
        MetadataBulkDialog.setTabOrder(self.comma_separated, self.results_count)
        MetadataBulkDialog.setTabOrder(self.results_count, self.starting_from)
        MetadataBulkDialog.setTabOrder(self.starting_from, self.multiple_separator)
        MetadataBulkDialog.setTabOrder(self.multiple_separator, self.test_text)
        MetadataBulkDialog.setTabOrder(self.test_text, self.test_result)
        MetadataBulkDialog.setTabOrder(self.test_result, self.scrollArea)
        MetadataBulkDialog.setTabOrder(self.scrollArea, self.central_widget)
        MetadataBulkDialog.setTabOrder(self.central_widget, self.swap_title_and_author)
        MetadataBulkDialog.setTabOrder(self.swap_title_and_author, self.clear_series)
        MetadataBulkDialog.setTabOrder(self.clear_series, self.adddate)
        MetadataBulkDialog.setTabOrder(self.adddate, self.clear_adddate_button)
        MetadataBulkDialog.setTabOrder(self.clear_adddate_button, self.apply_adddate)
        MetadataBulkDialog.setTabOrder(self.apply_adddate, self.pubdate)
        MetadataBulkDialog.setTabOrder(self.pubdate, self.clear_pubdate_button)
        MetadataBulkDialog.setTabOrder(self.clear_pubdate_button, self.apply_pubdate)
        MetadataBulkDialog.setTabOrder(self.apply_pubdate, self.remove_format)
        MetadataBulkDialog.setTabOrder(self.remove_format, self.change_title_to_title_case)
        MetadataBulkDialog.setTabOrder(self.change_title_to_title_case, self.remove_conversion_settings)
        MetadataBulkDialog.setTabOrder(self.remove_conversion_settings, self.cover_generate)
        MetadataBulkDialog.setTabOrder(self.cover_generate, self.cover_remove)
        MetadataBulkDialog.setTabOrder(self.cover_remove, self.cover_from_fmt)
        MetadataBulkDialog.setTabOrder(self.cover_from_fmt, self.scrollArea11)

    def retranslateUi(self, MetadataBulkDialog):
        MetadataBulkDialog.setWindowTitle(_("Edit Meta information"))
        self.label_2.setText(_("&Author(s): "))
        self.auto_author_sort.setText(_("A&utomatically set author sort"))
        self.swap_title_and_author.setText(_("&Swap title and author"))
        self.label_8.setText(_("Author s&ort: "))
        self.author_sort.setToolTip(_("Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles."))
        self.label_6.setText(_("&Rating:"))
        self.rating.setToolTip(_("Rating of this book. 0-5 stars"))
        self.rating.setWhatsThis(_("Rating of this book. 0-5 stars"))
        self.rating.setSpecialValueText(_("No change"))
        self.rating.setSuffix(_(" stars"))
        self.label_3.setText(_("&Publisher: "))
        self.label_4.setText(_("Add ta&gs: "))
        self.tags.setToolTip(_("Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas."))
        self.tag_editor_button.setToolTip(_("Open Tag Editor"))
        self.tag_editor_button.setText(_("Open Tag Editor"))
        self.label.setText(_("&Remove tags:"))
        self.remove_tags.setToolTip(_("Comma separated list of tags to remove from the books. "))
        self.remove_all_tags.setToolTip(_("Check this box to remove all tags from the books."))
        self.remove_all_tags.setText(_("Remove &all"))
        self.label_7.setText(_("&Series:"))
        self.series.setToolTip(_("List of known series. You can add new series."))
        self.series.setWhatsThis(_("List of known series. You can add new series."))
        self.clear_series.setToolTip(_("If checked, the series will be cleared"))
        self.clear_series.setText(_("&Clear series"))
        self.autonumber_series.setToolTip(_("If not checked, the series number for the books will be set to 1.\n"
"If checked, selected books will be automatically numbered, in the order\n"
"you selected them. So if you selected Book A and then Book B,\n"
"Book A will have series number 1 and Book B series number 2."))
        self.autonumber_series.setText(_("&Automatically number books in this series"))
        self.series_numbering_restarts.setToolTip(_("Series will normally be renumbered from the highest number in the database\n"
"for that series. Checking this box will tell calibre to start numbering\n"
"from the value in the box"))
        self.series_numbering_restarts.setText(_("&Force numbers to start with:"))
        self.label_10.setText(_("&Date:"))
        self.adddate.setDisplayFormat(_("d MMM yyyy"))
        self.clear_adddate_button.setText(_("..."))
        self.apply_adddate.setText(_("&Apply date"))
        self.label_9.setText(_("&Published:"))
        self.pubdate.setDisplayFormat("MMM yyyy")
        self.clear_pubdate_button.setToolTip(_("Clear published date"))
        self.clear_pubdate_button.setText(_("..."))
        self.apply_pubdate.setText(_("&Apply date"))
        self.label_5.setText(_("Remove &format:"))
        self.change_title_to_title_case.setToolTip(_("Force the title to be in title case. If both this and swap authors are checked,\n"
"title and author are swapped before the title case is set"))
        self.change_title_to_title_case.setText(_("Change title to title &case"))
        self.update_title_sort.setToolTip(_("Update title sort based on the current title. This will be applied only after other changes to title."))
        self.update_title_sort.setText(_("Update &title sort"))
        self.remove_conversion_settings.setToolTip(_("Remove stored conversion settings for the selected books.\n"
"\n"
"Future conversion of these books will use the default settings."))
        self.remove_conversion_settings.setText(_("Remove &stored conversion settings for the selected books"))
        self.groupBox.setTitle(_("Change &cover"))
        self.cover_generate.setText(_("&Generate default cover"))
        self.cover_remove.setText(_("&Remove cover"))
        self.cover_from_fmt.setText(_("Set from &ebook file(s)"))
        self.central_widget.setTabText(self.central_widget.indexOf(self.tabWidgetPage1), _("&Basic metadata"))
        self.central_widget.setTabText(self.central_widget.indexOf(self.tab), _("&Custom metadata"))
        self.xlabel_22.setText(_("Load searc&h/replace:"))
        self.query_field.setToolTip(_("Select saved search/replace to load."))
        self.save_button.setToolTip(_("Save current search/replace"))
        self.save_button.setText(_("Sa&ve"))
        self.remove_button.setToolTip(_("Delete saved search/replace"))
        self.remove_button.setText(_("Delete"))
        self.xlabel_21.setText(_("Search &field:"))
        self.search_field.setToolTip(_("The name of the field that you want to search"))
        self.xlabel_24.setText(_("Search &mode:"))
        self.search_mode.setToolTip(_("Choose whether to use basic text matching or advanced regular expression matching"))
        self.template_label.setText(_("Te&mplate:"))
        self.s_r_template.setToolTip(_("Enter a template to be used as the source for the search/replace"))
        self.xlabel_2.setText(_("&Search for:"))
        self.search_for.setToolTip(_("Enter the what you are looking for, either plain text or a regular expression, depending on the mode"))
        self.case_sensitive.setToolTip(_("Check this box if the search string must match exactly upper and lower case. Uncheck it if case is to be ignored"))
        self.case_sensitive.setText(_("Cas&e sensitive"))
        self.xlabel_4.setText(_("&Replace with:"))
        self.replace_with.setToolTip(_("The replacement text. The matched search text will be replaced with this string"))
        self.label_41.setText(_("&Apply function after replace:"))
        self.replace_func.setToolTip(_("Specify how the text is to be processed after matching and replacement. In character mode, the entire\n"
"field is processed. In regular expression mode, only the matched text is processed"))
        self.destination_field_label.setText(_("&Destination field:"))
        self.destination_field.setToolTip(_("The field that the text will be put into after all replacements.\n"
"If blank, the source field is used if the field is modifiable"))
        self.replace_mode_label.setText(_("M&ode:"))
        self.replace_mode.setToolTip(_("Specify how the text should be copied into the destination."))
        self.comma_separated.setToolTip(_("Specifies whether result items should be split into multiple values or\n"
"left as single values. This option has the most effect when the source field is\n"
"not multiple and the destination field is multiple"))
        self.comma_separated.setText(_("Split &result"))
        self.xlabel_412.setText(_("For multiple-valued fields, sho&w"))
        self.xlabel_4121.setText(_("values starting a&t"))
        self.xlabel_41.setText(_("with values separated b&y"))
        self.multiple_separator.setToolTip(_("Used when displaying test results to separate values in multiple-valued fields"))
        self.xlabel_3.setText(_("Test text"))
        self.xlabel_31.setText(_("Test result"))
        self.label_31.setText(_("Your test:"))
        self.central_widget.setTabText(self.central_widget.indexOf(self.tabWidgetPage3), _("&Search and replace"))

from calibre.gui2.widgets import EnLineEdit, HistoryLineEdit
from calibre.gui2.complete import MultiCompleteLineEdit, MultiCompleteComboBox

