本文整理汇总了Python中calibre.gui2.tweak_book.editor.text.TextEdit.find_spell_word方法的典型用法代码示例。如果您正苦于以下问题:Python TextEdit.find_spell_word方法的具体用法?Python TextEdit.find_spell_word怎么用?Python TextEdit.find_spell_word使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calibre.gui2.tweak_book.editor.text.TextEdit
的用法示例。
在下文中一共展示了TextEdit.find_spell_word方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Editor
# 需要导入模块: from calibre.gui2.tweak_book.editor.text import TextEdit [as 别名]
# 或者: from calibre.gui2.tweak_book.editor.text.TextEdit import find_spell_word [as 别名]
#.........这里部分代码省略.........
m.addAction(name, partial(self.insert_tag, name))
def insert_tag(self, name):
self.editor.insert_tag(name)
mru = tprefs['insert_tag_mru']
try:
mru.remove(name)
except ValueError:
pass
mru.insert(0, name)
tprefs['insert_tag_mru'] = mru
self._build_insert_tag_button_menu()
def undo(self):
self.editor.undo()
def redo(self):
self.editor.redo()
@property
def selected_text(self):
return self.editor.selected_text
def get_smart_selection(self, update=True):
return self.editor.smarts.get_smart_selection(self.editor, update=update)
# Search and replace {{{
def mark_selected_text(self):
self.editor.mark_selected_text()
def find(self, *args, **kwargs):
return self.editor.find(*args, **kwargs)
def find_spell_word(self, *args, **kwargs):
return self.editor.find_spell_word(*args, **kwargs)
def replace(self, *args, **kwargs):
return self.editor.replace(*args, **kwargs)
def all_in_marked(self, *args, **kwargs):
return self.editor.all_in_marked(*args, **kwargs)
def go_to_anchor(self, *args, **kwargs):
return self.editor.go_to_anchor(*args, **kwargs)
# }}}
@property
def has_marked_text(self):
return self.editor.current_search_mark is not None
@dynamic_property
def is_modified(self):
def fget(self):
return self.editor.is_modified
def fset(self, val):
self.editor.is_modified = val
return property(fget=fget, fset=fset)
def create_toolbars(self):
self.action_bar = b = self.addToolBar(_('File actions tool bar'))
b.setObjectName('action_bar') # Needed for saveState
for x in ('undo', 'redo'):
b.addAction(actions['editor-%s' % x])
self.edit_bar = b = self.addToolBar(_('Edit actions tool bar'))
for x in ('cut', 'copy', 'paste'):
b.addAction(actions['editor-%s' % x])
示例2: Editor
# 需要导入模块: from calibre.gui2.tweak_book.editor.text import TextEdit [as 别名]
# 或者: from calibre.gui2.tweak_book.editor.text.TextEdit import find_spell_word [as 别名]
#.........这里部分代码省略.........
tprefs['insert_tag_mru'] = mru
self._build_insert_tag_button_menu()
def set_request_completion(self, callback=None, doc_name=None):
self.editor.request_completion = callback
self.editor.completion_doc_name = doc_name
def handle_completion_result(self, result):
return self.editor.handle_completion_result(result)
def undo(self):
self.editor.undo()
def redo(self):
self.editor.redo()
@property
def selected_text(self):
return self.editor.selected_text
def get_smart_selection(self, update=True):
return self.editor.smarts.get_smart_selection(self.editor, update=update)
# Search and replace {{{
def mark_selected_text(self):
self.editor.mark_selected_text()
def find(self, *args, **kwargs):
return self.editor.find(*args, **kwargs)
def find_text(self, *args, **kwargs):
return self.editor.find_text(*args, **kwargs)
def find_spell_word(self, *args, **kwargs):
return self.editor.find_spell_word(*args, **kwargs)
def replace(self, *args, **kwargs):
return self.editor.replace(*args, **kwargs)
def all_in_marked(self, *args, **kwargs):
return self.editor.all_in_marked(*args, **kwargs)
def go_to_anchor(self, *args, **kwargs):
return self.editor.go_to_anchor(*args, **kwargs)
# }}}
@property
def has_marked_text(self):
return self.editor.current_search_mark is not None
@dynamic_property
def is_modified(self):
def fget(self):
return self.editor.is_modified
def fset(self, val):
self.editor.is_modified = val
return property(fget=fget, fset=fset)
def create_toolbars(self):
self.action_bar = b = self.addToolBar(_('Edit actions tool bar'))
b.setObjectName('action_bar') # Needed for saveState
self.tools_bar = b = self.addToolBar(_('Editor tools'))
b.setObjectName('tools_bar')
self.bars = [self.action_bar, self.tools_bar]
if self.syntax == 'html':
示例3: Editor
# 需要导入模块: from calibre.gui2.tweak_book.editor.text import TextEdit [as 别名]
# 或者: from calibre.gui2.tweak_book.editor.text.TextEdit import find_spell_word [as 别名]
#.........这里部分代码省略.........
m.addAction(name, partial(self.insert_tag, name))
def insert_tag(self, name):
self.editor.insert_tag(name)
mru = tprefs['insert_tag_mru']
try:
mru.remove(name)
except ValueError:
pass
mru.insert(0, name)
tprefs['insert_tag_mru'] = mru
self._build_insert_tag_button_menu()
def undo(self):
self.editor.undo()
def redo(self):
self.editor.redo()
@property
def selected_text(self):
return self.editor.selected_text
def get_smart_selection(self, update=True):
return self.editor.smarts.get_smart_selection(self.editor, update=update)
# Search and replace {{{
def mark_selected_text(self):
self.editor.mark_selected_text()
def find(self, *args, **kwargs):
return self.editor.find(*args, **kwargs)
def find_spell_word(self, *args, **kwargs):
return self.editor.find_spell_word(*args, **kwargs)
def replace(self, *args, **kwargs):
return self.editor.replace(*args, **kwargs)
def all_in_marked(self, *args, **kwargs):
return self.editor.all_in_marked(*args, **kwargs)
def go_to_anchor(self, *args, **kwargs):
return self.editor.go_to_anchor(*args, **kwargs)
# }}}
@property
def has_marked_text(self):
return self.editor.current_search_mark is not None
@dynamic_property
def is_modified(self):
def fget(self):
return self.editor.is_modified
def fset(self, val):
self.editor.is_modified = val
return property(fget=fget, fset=fset)
def create_toolbars(self):
self.action_bar = b = self.addToolBar(_('File actions tool bar'))
b.setObjectName('action_bar') # Needed for saveState
for x in ('undo', 'redo'):
b.addAction(actions['editor-%s' % x])
self.edit_bar = b = self.addToolBar(_('Edit actions tool bar'))
for x in ('cut', 'copy', 'paste'):
b.addAction(actions['editor-%s' % x])