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

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/dialogs/saved_search_editor.ui'
#
# Created by: PyQt5 UI code generator 5.9.1
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_SavedSearchEditor(object):
    def setupUi(self, SavedSearchEditor):
        SavedSearchEditor.setObjectName("SavedSearchEditor")
        SavedSearchEditor.resize(548, 148)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("chapters.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        SavedSearchEditor.setWindowIcon(icon)
        self.gridlayout = QtWidgets.QGridLayout(SavedSearchEditor)
        self.gridlayout.setObjectName("gridlayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(SavedSearchEditor)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(True)
        self.buttonBox.setObjectName("buttonBox")
        self.gridlayout.addWidget(self.buttonBox, 2, 0, 1, 2)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.box_label_1 = QtWidgets.QLabel(SavedSearchEditor)
        self.box_label_1.setObjectName("box_label_1")
        self.gridLayout.addWidget(self.box_label_1, 0, 1, 1, 1)
        self.box_label_2 = QtWidgets.QLabel(SavedSearchEditor)
        self.box_label_2.setObjectName("box_label_2")
        self.gridLayout.addWidget(self.box_label_2, 0, 4, 1, 1)
        self.box_label_11 = QtWidgets.QLabel(SavedSearchEditor)
        self.box_label_11.setObjectName("box_label_11")
        self.gridLayout.addWidget(self.box_label_11, 0, 5, 1, 1)
        self.box_label_12 = QtWidgets.QLabel(SavedSearchEditor)
        self.box_label_12.setObjectName("box_label_12")
        self.gridLayout.addWidget(self.box_label_12, 0, 6, 1, 1)
        self.label_3 = QtWidgets.QLabel(SavedSearchEditor)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
        self.label_3.setSizePolicy(sizePolicy)
        self.label_3.setMinimumSize(QtCore.QSize(100, 0))
        self.label_3.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1)
        self.search_name_box = QtWidgets.QComboBox(SavedSearchEditor)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(160)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.search_name_box.sizePolicy().hasHeightForWidth())
        self.search_name_box.setSizePolicy(sizePolicy)
        self.search_name_box.setMinimumSize(QtCore.QSize(145, 0))
        self.search_name_box.setEditable(False)
        self.search_name_box.setObjectName("search_name_box")
        self.gridLayout.addWidget(self.search_name_box, 1, 1, 1, 1)
        self.delete_search_button = QtWidgets.QToolButton(SavedSearchEditor)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(I("trash.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.delete_search_button.setIcon(icon1)
        self.delete_search_button.setObjectName("delete_search_button")
        self.gridLayout.addWidget(self.delete_search_button, 1, 2, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 1, 3, 1, 1)
        self.input_box = QtWidgets.QLineEdit(SavedSearchEditor)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(60)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.input_box.sizePolicy().hasHeightForWidth())
        self.input_box.setSizePolicy(sizePolicy)
        self.input_box.setObjectName("input_box")
        self.gridLayout.addWidget(self.input_box, 1, 4, 1, 1)
        self.hboxlayout = QtWidgets.QHBoxLayout()
        self.hboxlayout.setAlignment(QtCore.Qt.AlignCenter)
        self.hboxlayout.setObjectName("hboxlayout")
        self.add_search_button = QtWidgets.QToolButton(SavedSearchEditor)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(I("plus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.add_search_button.setIcon(icon2)
        self.add_search_button.setObjectName("add_search_button")
        self.hboxlayout.addWidget(self.add_search_button)
        self.gridLayout.addLayout(self.hboxlayout, 1, 5, 1, 1)
        self.hboxlayout1 = QtWidgets.QHBoxLayout()
        self.hboxlayout1.setAlignment(QtCore.Qt.AlignCenter)
        self.hboxlayout1.setObjectName("hboxlayout1")
        self.rename_button = QtWidgets.QToolButton(SavedSearchEditor)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(I("edit-undo.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.rename_button.setIcon(icon3)
        self.rename_button.setObjectName("rename_button")
        self.hboxlayout1.addWidget(self.rename_button)
        self.gridLayout.addLayout(self.hboxlayout1, 1, 6, 1, 1)
        self.gridlayout.addLayout(self.gridLayout, 0, 0, 1, 2)
        self.search_text = QtWidgets.QPlainTextEdit(SavedSearchEditor)
        self.search_text.setObjectName("search_text")
        self.gridlayout.addWidget(self.search_text, 1, 0, 1, 1)
        self.label_3.setBuddy(self.search_name_box)

        self.retranslateUi(SavedSearchEditor)
        self.buttonBox.accepted.connect(SavedSearchEditor.accept)
        self.buttonBox.rejected.connect(SavedSearchEditor.reject)
        QtCore.QMetaObject.connectSlotsByName(SavedSearchEditor)

    def retranslateUi(self, SavedSearchEditor):

        SavedSearchEditor.setWindowTitle(_("Saved search editor"))
        self.box_label_1.setText(_("Search to edit"))
        self.box_label_2.setText(_("New search name"))
        self.box_label_11.setText(_("Add"))
        self.box_label_12.setText(_("Rename"))
        self.label_3.setText(_("&Saved search: "))
        self.search_name_box.setToolTip(_("Select a saved search to edit"))
        self.delete_search_button.setToolTip(_("Delete this selected saved search"))
        self.delete_search_button.setText(_("..."))
        self.input_box.setToolTip(_("Enter a new saved search name."))
        self.add_search_button.setToolTip(_("Add a new, empty saved search with the name entered"))
        self.add_search_button.setText(_("..."))
        self.rename_button.setToolTip(_("Rename the current search to what is in the box"))
        self.rename_button.setText(_("..."))
        self.search_text.setToolTip(_("Change the contents of the saved search"))

