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

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/dialogs/tag_list_editor.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# 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_TagListEditor(object):
    def setupUi(self, TagListEditor):
        TagListEditor.setObjectName("TagListEditor")
        TagListEditor.resize(676, 335)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("chapters.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        TagListEditor.setWindowIcon(icon)
        self.gridlayout = QtWidgets.QGridLayout(TagListEditor)
        self.gridlayout.setObjectName("gridlayout")
        self.label = QtWidgets.QLabel(TagListEditor)
        self.label.setObjectName("label")
        self.gridlayout.addWidget(self.label, 0, 0, 1, 1)
        self.search_box = HistoryLineEdit(TagListEditor)
        self.search_box.setMinimumSize(QtCore.QSize(200, 0))
        self.search_box.setClearButtonEnabled(True)
        self.search_box.setObjectName("search_box")
        self.gridlayout.addWidget(self.search_box, 0, 1, 1, 1)
        self.search_button = QtWidgets.QPushButton(TagListEditor)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(I("search.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.search_button.setIcon(icon1)
        self.search_button.setObjectName("search_button")
        self.gridlayout.addWidget(self.search_button, 0, 2, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridlayout.addItem(spacerItem, 0, 3, 1, 1)
        self.apply_vl_checkbox = QtWidgets.QCheckBox(TagListEditor)
        self.apply_vl_checkbox.setObjectName("apply_vl_checkbox")
        self.gridlayout.addWidget(self.apply_vl_checkbox, 0, 4, 1, 1)
        self.label1 = QtWidgets.QLabel(TagListEditor)
        self.label1.setObjectName("label1")
        self.gridlayout.addWidget(self.label1, 1, 0, 1, 1)
        self.filter_box = HistoryLineEdit(TagListEditor)
        self.filter_box.setMinimumSize(QtCore.QSize(200, 0))
        self.filter_box.setClearButtonEnabled(True)
        self.filter_box.setObjectName("filter_box")
        self.gridlayout.addWidget(self.filter_box, 1, 1, 1, 1)
        self.filter_button = QtWidgets.QPushButton(TagListEditor)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(I("filter.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.filter_button.setIcon(icon2)
        self.filter_button.setObjectName("filter_button")
        self.gridlayout.addWidget(self.filter_button, 1, 2, 1, 1)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem1)
        self.delete_button = QtWidgets.QToolButton(TagListEditor)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(I("trash.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.delete_button.setIcon(icon3)
        self.delete_button.setIconSize(QtCore.QSize(32, 32))
        self.delete_button.setObjectName("delete_button")
        self.verticalLayout_2.addWidget(self.delete_button)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem2)
        self.rename_button = QtWidgets.QToolButton(TagListEditor)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(I("edit_input.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.rename_button.setIcon(icon4)
        self.rename_button.setIconSize(QtCore.QSize(32, 32))
        self.rename_button.setObjectName("rename_button")
        self.verticalLayout_2.addWidget(self.rename_button)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem3)
        self.undo_button = QtWidgets.QToolButton(TagListEditor)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(I("edit-undo.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.undo_button.setIcon(icon5)
        self.undo_button.setIconSize(QtCore.QSize(32, 32))
        self.undo_button.setObjectName("undo_button")
        self.verticalLayout_2.addWidget(self.undo_button)
        spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem4)
        self.gridlayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1)
        self.table = TleTableWidget(TagListEditor)
        self.table.setAlternatingRowColors(True)
        self.table.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
        self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.table.setObjectName("table")
        self.table.setColumnCount(0)
        self.table.setRowCount(0)
        self.gridlayout.addWidget(self.table, 2, 1, 1, 4)
        self.buttonBox = QtWidgets.QDialogButtonBox(TagListEditor)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridlayout.addWidget(self.buttonBox, 3, 0, 1, 5)
        self.label.setBuddy(self.search_box)
        self.label1.setBuddy(self.filter_box)

        self.retranslateUi(TagListEditor)
        self.buttonBox.accepted.connect(TagListEditor.accept) # type: ignore
        self.buttonBox.rejected.connect(TagListEditor.reject) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(TagListEditor)

    def retranslateUi(self, TagListEditor):

        TagListEditor.setWindowTitle(_("Category editor"))
        self.label.setText(_("&Search for:"))
        self.search_box.setToolTip(_("Search for an item in the first column"))
        self.search_button.setToolTip(_("Find items containing the search string"))
        self.search_button.setText(_("S&earch"))
        self.apply_vl_checkbox.setToolTip(_("<p>Show items only if they appear in the\n"
"          current Virtual library. Edits already done may be hidden but will\n"
"          not be forgotten.\n"
"          </p><p>\n"
"          Note that this box affects only what is displayed. Changes\n"
"          will affect all books in your library even if this box\n"
"          is checked.</p>"))
        self.apply_vl_checkbox.setText(_("Only show items in the current &Virtual library"))
        self.label1.setText(_("&Filter by:"))
        self.filter_box.setToolTip(_("Filter items using the text in this box"))
        self.filter_button.setToolTip(_("Show only items containing this text"))
        self.filter_button.setText(_("F&ilter"))
        self.delete_button.setToolTip(_("Delete selected items from the database. This will unapply the items from all books and then remove them from the database."))
        self.delete_button.setText(_("..."))
        self.delete_button.setShortcut(_("Ctrl+D"))
        self.rename_button.setToolTip(_("Rename the items in every book where they are used"))
        self.rename_button.setText(_("..."))
        self.rename_button.setShortcut(_("Ctrl+R"))
        self.undo_button.setToolTip(_("Undo any deletes or edits on the selected lines"))
        self.undo_button.setText(_("..."))
        self.undo_button.setShortcut(_("Ctrl+U"))
from calibre.gui2.dialogs.tag_list_editor_table_widget import TleTableWidget
from calibre.gui2.widgets import HistoryLineEdit

