本文整理汇总了Python中calibre.gui2.ResizableDialog.accept方法的典型用法代码示例。如果您正苦于以下问题:Python ResizableDialog.accept方法的具体用法?Python ResizableDialog.accept怎么用?Python ResizableDialog.accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calibre.gui2.ResizableDialog
的用法示例。
在下文中一共展示了ResizableDialog.accept方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: accept
# 需要导入模块: from calibre.gui2 import ResizableDialog [as 别名]
# 或者: from calibre.gui2.ResizableDialog import accept [as 别名]
def accept(self):
recs = GuiRecommendations()
for w in self._groups_model.widgets:
if not w.pre_commit_check():
return
x = w.commit(save_defaults=False)
recs.update(x)
self._recommendations = recs
ResizableDialog.accept(self)
示例2: accept
# 需要导入模块: from calibre.gui2 import ResizableDialog [as 别名]
# 或者: from calibre.gui2.ResizableDialog import accept [as 别名]
def accept(self):
recs = GuiRecommendations()
for w in self._groups_model.widgets:
if not w.pre_commit_check():
return
x = w.commit(save_defaults=False)
recs.update(x)
self.opf_file, self.cover_file = self.mw.opf_file, self.mw.cover_file
self._recommendations = recs
if self.db is not None:
recs['gui_preferred_input_format'] = self.input_format
save_specifics(self.db, self.book_id, recs)
self.break_cycles()
ResizableDialog.accept(self)
示例3: accept
# 需要导入模块: from calibre.gui2 import ResizableDialog [as 别名]
# 或者: from calibre.gui2.ResizableDialog import accept [as 别名]
def accept(self):
self.save_state()
if not self.apply_changes():
return
if self.editing_multiple and self.current_row != len(self.row_list) - 1:
num = len(self.row_list) - 1 - self.current_row
from calibre.gui2 import question_dialog
if not question_dialog(
self, _('Are you sure?'),
_('There are still %d more books to edit in this set.'
' Are you sure you want to stop? Use the Next button'
' instead of the OK button to move through books in the set.') % num,
yes_text=_('&Stop editing'), no_text=_('&Continue editing'),
yes_icon='dot_red.png', no_icon='dot_green.png',
default_yes=False, skip_dialog_name='edit-metadata-single-confirm-ok-on-multiple'):
return self.do_one(delta=1, apply_changes=False)
ResizableDialog.accept(self)
示例4: accept
# 需要导入模块: from calibre.gui2 import ResizableDialog [as 别名]
# 或者: from calibre.gui2.ResizableDialog import accept [as 别名]
def accept(self):
self.save_catalog_settings()
return ResizableDialog.accept(self)