mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Preferences UI for configuring emblems to be displayed in the cover grid, next to covers
This commit is contained in:
parent
de26f1e9a3
commit
ba07a4c5f9
@ -407,6 +407,7 @@ class DB(object):
|
|||||||
defs['categories_using_hierarchy'] = []
|
defs['categories_using_hierarchy'] = []
|
||||||
defs['column_color_rules'] = []
|
defs['column_color_rules'] = []
|
||||||
defs['column_icon_rules'] = []
|
defs['column_icon_rules'] = []
|
||||||
|
defs['cover_grid_icon_rules'] = []
|
||||||
defs['grouped_search_make_user_categories'] = []
|
defs['grouped_search_make_user_categories'] = []
|
||||||
defs['similar_authors_search_key'] = 'authors'
|
defs['similar_authors_search_key'] = 'authors'
|
||||||
defs['similar_authors_match_kind'] = 'match_any'
|
defs['similar_authors_match_kind'] = 'match_any'
|
||||||
|
@ -278,24 +278,31 @@ class ConditionEditor(QWidget): # {{{
|
|||||||
|
|
||||||
class RuleEditor(QDialog): # {{{
|
class RuleEditor(QDialog): # {{{
|
||||||
|
|
||||||
|
@property
|
||||||
|
def doing_multiple(self):
|
||||||
|
return hasattr(self, 'multiple_icon_cb') and self.multiple_icon_cb.isChecked()
|
||||||
|
|
||||||
def __init__(self, fm, pref_name, parent=None):
|
def __init__(self, fm, pref_name, parent=None):
|
||||||
QDialog.__init__(self, parent)
|
QDialog.__init__(self, parent)
|
||||||
self.fm = fm
|
self.fm = fm
|
||||||
|
|
||||||
if pref_name == 'column_color_rules':
|
if pref_name == 'column_color_rules':
|
||||||
self.rule_kind = 'color'
|
self.rule_kind = 'color'
|
||||||
rule_text = _('coloring')
|
rule_text = _('column coloring')
|
||||||
else:
|
elif pref_name == 'column_icon_rules':
|
||||||
self.rule_kind = 'icon'
|
self.rule_kind = 'icon'
|
||||||
rule_text = _('icon')
|
rule_text = _('column icon')
|
||||||
|
elif pref_name == 'cover_grid_icon_rules':
|
||||||
|
self.rule_kind = 'emblem'
|
||||||
|
rule_text = _('cover grid emblem')
|
||||||
|
|
||||||
self.setWindowIcon(QIcon(I('format-fill-color.png')))
|
self.setWindowIcon(QIcon(I('format-fill-color.png')))
|
||||||
self.setWindowTitle(_('Create/edit a column {0} rule').format(rule_text))
|
self.setWindowTitle(_('Create/edit a {0} rule').format(rule_text))
|
||||||
|
|
||||||
self.l = l = QGridLayout(self)
|
self.l = l = QGridLayout(self)
|
||||||
self.setLayout(l)
|
self.setLayout(l)
|
||||||
|
|
||||||
self.l1 = l1 = QLabel(_('Create a column {0} rule by'
|
self.l1 = l1 = QLabel(_('Create a {0} rule by'
|
||||||
' filling in the boxes below'.format(rule_text)))
|
' filling in the boxes below'.format(rule_text)))
|
||||||
l.addWidget(l1, 0, 0, 1, 8)
|
l.addWidget(l1, 0, 0, 1, 8)
|
||||||
|
|
||||||
@ -303,12 +310,12 @@ class RuleEditor(QDialog): # {{{
|
|||||||
self.f1.setFrameShape(QFrame.HLine)
|
self.f1.setFrameShape(QFrame.HLine)
|
||||||
l.addWidget(self.f1, 1, 0, 1, 8)
|
l.addWidget(self.f1, 1, 0, 1, 8)
|
||||||
|
|
||||||
self.l2 = l2 = QLabel(_('Set the'))
|
self.l2 = l2 = QLabel(_('Add the emblem:') if self.rule_kind == 'emblem' else _('Set the'))
|
||||||
l.addWidget(l2, 2, 0)
|
l.addWidget(l2, 2, 0)
|
||||||
|
|
||||||
if self.rule_kind == 'color':
|
if self.rule_kind == 'color':
|
||||||
l.addWidget(QLabel(_('color')))
|
l.addWidget(QLabel(_('color')))
|
||||||
else:
|
elif self.rule_kind == 'icon':
|
||||||
self.kind_box = QComboBox(self)
|
self.kind_box = QComboBox(self)
|
||||||
for tt, t in icon_rule_kinds:
|
for tt, t in icon_rule_kinds:
|
||||||
self.kind_box.addItem(tt, t)
|
self.kind_box.addItem(tt, t)
|
||||||
@ -317,6 +324,8 @@ class RuleEditor(QDialog): # {{{
|
|||||||
'If you choose composed icons and multiple rules match, then all the'
|
'If you choose composed icons and multiple rules match, then all the'
|
||||||
' matching icons will be combined, otherwise the icon from the'
|
' matching icons will be combined, otherwise the icon from the'
|
||||||
' first rule to match will be used.')))
|
' first rule to match will be used.')))
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
self.l3 = l3 = QLabel(_('of the column:'))
|
self.l3 = l3 = QLabel(_('of the column:'))
|
||||||
l.addWidget(l3, 2, 2)
|
l.addWidget(l3, 2, 2)
|
||||||
@ -326,17 +335,12 @@ class RuleEditor(QDialog): # {{{
|
|||||||
|
|
||||||
self.l4 = l4 = QLabel(_('to'))
|
self.l4 = l4 = QLabel(_('to'))
|
||||||
l.addWidget(l4, 2, 4)
|
l.addWidget(l4, 2, 4)
|
||||||
|
if self.rule_kind == 'emblem':
|
||||||
|
l3.setVisible(False), self.column_box.setVisible(False), l4.setVisible(False)
|
||||||
|
|
||||||
if self.rule_kind == 'color':
|
def create_filename_box(folder='cc_icons'):
|
||||||
self.color_box = ColorButton(parent=self)
|
|
||||||
self.color_label = QLabel('Sample text Sample text')
|
|
||||||
self.color_label.setTextFormat(Qt.RichText)
|
|
||||||
l.addWidget(self.color_box, 2, 5)
|
|
||||||
l.addWidget(self.color_label, 2, 6)
|
|
||||||
l.addItem(QSpacerItem(10, 10, QSizePolicy.Expanding), 2, 7)
|
|
||||||
else:
|
|
||||||
self.filename_box = QComboBox()
|
self.filename_box = QComboBox()
|
||||||
d = os.path.join(config_dir, 'cc_icons')
|
d = os.path.join(config_dir, folder)
|
||||||
self.icon_file_names = []
|
self.icon_file_names = []
|
||||||
if os.path.exists(d):
|
if os.path.exists(d):
|
||||||
for icon_file in os.listdir(d):
|
for icon_file in os.listdir(d):
|
||||||
@ -346,6 +350,25 @@ class RuleEditor(QDialog): # {{{
|
|||||||
self.icon_file_names.append(icon_file)
|
self.icon_file_names.append(icon_file)
|
||||||
self.icon_file_names.sort(key=sort_key)
|
self.icon_file_names.sort(key=sort_key)
|
||||||
|
|
||||||
|
if self.rule_kind == 'color':
|
||||||
|
self.color_box = ColorButton(parent=self)
|
||||||
|
self.color_label = QLabel('Sample text Sample text')
|
||||||
|
self.color_label.setTextFormat(Qt.RichText)
|
||||||
|
l.addWidget(self.color_box, 2, 5)
|
||||||
|
l.addWidget(self.color_label, 2, 6)
|
||||||
|
l.addItem(QSpacerItem(10, 10, QSizePolicy.Expanding), 2, 7)
|
||||||
|
elif self.rule_kind == 'emblem':
|
||||||
|
create_filename_box()
|
||||||
|
self.update_filename_box()
|
||||||
|
self.filename_button = QPushButton(QIcon(I('document_open.png')),
|
||||||
|
_('&Add new image'))
|
||||||
|
l.addWidget(self.filename_box)
|
||||||
|
l.addWidget(self.filename_button, 2, 6)
|
||||||
|
l.addWidget(QLabel(_('(Images should be square-ish)')), 2, 7)
|
||||||
|
l.setColumnStretch(7, 10)
|
||||||
|
else:
|
||||||
|
create_filename_box()
|
||||||
|
|
||||||
vb = QVBoxLayout()
|
vb = QVBoxLayout()
|
||||||
self.multiple_icon_cb = QCheckBox(_('Choose more than one icon'))
|
self.multiple_icon_cb = QCheckBox(_('Choose more than one icon'))
|
||||||
vb.addWidget(self.multiple_icon_cb)
|
vb.addWidget(self.multiple_icon_cb)
|
||||||
@ -420,7 +443,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
self.update_icon_filenames_in_box()
|
self.update_icon_filenames_in_box()
|
||||||
|
|
||||||
def update_filename_box(self):
|
def update_filename_box(self):
|
||||||
doing_multiple = self.multiple_icon_cb.isChecked()
|
doing_multiple = self.doing_multiple
|
||||||
|
|
||||||
model = QStandardItemModel()
|
model = QStandardItemModel()
|
||||||
self.filename_box.setModel(model)
|
self.filename_box.setModel(model)
|
||||||
@ -477,7 +500,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
except:
|
except:
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
if self.multiple_icon_cb.isChecked():
|
if self.doing_multiple:
|
||||||
if icon_name not in self.rule_icon_files:
|
if icon_name not in self.rule_icon_files:
|
||||||
self.rule_icon_files.append(icon_name)
|
self.rule_icon_files.append(icon_name)
|
||||||
self.update_icon_filenames_in_box()
|
self.update_icon_filenames_in_box()
|
||||||
@ -490,7 +513,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
return
|
return
|
||||||
|
|
||||||
def get_filenames_from_box(self):
|
def get_filenames_from_box(self):
|
||||||
if self.multiple_icon_cb.isChecked():
|
if self.doing_multiple:
|
||||||
model = self.filename_box.model()
|
model = self.filename_box.model()
|
||||||
fnames = []
|
fnames = []
|
||||||
for i in range(1, model.rowCount()):
|
for i in range(1, model.rowCount()):
|
||||||
@ -504,7 +527,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
|
|
||||||
def update_icon_filenames_in_box(self):
|
def update_icon_filenames_in_box(self):
|
||||||
if self.rule_icon_files:
|
if self.rule_icon_files:
|
||||||
if not self.multiple_icon_cb.isChecked():
|
if not self.doing_multiple:
|
||||||
idx = self.filename_box.findText(self.rule_icon_files[0])
|
idx = self.filename_box.findText(self.rule_icon_files[0])
|
||||||
if idx >= 0:
|
if idx >= 0:
|
||||||
self.filename_box.setCurrentIndex(idx)
|
self.filename_box.setCurrentIndex(idx)
|
||||||
@ -528,6 +551,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
if rule.color:
|
if rule.color:
|
||||||
self.color_box.color = rule.color
|
self.color_box.color = rule.color
|
||||||
else:
|
else:
|
||||||
|
if self.rule_kind == 'icon':
|
||||||
for i, tup in enumerate(icon_rule_kinds):
|
for i, tup in enumerate(icon_rule_kinds):
|
||||||
if kind == tup[1]:
|
if kind == tup[1]:
|
||||||
self.kind_box.setCurrentIndex(i)
|
self.kind_box.setCurrentIndex(i)
|
||||||
@ -602,7 +626,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
kind = unicode(self.kind_box.itemData(
|
kind = unicode(self.kind_box.itemData(
|
||||||
self.kind_box.currentIndex()).toString())
|
self.kind_box.currentIndex()).toString())
|
||||||
else:
|
else:
|
||||||
kind = 'color'
|
kind = self.rule_kind
|
||||||
|
|
||||||
return kind, col, r
|
return kind, col, r
|
||||||
# }}}
|
# }}}
|
||||||
@ -761,8 +785,8 @@ class RulesModel(QAbstractListModel): # {{{
|
|||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
return (
|
return (
|
||||||
_('<li>If the <b>%(col)s</b> column <b>%(action)s</b> value: <b>%(val)s</b>') %
|
_('<li>If the <b>%(col)s</b> column <b>%(action)s</b> value: <b>%(val)s</b>') % dict(
|
||||||
dict(col=c, action=action_name, val=prepare_string_for_xml(v)))
|
col=c, action=action_name, val=prepare_string_for_xml(v)))
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
@ -824,20 +848,27 @@ class EditRules(QWidget): # {{{
|
|||||||
self.fm = fm
|
self.fm = fm
|
||||||
self.mi = mi
|
self.mi = mi
|
||||||
if pref_name == 'column_color_rules':
|
if pref_name == 'column_color_rules':
|
||||||
self.l1.setText('<p>'+_(
|
text = _(
|
||||||
'You can control the color of columns in the'
|
'You can control the color of columns in the'
|
||||||
' book list by creating "rules" that tell calibre'
|
' book list by creating "rules" that tell calibre'
|
||||||
' what color to use. Click the Add Rule button below'
|
' what color to use. Click the Add Rule button below'
|
||||||
' to get started.<p>You can <b>change an existing rule</b> by'
|
' to get started.<p>You can <b>change an existing rule</b> by'
|
||||||
' double clicking it.'))
|
' double clicking it.')
|
||||||
else:
|
elif pref_name == 'column_icon_rules':
|
||||||
self.l1.setText('<p>'+_(
|
text = _(
|
||||||
'You can add icons to columns in the'
|
'You can add icons to columns in the'
|
||||||
' book list by creating "rules" that tell calibre'
|
' book list by creating "rules" that tell calibre'
|
||||||
' what icon to use. Click the Add Rule button below'
|
' what icon to use. Click the Add Rule button below'
|
||||||
' to get started.<p>You can <b>change an existing rule</b> by'
|
' to get started.<p>You can <b>change an existing rule</b> by'
|
||||||
' double clicking it.'))
|
' double clicking it.')
|
||||||
|
elif pref_name == 'cover_grid_icon_rules':
|
||||||
|
text = _('You can add emblems (small icons) that are displayed on the side of covers'
|
||||||
|
' in the cover grid by creating "rules" that tell calibre'
|
||||||
|
' what image to use. Click the Add Rule button below'
|
||||||
|
' to get started.<p>You can <b>change an existing rule</b> by'
|
||||||
|
' double clicking it.')
|
||||||
# self.add_advanced_button.setVisible(False)
|
# self.add_advanced_button.setVisible(False)
|
||||||
|
self.l1.setText('<p>'+ text)
|
||||||
|
|
||||||
def add_rule(self):
|
def add_rule(self):
|
||||||
d = RuleEditor(self.model.fm, self.pref_name)
|
d = RuleEditor(self.model.fm, self.pref_name)
|
||||||
|
@ -11,7 +11,7 @@ from functools import partial
|
|||||||
from PyQt4.Qt import (
|
from PyQt4.Qt import (
|
||||||
QApplication, QFont, QFontInfo, QFontDialog, QColorDialog, QPainter,
|
QApplication, QFont, QFontInfo, QFontDialog, QColorDialog, QPainter,
|
||||||
QAbstractListModel, Qt, QIcon, QKeySequence, QColor, pyqtSignal,
|
QAbstractListModel, Qt, QIcon, QKeySequence, QColor, pyqtSignal,
|
||||||
QWidget, QSizePolicy, QBrush, QPixmap, QSize, QPushButton)
|
QWidget, QSizePolicy, QBrush, QPixmap, QSize, QPushButton, QVBoxLayout)
|
||||||
|
|
||||||
from calibre import human_readable
|
from calibre import human_readable
|
||||||
from calibre.gui2.preferences import ConfigWidgetBase, test_widget, CommaSeparatedList
|
from calibre.gui2.preferences import ConfigWidgetBase, test_widget, CommaSeparatedList
|
||||||
@ -240,6 +240,11 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
self.tabWidget.addTab(self.icon_rules,
|
self.tabWidget.addTab(self.icon_rules,
|
||||||
QIcon(I('icon_choose.png')), _('Column icons'))
|
QIcon(I('icon_choose.png')), _('Column icons'))
|
||||||
|
|
||||||
|
self.grid_rules = EditRules(self.emblems_tab)
|
||||||
|
self.grid_rules.changed.connect(self.changed_signal)
|
||||||
|
self.emblems_tab.setLayout(QVBoxLayout())
|
||||||
|
self.emblems_tab.layout().addWidget(self.grid_rules)
|
||||||
|
|
||||||
self.tabWidget.setCurrentIndex(0)
|
self.tabWidget.setCurrentIndex(0)
|
||||||
keys = [QKeySequence('F11', QKeySequence.PortableText), QKeySequence(
|
keys = [QKeySequence('F11', QKeySequence.PortableText), QKeySequence(
|
||||||
'Ctrl+Shift+F', QKeySequence.PortableText)]
|
'Ctrl+Shift+F', QKeySequence.PortableText)]
|
||||||
@ -320,6 +325,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
mi=None
|
mi=None
|
||||||
self.edit_rules.initialize(db.field_metadata, db.prefs, mi, 'column_color_rules')
|
self.edit_rules.initialize(db.field_metadata, db.prefs, mi, 'column_color_rules')
|
||||||
self.icon_rules.initialize(db.field_metadata, db.prefs, mi, 'column_icon_rules')
|
self.icon_rules.initialize(db.field_metadata, db.prefs, mi, 'column_icon_rules')
|
||||||
|
self.grid_rules.initialize(db.field_metadata, db.prefs, mi, 'cover_grid_icon_rules')
|
||||||
self.set_cg_color(gprefs['cover_grid_color'])
|
self.set_cg_color(gprefs['cover_grid_color'])
|
||||||
self.set_cg_texture(gprefs['cover_grid_texture'])
|
self.set_cg_texture(gprefs['cover_grid_texture'])
|
||||||
self.update_aspect_ratio()
|
self.update_aspect_ratio()
|
||||||
@ -365,6 +371,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
self.display_model.restore_defaults()
|
self.display_model.restore_defaults()
|
||||||
self.edit_rules.clear()
|
self.edit_rules.clear()
|
||||||
self.icon_rules.clear()
|
self.icon_rules.clear()
|
||||||
|
self.grid_rules.clear()
|
||||||
self.changed_signal.emit()
|
self.changed_signal.emit()
|
||||||
self.set_cg_color(gprefs.defaults['cover_grid_color'])
|
self.set_cg_color(gprefs.defaults['cover_grid_color'])
|
||||||
self.set_cg_texture(gprefs.defaults['cover_grid_texture'])
|
self.set_cg_texture(gprefs.defaults['cover_grid_texture'])
|
||||||
@ -453,6 +460,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
self.display_model.commit()
|
self.display_model.commit()
|
||||||
self.edit_rules.commit(self.gui.current_db.prefs)
|
self.edit_rules.commit(self.gui.current_db.prefs)
|
||||||
self.icon_rules.commit(self.gui.current_db.prefs)
|
self.icon_rules.commit(self.gui.current_db.prefs)
|
||||||
|
self.grid_rules.commit(self.gui.current_db.prefs)
|
||||||
gprefs['cover_grid_color'] = tuple(self.cg_bg_widget.bcol.getRgb())[:3]
|
gprefs['cover_grid_color'] = tuple(self.cg_bg_widget.bcol.getRgb())[:3]
|
||||||
gprefs['cover_grid_texture'] = self.cg_bg_widget.btex
|
gprefs['cover_grid_texture'] = self.cg_bg_widget.btex
|
||||||
return rr
|
return rr
|
||||||
|
@ -232,6 +232,19 @@
|
|||||||
<string>Cover Grid</string>
|
<string>Cover Grid</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="tabWidget_2">
|
||||||
|
<property name="tabPosition">
|
||||||
|
<enum>QTabWidget::West</enum>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_5">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Main</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_19">
|
<widget class="QLabel" name="label_19">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -480,49 +493,37 @@ A value of zero means calculate automatically.</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>170</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="emblems_tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Emblems</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_6">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Performance</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Caching of covers for improved performance</string>
|
<string>Caching of covers for improved performance</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0" colspan="5">
|
|
||||||
<widget class="QLabel" name="label_13">
|
|
||||||
<property name="text">
|
|
||||||
<string>There are two kinds of caches that calibre uses to improve performance when rendering covers in the grid view. A disk cache that is kept on your hard disk and stores the cover thumbnails and an in memory cache used to ensure flicker free rendering of covers. For best results, keep the memory cache small and the disk cache large, unless you have a lot of extra RAM in your computer and dont mind it being used by the memory cache.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_15">
|
|
||||||
<property name="text">
|
|
||||||
<string>Number of covers to cache in &memory (keep this small):</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>opt_cover_grid_cache_size</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QSpinBox" name="opt_cover_grid_cache_size">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>The maximum number of covers to keep in memory. Increasing this will make rendering faster, at the cost of more memory usage.</string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>50000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_18">
|
|
||||||
<property name="text">
|
|
||||||
<string>Maximum amount of disk space to use for caching thumbnails: </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="QSpinBox" name="opt_cover_grid_disk_cache_size">
|
<widget class="QSpinBox" name="opt_cover_grid_disk_cache_size">
|
||||||
<property name="specialValueText">
|
<property name="specialValueText">
|
||||||
@ -539,33 +540,6 @@ A value of zero means calculate automatically.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="3" colspan="2">
|
|
||||||
<widget class="QLabel" name="cover_grid_current_disk_cache">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QPushButton" name="cover_grid_empty_cache">
|
|
||||||
<property name="text">
|
|
||||||
<string>Empty disk cache</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2" colspan="3">
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>310</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QPushButton" name="cover_grid_open_cache">
|
<widget class="QPushButton" name="cover_grid_open_cache">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -586,11 +560,72 @@ A value of zero means calculate automatically.</string>
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="0" column="0" colspan="5">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>There are two kinds of caches that calibre uses to improve performance when rendering covers in the grid view. A disk cache that is kept on your hard disk and stores the cover thumbnails and an in memory cache used to ensure flicker free rendering of covers. For best results, keep the memory cache small and the disk cache large, unless you have a lot of extra RAM in your computer and dont mind it being used by the memory cache.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="3" colspan="2">
|
||||||
<spacer name="verticalSpacer">
|
<widget class="QLabel" name="cover_grid_current_disk_cache">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2" colspan="3">
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>310</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>Number of covers to cache in &memory (keep this small):</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>opt_cover_grid_cache_size</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string>Maximum amount of disk space to use for caching thumbnails: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QPushButton" name="cover_grid_empty_cache">
|
||||||
|
<property name="text">
|
||||||
|
<string>Empty disk cache</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QSpinBox" name="opt_cover_grid_cache_size">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The maximum number of covers to keep in memory. Increasing this will make rendering faster, at the cost of more memory usage.</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>50000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -604,6 +639,13 @@ A value of zero means calculate automatically.</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<widget class="QWidget" name="tab_4">
|
<widget class="QWidget" name="tab_4">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../../../../resources/images.qrc">
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user