def _apply(self): """Apply changes and resume editing""" # Set the speller self.quiedit.speller_enabled = self.checkbox_speller_enabled.isChecked( ) self.quiedit.hunspell_path = str(self.edit_hunspell_path.text()) self.quiedit.hunspell_dict = str(self.edit_hunspell_dict.text()) self.quiedit.editor.speller = speller.speller(self.quiedit) # Set the theme self.quiedit.theme = str(self.combobox_theme.currentText()) self.quiedit.set_theme() self.quiedit.auto_indent = self.checkbox_auto_indent.isChecked() # Continue editing self.quiedit.setCursor(QtCore.Qt.BlankCursor) self.quiedit.show_element("editor")
def __init__(self, parent=None, readonly=False): """ Constructor Keyword arguments: parent -- the parent widget (default=None) readonly -- makes the editor readonly (default=False) """ super(quieditor, self).__init__(parent) self.quiedit = parent self.speller_lock = False self.setReadOnly(readonly) self.textChanged.connect(self.quiedit.set_unsaved) self.set_keybindings() self.setTabStopWidth(self.quiedit.size_indent) if self.quiedit.speller_enabled: self.speller = speller.speller(self.quiedit)
def _apply(self): """Apply changes and resume editing""" # Set the speller self.quiedit.speller_enabled = self.checkbox_speller_enabled.isChecked() self.quiedit.hunspell_path = str(self.edit_hunspell_path.text()) self.quiedit.hunspell_dict = str(self.edit_hunspell_dict.text()) self.quiedit.editor.speller = speller.speller(self.quiedit) # Set the theme self.quiedit.theme = str(self.combobox_theme.currentText()) self.quiedit.set_theme() self.quiedit.auto_indent = self.checkbox_auto_indent.isChecked() # Continue editing self.quiedit.setCursor(QtCore.Qt.BlankCursor) self.quiedit.show_element("editor")
def __init__(self, parent=None, readonly=False): """ Constructor. Keyword arguments: parent -- The parent widget (default=None) readonly -- Indicates whether the contents should be read only. (default=False) """ super(quieditor, self).__init__(parent) self.quiedit = parent self.speller_lock = False self.setReadOnly(readonly) self.textChanged.connect(self.quiedit.set_unsaved) self.set_keybindings() self.setTabStopWidth(self.quiedit.size_indent) if self.quiedit.speller_enabled: self.speller = speller.speller(self.quiedit) if not readonly and self.quiedit.highlighter_enabled: highlighter.MarkdownHighlighter(self)