# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/preferences/look_feel_tabs/tb_display.ui'
#
# Created by: PyQt6 UI code generator 6.8.1
#
# 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 PyQt6 import QtCore, QtGui, QtWidgets


class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        self.verticalLayout_42 = QtWidgets.QGridLayout(Form)
        self.verticalLayout_42.setObjectName("verticalLayout_42")
        self.label = QtWidgets.QLabel(parent=Form)
        self.label.setObjectName("label")
        self.verticalLayout_42.addWidget(self.label, 0, 0, 1, 1)
        self.tb_display_order = ListViewWithMoveByKeyPress(parent=Form)
        self.tb_display_order.setMinimumSize(QtCore.QSize(0, 200))
        self.tb_display_order.setAlternatingRowColors(True)
        self.tb_display_order.setObjectName("tb_display_order")
        self.verticalLayout_42.addWidget(self.tb_display_order, 1, 0, 3, 1)
        self.tb_up_button = QtWidgets.QToolButton(parent=Form)
        icon = QtGui.QIcon.ic("arrow-up.png")
        self.tb_up_button.setIcon(icon)
        self.tb_up_button.setObjectName("tb_up_button")
        self.verticalLayout_42.addWidget(self.tb_up_button, 1, 1, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(50, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
        self.verticalLayout_42.addItem(spacerItem, 2, 1, 1, 1)
        self.tb_down_button = QtWidgets.QToolButton(parent=Form)
        icon1 = QtGui.QIcon.ic("arrow-down.png")
        self.tb_down_button.setIcon(icon1)
        self.tb_down_button.setObjectName("tb_down_button")
        self.verticalLayout_42.addWidget(self.tb_down_button, 3, 1, 1, 1)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.tb_reset_layout_button = QtWidgets.QPushButton(parent=Form)
        self.tb_reset_layout_button.setObjectName("tb_reset_layout_button")
        self.horizontalLayout_4.addWidget(self.tb_reset_layout_button)
        self.tb_import_layout_button = QtWidgets.QPushButton(parent=Form)
        self.tb_import_layout_button.setObjectName("tb_import_layout_button")
        self.horizontalLayout_4.addWidget(self.tb_import_layout_button)
        self.tb_export_layout_button = QtWidgets.QPushButton(parent=Form)
        self.tb_export_layout_button.setObjectName("tb_export_layout_button")
        self.horizontalLayout_4.addWidget(self.tb_export_layout_button)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem1)
        self.verticalLayout_42.addLayout(self.horizontalLayout_4, 4, 0, 1, 1)
        self.gridlayout_22 = QtWidgets.QGridLayout()
        self.gridlayout_22.setObjectName("gridlayout_22")
        self.opt_show_avg_rating = QtWidgets.QCheckBox(parent=Form)
        self.opt_show_avg_rating.setChecked(True)
        self.opt_show_avg_rating.setObjectName("opt_show_avg_rating")
        self.gridlayout_22.addWidget(self.opt_show_avg_rating, 0, 0, 1, 1)
        self.opt_show_links_in_tag_browser = QtWidgets.QCheckBox(parent=Form)
        self.opt_show_links_in_tag_browser.setChecked(True)
        self.opt_show_links_in_tag_browser.setObjectName("opt_show_links_in_tag_browser")
        self.gridlayout_22.addWidget(self.opt_show_links_in_tag_browser, 0, 1, 1, 1)
        self.opt_tag_browser_show_tooltips = QtWidgets.QCheckBox(parent=Form)
        self.opt_tag_browser_show_tooltips.setObjectName("opt_tag_browser_show_tooltips")
        self.gridlayout_22.addWidget(self.opt_tag_browser_show_tooltips, 0, 2, 1, 1)
        self.opt_tag_browser_show_counts = QtWidgets.QCheckBox(parent=Form)
        self.opt_tag_browser_show_counts.setObjectName("opt_tag_browser_show_counts")
        self.gridlayout_22.addWidget(self.opt_tag_browser_show_counts, 1, 0, 1, 1)
        self.opt_show_notes_in_tag_browser = QtWidgets.QCheckBox(parent=Form)
        self.opt_show_notes_in_tag_browser.setChecked(True)
        self.opt_show_notes_in_tag_browser.setObjectName("opt_show_notes_in_tag_browser")
        self.gridlayout_22.addWidget(self.opt_show_notes_in_tag_browser, 1, 1, 1, 1)
        self.opt_tag_browser_old_look = QtWidgets.QCheckBox(parent=Form)
        self.opt_tag_browser_old_look.setObjectName("opt_tag_browser_old_look")
        self.gridlayout_22.addWidget(self.opt_tag_browser_old_look, 1, 2, 1, 1)
        self.opt_tag_browser_hide_empty_categories = QtWidgets.QCheckBox(parent=Form)
        self.opt_tag_browser_hide_empty_categories.setObjectName("opt_tag_browser_hide_empty_categories")
        self.gridlayout_22.addWidget(self.opt_tag_browser_hide_empty_categories, 2, 0, 1, 1)
        self.opt_icons_on_right_in_tag_browser = QtWidgets.QCheckBox(parent=Form)
        self.opt_icons_on_right_in_tag_browser.setChecked(True)
        self.opt_icons_on_right_in_tag_browser.setObjectName("opt_icons_on_right_in_tag_browser")
        self.gridlayout_22.addWidget(self.opt_icons_on_right_in_tag_browser, 2, 1, 1, 1)
        self.opt_tag_browser_always_autocollapse = QtWidgets.QCheckBox(parent=Form)
        self.opt_tag_browser_always_autocollapse.setObjectName("opt_tag_browser_always_autocollapse")
        self.gridlayout_22.addWidget(self.opt_tag_browser_always_autocollapse, 2, 2, 1, 1)
        self.opt_tag_browser_restore_tree_expansion = QtWidgets.QCheckBox(parent=Form)
        self.opt_tag_browser_restore_tree_expansion.setObjectName("opt_tag_browser_restore_tree_expansion")
        self.gridlayout_22.addWidget(self.opt_tag_browser_restore_tree_expansion, 3, 0, 1, 1)
        self.verticalLayout_42.addLayout(self.gridlayout_22, 5, 0, 1, 3)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.opt_tag_browser_allow_keyboard_focus = QtWidgets.QCheckBox(parent=Form)
        self.opt_tag_browser_allow_keyboard_focus.setObjectName("opt_tag_browser_allow_keyboard_focus")
        self.verticalLayout.addWidget(self.opt_tag_browser_allow_keyboard_focus)
        self.tb_focus_label = QtWidgets.QLabel(parent=Form)
        self.tb_focus_label.setStyleSheet("margin-left: 1.5em")
        self.tb_focus_label.setWordWrap(True)
        self.tb_focus_label.setObjectName("tb_focus_label")
        self.verticalLayout.addWidget(self.tb_focus_label)
        self.verticalLayout_42.addLayout(self.verticalLayout, 8, 0, 1, 3)
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.FieldGrowthPolicy.ExpandingFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.label1 = QtWidgets.QLabel(parent=Form)
        self.label1.setObjectName("label1")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label1)
        self.opt_tag_browser_item_padding = QtWidgets.QDoubleSpinBox(parent=Form)
        self.opt_tag_browser_item_padding.setDecimals(1)
        self.opt_tag_browser_item_padding.setMinimum(-1.0)
        self.opt_tag_browser_item_padding.setMaximum(2.0)
        self.opt_tag_browser_item_padding.setSingleStep(0.1)
        self.opt_tag_browser_item_padding.setObjectName("opt_tag_browser_item_padding")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.opt_tag_browser_item_padding)
        self.verticalLayout_42.addLayout(self.formLayout, 10, 0, 1, 3)
        self.label.setBuddy(self.tb_display_order)
        self.label1.setBuddy(self.opt_tag_browser_item_padding)

        self.retranslateUi(Form)
        self.opt_tag_browser_allow_keyboard_focus.toggled['bool'].connect(self.tb_focus_label.setVisible) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):

        self.label.setToolTip(_("User categories and Saved searches cannot be moved"))
        self.label.setText(_("Select the categories to display in the Tag browser, and their &order"))
        self.tb_up_button.setToolTip(_("Move up. User categories and Saved searches cannot be moved. Keyboard shortcut: Ctrl-Up arrow"))
        self.tb_down_button.setToolTip(_("Move down. User categories and Saved searches cannot be moved. Keyboard shortcut: Ctrl-Down arrow"))
        self.tb_reset_layout_button.setToolTip(_("Click this button to reset the list to its default order."))
        self.tb_reset_layout_button.setText(_("Reset list"))
        self.tb_import_layout_button.setToolTip(_("<p>Click this button to set the list to one\n"
"previously exported. This could be useful if you have several libraries with\n"
"similar structure and you want to use the same column order for each one. Columns\n"
"in the imported list that aren\'t in the current library are ignored. Columns in\n"
"the library that are not in the imported list are put at the end and marked\n"
"as displayable.</p>"))
        self.tb_import_layout_button.setText(_("Import list"))
        self.tb_export_layout_button.setToolTip(_("<p>Click this button to write the current display\n"
"settings to a file. This could be useful if you have several libraries with similar\n"
"structure and you want to use the same column order for each one.</p>"))
        self.tb_export_layout_button.setText(_("Export list"))
        self.opt_show_avg_rating.setToolTip(_("Show the average rating per item indication in the Tag browser"))
        self.opt_show_avg_rating.setText(_("Show &average ratings"))
        self.opt_show_links_in_tag_browser.setToolTip(_("Show an icon if the item has an attached link"))
        self.opt_show_links_in_tag_browser.setText(_("Show &links icons"))
        self.opt_tag_browser_show_tooltips.setText(_("Show &tooltips"))
        self.opt_tag_browser_show_counts.setToolTip(_("<p>Show counts for items in the Tag browser. Such as the number of books\n"
"by each author, the number of authors, etc. If you turn it off, you can still\n"
"see the counts by hovering your mouse over any item.</p>"))
        self.opt_tag_browser_show_counts.setText(_("Show &counts"))
        self.opt_show_notes_in_tag_browser.setToolTip(_("Show an icon if the item has an attached note"))
        self.opt_show_notes_in_tag_browser.setText(_("Show &notes icons"))
        self.opt_tag_browser_old_look.setText(_("Use &alternating row colors"))
        self.opt_tag_browser_hide_empty_categories.setToolTip(_("<p>When checked, calibre will automatically hide any category\n"
"(a column, custom or standard) that has no items to show. For example, some\n"
"categories might not have values when using Virtual libraries. Checking this\n"
"box will cause these empty categories to be hidden.</p>"))
        self.opt_tag_browser_hide_empty_categories.setText(_("Hide empt&y categories (columns)"))
        self.opt_icons_on_right_in_tag_browser.setToolTip(_("If checked the notes and links icons will be placed at the right, after\n"
"the count and in columns. If unchecked, the icons will be placed immediately after the text,\n"
"to the left of the count and not in columns."))
        self.opt_icons_on_right_in_tag_browser.setText(_("Place icons on the &right, in columns"))
        self.opt_tag_browser_always_autocollapse.setToolTip(_("<p>When checked, Find in the Tag browser will show all items\n"
"that match the search instead of the first one. If Hide empty categories is\n"
"also checked then only categories containing a matched item will be shown.</p>"))
        self.opt_tag_browser_always_autocollapse.setText(_("Find &shows all items that match"))
        self.opt_tag_browser_restore_tree_expansion.setToolTip(_("<p>Ensure the last \"used\" item in the Tag browser is visible when opening a library.\n"
"An item is \"used\" when it is expanded, collapsed, or clicked.</p>"))
        self.opt_tag_browser_restore_tree_expansion.setText(_("Expand tr&ee to show last used item"))
        self.opt_tag_browser_allow_keyboard_focus.setToolTip(_("<p>When checked, the Tag browser can get keyboard focus, allowing\n"
"use of the keyboard to navigate the tree using the arrow keys. The Enter key simulates\n"
"a click on the selected item. The keyboard shortcut \'Tag browser /\n"
"Give the Tag browser keyboard focus\' changes the keyboard focus without\n"
"using the mouse.</p>"))
        self.opt_tag_browser_allow_keyboard_focus.setText(_("Allow the Tag browser to have keyboard &focus"))
        self.tb_focus_label.setText(_("<p style=\"text-indent: 2em; font-size:smaller\">\n"
"If you enable this option then you should set a keyboard shortcut to\n"
"focus the Tag browser under\n"
"<code>Preferences-&gt;Shortcuts-&gt;Tag browser-&gt;Give\n"
"the Tag browser keyboard focus</code></p>"))
        self.label1.setText(_("Spacing between &items:"))
        self.opt_tag_browser_item_padding.setToolTip(_("<p>The spacing between consecutive items in the Tag browser.\n"
"In units of (ex) which is the approximate height of the letter \'x\' in the\n"
"currently used font.</p>"))
        self.opt_tag_browser_item_padding.setSuffix(_("ex"))
from calibre.gui2.preferences import ListViewWithMoveByKeyPress
