1
# -*- coding: utf-8 -*-
3
# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/preferences/search.ui'
5
# Created: Tue Feb 15 11:33:39 2011
6
# by: PyQt4 UI code generator 4.8.3
8
# WARNING! All changes made in this file will be lost!
10
from PyQt4 import QtCore, QtGui
13
_fromUtf8 = QtCore.QString.fromUtf8
14
except AttributeError:
15
_fromUtf8 = lambda s: s
17
class Ui_Form(object):
18
def setupUi(self, Form):
19
Form.setObjectName(_fromUtf8("Form"))
21
self.gridLayout = QtGui.QGridLayout(Form)
22
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
23
self.opt_search_as_you_type = QtGui.QCheckBox(Form)
24
self.opt_search_as_you_type.setObjectName(_fromUtf8("opt_search_as_you_type"))
25
self.gridLayout.addWidget(self.opt_search_as_you_type, 0, 0, 1, 1)
26
self.opt_highlight_search_matches = QtGui.QCheckBox(Form)
27
self.opt_highlight_search_matches.setObjectName(_fromUtf8("opt_highlight_search_matches"))
28
self.gridLayout.addWidget(self.opt_highlight_search_matches, 1, 0, 1, 1)
29
self.groupBox = QtGui.QGroupBox(Form)
30
self.groupBox.setObjectName(_fromUtf8("groupBox"))
31
self.gridLayout_2 = QtGui.QGridLayout(self.groupBox)
32
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
33
self.label = QtGui.QLabel(self.groupBox)
34
self.label.setWordWrap(True)
35
self.label.setObjectName(_fromUtf8("label"))
36
self.gridLayout_2.addWidget(self.label, 0, 0, 1, 2)
37
self.opt_limit_search_columns = QtGui.QCheckBox(self.groupBox)
38
self.opt_limit_search_columns.setObjectName(_fromUtf8("opt_limit_search_columns"))
39
self.gridLayout_2.addWidget(self.opt_limit_search_columns, 1, 0, 1, 2)
40
self.label_2 = QtGui.QLabel(self.groupBox)
41
self.label_2.setObjectName(_fromUtf8("label_2"))
42
self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1)
43
self.opt_limit_search_columns_to = MultiCompleteLineEdit(self.groupBox)
44
self.opt_limit_search_columns_to.setObjectName(_fromUtf8("opt_limit_search_columns_to"))
45
self.gridLayout_2.addWidget(self.opt_limit_search_columns_to, 2, 1, 1, 1)
46
self.label_3 = QtGui.QLabel(self.groupBox)
47
self.label_3.setWordWrap(True)
48
self.label_3.setObjectName(_fromUtf8("label_3"))
49
self.gridLayout_2.addWidget(self.label_3, 5, 0, 1, 2)
50
self.gridLayout.addWidget(self.groupBox, 2, 0, 1, 1)
51
self.clear_history_button = QtGui.QPushButton(Form)
52
self.clear_history_button.setObjectName(_fromUtf8("clear_history_button"))
53
self.gridLayout.addWidget(self.clear_history_button, 3, 0, 1, 1)
54
self.groupBox_2 = QtGui.QGroupBox(Form)
55
self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
56
self.gridLayout_3 = QtGui.QGridLayout(self.groupBox_2)
57
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
58
self.l12 = QtGui.QHBoxLayout()
59
self.l12.setObjectName(_fromUtf8("l12"))
60
self.la10 = QtGui.QLabel(self.groupBox_2)
61
self.la10.setObjectName(_fromUtf8("la10"))
62
self.l12.addWidget(self.la10)
63
self.gst_names = QtGui.QComboBox(self.groupBox_2)
64
self.gst_names.setEditable(True)
65
self.gst_names.setMinimumContentsLength(10)
66
self.gst_names.setObjectName(_fromUtf8("gst_names"))
67
self.l12.addWidget(self.gst_names)
68
self.gst_delete_button = QtGui.QToolButton(self.groupBox_2)
70
icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("trash.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
71
self.gst_delete_button.setIcon(icon)
72
self.gst_delete_button.setObjectName(_fromUtf8("gst_delete_button"))
73
self.l12.addWidget(self.gst_delete_button)
74
self.gst_value = MultiCompleteLineEdit(self.groupBox_2)
75
self.gst_value.setObjectName(_fromUtf8("gst_value"))
76
self.l12.addWidget(self.gst_value)
77
self.gst_save_button = QtGui.QToolButton(self.groupBox_2)
78
self.gst_save_button.setObjectName(_fromUtf8("gst_save_button"))
79
self.l12.addWidget(self.gst_save_button)
80
self.gridLayout_3.addLayout(self.l12, 0, 0, 1, 1)
81
self.gst_explanation = QtGui.QTextBrowser(self.groupBox_2)
82
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
83
sizePolicy.setHorizontalStretch(0)
84
sizePolicy.setVerticalStretch(100)
85
sizePolicy.setHeightForWidth(self.gst_explanation.sizePolicy().hasHeightForWidth())
86
self.gst_explanation.setSizePolicy(sizePolicy)
87
self.gst_explanation.setObjectName(_fromUtf8("gst_explanation"))
88
self.gridLayout_3.addWidget(self.gst_explanation, 0, 1, 3, 1)
89
self.hboxlayout = QtGui.QHBoxLayout()
90
self.hboxlayout.setObjectName(_fromUtf8("hboxlayout"))
91
self.l11 = QtGui.QLabel(self.groupBox_2)
92
self.l11.setObjectName(_fromUtf8("l11"))
93
self.hboxlayout.addWidget(self.l11)
94
self.opt_grouped_search_make_user_categories = MultiCompleteLineEdit(self.groupBox_2)
95
self.opt_grouped_search_make_user_categories.setObjectName(_fromUtf8("opt_grouped_search_make_user_categories"))
96
self.hboxlayout.addWidget(self.opt_grouped_search_make_user_categories)
97
self.gridLayout_3.addLayout(self.hboxlayout, 1, 0, 1, 1)
98
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
99
self.gridLayout_3.addItem(spacerItem, 2, 0, 1, 1)
100
self.gridLayout.addWidget(self.groupBox_2, 4, 0, 1, 1)
101
self.label_2.setBuddy(self.opt_limit_search_columns_to)
102
self.la10.setBuddy(self.gst_names)
103
self.l11.setBuddy(self.opt_grouped_search_make_user_categories)
105
self.retranslateUi(Form)
106
QtCore.QMetaObject.connectSlotsByName(Form)
108
def retranslateUi(self, Form):
109
Form.setWindowTitle(_("Form"))
110
self.opt_search_as_you_type.setText(_("Search as you &type"))
111
self.opt_highlight_search_matches.setText(_("&Highlight search results instead of restricting the book list to the results"))
112
self.groupBox.setTitle(_("What to search by default"))
113
self.label.setText(_("When you enter a search term without a prefix, by default calibre will search all metadata for matches. For example, entering, \"asimov\" will search not just authors but title/tags/series/comments/etc. Use these options if you would like to change this behavior."))
114
self.opt_limit_search_columns.setText(_("&Limit the searched metadata"))
115
self.label_2.setText(_("&Columns that non-prefixed searches are limited to:"))
116
self.label_3.setText(_("Note that this option affects all searches, including saved searches and restrictions. Therefore, if you use this option, it is best to ensure that you always use prefixes in your saved searches. For example, use \"series:Foundation\" rather than just \"Foundation\" in a saved search"))
117
self.clear_history_button.setToolTip(_("Clear search histories from all over calibre. Including the book list, e-book viewer, fetch news dialog, etc."))
118
self.clear_history_button.setText(_("Clear search &histories"))
119
self.groupBox_2.setTitle(_("Grouped Search Terms"))
120
self.la10.setText(_("&Names:"))
121
self.gst_names.setToolTip(_("Contains the names of the currently-defined group search terms.\n"
122
"Create a new name by entering it into the empty box, then\n"
123
"pressing Save. Rename a search term by selecting it then\n"
124
"changing the name and pressing Save. Change the value of\n"
125
"a search term by changing the value box then pressing Save."))
126
self.gst_delete_button.setToolTip(_("Delete the current search term"))
127
self.gst_delete_button.setText(_("..."))
128
self.gst_save_button.setToolTip(_("Save the current search term. You can rename a search term by\n"
129
"changing the name then pressing Save. You can change the value\n"
130
"of a search term by changing the value box then pressing Save."))
131
self.gst_save_button.setText(_("&Save"))
132
self.l11.setText(_("Make &user categories from:"))
133
self.opt_grouped_search_make_user_categories.setToolTip(_("Enter the names of any grouped search terms you wish\n"
134
"to be shown as user categories"))
136
from calibre.gui2.complete import MultiCompleteLineEdit