本文整理匯總了Python中calibre.gui2.tag_browser.ui.TagBrowserMixin.init_tag_browser_mixin方法的典型用法代碼示例。如果您正苦於以下問題:Python TagBrowserMixin.init_tag_browser_mixin方法的具體用法?Python TagBrowserMixin.init_tag_browser_mixin怎麽用?Python TagBrowserMixin.init_tag_browser_mixin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類calibre.gui2.tag_browser.ui.TagBrowserMixin
的用法示例。
在下文中一共展示了TagBrowserMixin.init_tag_browser_mixin方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: initialize
# 需要導入模塊: from calibre.gui2.tag_browser.ui import TagBrowserMixin [as 別名]
# 或者: from calibre.gui2.tag_browser.ui.TagBrowserMixin import init_tag_browser_mixin [as 別名]
#.........這裏部分代碼省略.........
# ###################### Search boxes ########################
SearchRestrictionMixin.init_search_restirction_mixin(self)
SavedSearchBoxMixin.init_saved_seach_box_mixin(self)
# ###################### Library view ########################
LibraryViewMixin.init_library_view_mixin(self, db)
SearchBoxMixin.init_search_box_mixin(self) # Requires current_db
if show_gui:
self.show()
if self.system_tray_icon is not None and self.system_tray_icon.isVisible() and opts.start_in_tray:
self.hide_windows()
self.library_view.model().count_changed_signal.connect(
self.iactions['Choose Library'].count_changed)
if not gprefs.get('quick_start_guide_added', False):
try:
add_quick_start_guide(self.library_view)
except:
import traceback
traceback.print_exc()
for view in ('library', 'memory', 'card_a', 'card_b'):
v = getattr(self, '%s_view' % view)
v.selectionModel().selectionChanged.connect(self.update_status_bar)
v.model().count_changed_signal.connect(self.update_status_bar)
self.library_view.model().count_changed()
self.bars_manager.database_changed(self.library_view.model().db)
self.library_view.model().database_changed.connect(self.bars_manager.database_changed,
type=Qt.QueuedConnection)
# ########################## Tags Browser ##############################
TagBrowserMixin.init_tag_browser_mixin(self, db)
# ######################## Search Restriction ##########################
if db.prefs['virtual_lib_on_startup']:
self.apply_virtual_library(db.prefs['virtual_lib_on_startup'])
self.rebuild_vl_tabs()
# ########################## Cover Flow ################################
CoverFlowMixin.init_cover_flow_mixin(self)
self._calculated_available_height = min(max_available_height()-15,
self.height())
self.resize(self.width(), self._calculated_available_height)
self.build_context_menus()
for ac in self.iactions.values():
try:
ac.gui_layout_complete()
except:
import traceback
traceback.print_exc()
if ac.plugin_path is None:
raise
if config['autolaunch_server']:
self.start_content_server()
self.keyboard_interrupt.connect(self.quit, type=Qt.QueuedConnection)
self.read_settings()
self.finalize_layout()
示例2: initialize
# 需要導入模塊: from calibre.gui2.tag_browser.ui import TagBrowserMixin [as 別名]
# 或者: from calibre.gui2.tag_browser.ui.TagBrowserMixin import init_tag_browser_mixin [as 別名]
#.........這裏部分代碼省略.........
self.location_manager.update_device_metadata.connect(self.update_metadata_on_device)
self.eject_action.triggered.connect(self.device_manager.umount_device)
# ################### Update notification ###################
UpdateMixin.init_update_mixin(self, opts)
# ###################### Search boxes ########################
SearchRestrictionMixin.init_search_restriction_mixin(self)
SavedSearchBoxMixin.init_saved_seach_box_mixin(self)
# ###################### Library view ########################
LibraryViewMixin.init_library_view_mixin(self, db)
SearchBoxMixin.init_search_box_mixin(self) # Requires current_db
self.library_view.model().count_changed_signal.connect(
self.iactions['Choose Library'].count_changed)
if not gprefs.get('quick_start_guide_added', False):
try:
add_quick_start_guide(self.library_view)
except:
import traceback
traceback.print_exc()
for view in ('library', 'memory', 'card_a', 'card_b'):
v = getattr(self, '%s_view' % view)
v.selectionModel().selectionChanged.connect(self.update_status_bar)
v.model().count_changed_signal.connect(self.update_status_bar)
self.library_view.model().count_changed()
self.bars_manager.database_changed(self.library_view.model().db)
self.library_view.model().database_changed.connect(self.bars_manager.database_changed,
type=Qt.QueuedConnection)
# ########################## Tags Browser ##############################
TagBrowserMixin.init_tag_browser_mixin(self, db)
self.library_view.model().database_changed.connect(self.populate_tb_manage_menu, type=Qt.QueuedConnection)
# ######################## Search Restriction ##########################
if db.prefs['virtual_lib_on_startup']:
self.apply_virtual_library(db.prefs['virtual_lib_on_startup'])
self.rebuild_vl_tabs()
# ########################## Cover Flow ################################
CoverFlowMixin.init_cover_flow_mixin(self)
self._calculated_available_height = min(max_available_height()-15,
self.height())
self.resize(self.width(), self._calculated_available_height)
self.build_context_menus()
for ac in self.iactions.values():
try:
ac.gui_layout_complete()
except:
import traceback
traceback.print_exc()
if ac.plugin_path is None:
raise
if config['autolaunch_server']:
self.start_content_server()
self.read_settings()
self.finalize_layout()