# eric4.QScintilla.Editor

Module implementing the editor component of the eric4 IDE.

### Global Attributes

EditorAutoCompletionListID
TemplateCompletionListID

### Classes

Editor | Class implementing the editor component of the eric4 IDE.

### Functions

None

## Editor

Class implementing the editor component of the eric4 IDE.

### Signals

autoCompletionAPIsAvailable(avail)
  emitted after the autocompletion function has been configured
bookmarkToggled(editor)
  emitted when a bookmark is toggled
breakpointToggled(editor)
  emitted when a breakpoint is toggled
captionChanged(string, editor)
  emitted when the caption is updated. Typically due to a readOnly attribute change.
coverageMarkersShown(boolean)
  emitted after the coverage markers have been shown or cleared
cursorChanged(string, int, int)
  emitted when the cursor position was changed
editorAboutToBeSaved(string)
  emitted before the editor is saved
editorRenamed(string)
  emitted after the editor got a new name (i.e. after a 'Save As')
editorSaved(string)
  emitted after the editor has been saved
encodingChanged(encoding)
  emitted when the editors encoding was set. The encoding name is passed as a parameter.
eolChanged(eol)
  emitted when the editors eol type was set. The eol string is passed as a parameter.
languageChanged(language)
  emitted when the editors language was set. The language is passed as a parameter.
modificationStatusChanged(boolean, editor)
  emitted when the modification status has changed
redoAvailable(boolean)
  emitted to signal the redo availability
showMenu(string, QMenu, editor)
  emitted when a menu is about to be shown. The name of the menu, a reference to the menu and a reference to the editor are given.
syntaxerrorToggled(editor)
  emitted when a syntax error was discovered
taskMarkersUpdated(editor)
  emitted when the task markers were updated
undoAvailable(boolean)
  emitted to signal the undo availability

### Derived from

QsciScintillaCompat

### Class Attributes

AttributeID
AttributePrivateID
AttributeProtectedID
ClassID
ClassPrivateID
ClassProtectedID
EnumID
FromDocumentID
MethodID
MethodPrivateID
MethodProtectedID
TemplateImageID

### Class Methods

None

### Methods

Editor | Constructor
__addBreakPoint | Private method to add a new breakpoint.
__addBreakPoints | Private slot to add breakpoints.
__addFileAliasResource | Private method to handle the Add aliased file context menu action.
__addFileResource | Private method to handle the Add file context menu action.
__addFileResources | Private method to handle the Add files context menu action.
__addLocalizedResource | Private method to handle the Add localized resource context menu action.
__addResourceFrame | Private method to handle the Add resource frame context menu action.
__addToSpellingDictionary | Private slot to add the word below the spelling context menu to the dictionary.
__adjustedCallTipPosition | Private method to calculate an adjusted position for showing calltips.
__applyTemplate | Private method to apply a template by name.
__autoSyntaxCheck | Private method to perform an automatic syntax check of the file.
__autosaveEnable | Private slot handling the autosave enable context menu action.
__bindCompleter | Private slot to set the correct typing completer depending on language.
__bindLexer | Private slot to set the correct lexer depending on language.
__bindName | Private method to generate a dummy filename for binding a lexer.
__breakPointDataAboutToBeChanged | Private slot to handle the dataAboutToBeChanged signal of the breakpoint model.
__callTip | Private method to show call tips provided by a plugin.
__changeBreakPoints | Private slot to set changed breakpoints.
__charAdded | Public slot called to handle the user entering a character.
__checkEncoding | Private method to check the selected encoding of the encodings submenu.
__checkEol | Private method to check the selected eol type of the eol submenu.
__checkLanguage | Private method to check the selected language of the language submenu.
__checkSpellingSelection | Private slot to spell check the current selection.
__checkSpellingWord | Private slot to check the word below the spelling context menu.
__clearBreakpoints | Private slot to clear all breakpoints.
__codeCoverageHideAnnotations | Private method to handle the hide code coverage annotations context menu action.
__completionListSelected | Private slot to handle the selection from the completion list.
__contextClose | Private slot handling the close context menu entry.
__contextMenuSpellingTriggered | Private slot to handle the selection of a suggestion of the spelling context menu.
__contextSave | Private slot handling the save context menu entry.
__contextSaveAs | Private slot handling the save as context menu entry.
__cursorPositionChanged | Private slot to handle the cursorPositionChanged signal.
__deleteBreakPoints | Private slot to delete breakpoints.
__deselectAll | Private slot handling the deselect all context menu action.
__encodingChanged | Private slot to handle a change of the encoding.
__encodingsMenuTriggered | Private method to handle the selection of an encoding.
__eolChanged | Private slot to handle a change of the eol mode.
__eolMenuTriggered | Private method to handle the selection of an eol type.
__exportMenuTriggered | Private method to handle the selection of an export format.
__getCharacter | Private method to get the character to the left of the current position in the current line.
__getCodeCoverageFile | Private method to get the filename of the file containing coverage info.
__getMacroName | Private method to select a macro name from the list of macros.
__ignoreSpellingAlways | Private to always ignore the word below the spelling context menu.
__indentLine | Private method to indent or unindent the current line.
__indentSelection | Private method to indent or unindent the current selection.
__initContextMenu | Private method used to setup the context menu
__initContextMenuAutocompletion | Private method used to setup the Checks context sub menu.
__initContextMenuChecks | Private method used to setup the Checks context sub menu.
__initContextMenuEncodings | Private method used to setup the Encodings context sub menu.
__initContextMenuEol | Private method to setup the eol context sub menu.
__initContextMenuExporters | Private method used to setup the Exporters context sub menu.
__initContextMenuGraphics | Private method used to setup the diagrams context sub menu.
__initContextMenuLanguages | Private method used to setup the Languages context sub menu.
__initContextMenuMargins | Private method used to setup the context menu for the margins
__initContextMenuResources | Private method used to setup the Resources context sub menu.
__initContextMenuSeparateMargins | Private method used to setup the context menu for the separated margins
__initContextMenuShow | Private method used to setup the Show context sub menu.
__initContextMenuUnifiedMargins | Private method used to setup the context menu for the unified margins
__isStartChar | Private method to check, if a character is an autocompletion start character.
__languageMenuTriggered | Private method to handle the selection of a lexer language.
__linesChanged | Private method to track text changes.
__lmBbookmarks | Private method to handle the 'LMB toggles bookmark' context menu action.
__lmBbreakpoints | Private method to handle the 'LMB toggles breakpoint' context menu action.
__marginClicked | Private slot to handle the marginClicked signal.
__marginNumber | Private method to calculate the margin number based on a x position.
__markOccurrences | Private method to mark all occurrences of the current word.
__menuClearBreakpoints | Private slot to handle the 'Clear all breakpoints' context menu action.
__menuToggleBreakpointEnabled | Private slot to handle the 'Enable/Disable breakpoint' context menu action.
__menuToggleTemporaryBreakpoint | Private slot to handle the 'Toggle temporary breakpoint' context menu action.
__modificationChanged | Private slot to handle the modificationChanged signal.
__modificationReadOnly | Private slot to handle the modificationAttempted signal.
__newView | Private slot to create a new view to an open document.
__newViewNewSplit | Private slot to create a new view to an open document.
__normalizedEncoding | Private method to calculate the normalized encoding string.
__printPreview | Private slot to generate a print preview.
__projectPropertiesChanged | Private slot to handle changes of the project properties.
__registerImages | Private method to register images for autocompletion lists.
__removeFromSpellingDictionary | Private slot to remove the word below the context menu to the dictionary.
__removeTrailingWhitespace | Private method to remove trailing whitespace.
__resetLanguage | Private method used to reset the language selection.
__resizeLinenoMargin | Private slot to resize the line numbers margin.
__restoreBreakpoints | Private method to restore the breakpoints.
__selectAll | Private slot handling the select all context menu action.
__selectPygmentsLexer | Private method to select a specific pygments lexer.
__setAutoCompletion | Private method to configure the autocompletion function.
__setCallTips | Private method to configure the calltips function.
__setEolMode | Private method to configure the eol mode of the editor.
__setLineMarkerColours | Private method to set the line marker colours.
__setMarginsDisplay | Private method to configure margins 0 and 2.
__setSpelling | Private method to initialize the spell checking functionality.
__setSpellingLanguage | Private slot to set the spell checking language.
__setTextDisplay | Private method to configure the text display.
__showApplicationDiagram | Private method to handle the Imports Diagram context menu action.
__showClassDiagram | Private method to handle the Class Diagram context menu action.
__showCodeCoverage | Private method to handle the code coverage context menu action.
__showCodeMetrics | Private method to handle the code metrics context menu action.
__showContextMenu | Private slot handling the aboutToShow signal of the context menu.
__showContextMenuAutocompletion | Private slot called before the autocompletion menu is shown.
__showContextMenuChecks | Private slot handling the aboutToShow signal of the checks context menu.
__showContextMenuEncodings | Private slot handling the aboutToShow signal of the encodings context menu.
__showContextMenuEol | Private slot handling the aboutToShow signal of the eol context menu.
__showContextMenuGraphics | Private slot handling the aboutToShow signal of the diagrams context menu.
__showContextMenuLanguages | Private slot handling the aboutToShow signal of the languages context menu.
__showContextMenuMargin | Private slot handling the aboutToShow signal of the margins context menu.
__showContextMenuResources | Private slot handling the aboutToShow signal of the resources context menu.
__showContextMenuShow | Private slot called before the show menu is shown.
__showContextMenuSpelling | Private slot to set up the spelling menu before it is shown.
__showImportsDiagram | Private method to handle the Imports Diagram context menu action.
__showPackageDiagram | Private method to handle the Package Diagram context menu action.
__showProfileData | Private method to handle the show profile data context menu action.
__showSyntaxError | Private slot to handle the 'Show syntax error message' context menu action.
__spellCharAdded | Public slot called to handle the user entering a character.
__styleNeeded | Private slot to handle the need for more styling.
__toggleAutoCompletionEnable | Private slot to handle the Enable Autocompletion context menu entry.
__toggleBreakpoint | Private method to toggle a breakpoint.
__toggleBreakpointEnabled | Private method to toggle a breakpoints enabled status.
__toggleTypingAids | Private slot to toggle the typing aids.
__updateReadOnly | Private method to update the readOnly information for this editor.
addClone | Public method to add a clone to our list.
addedToProject | Public method to signal, that this editor has been added to a project.
autoComplete | Public method to start autocompletion.
autoCompleteQScintilla | Public method to perform an autocompletion using QScintilla methods.
autoCompletionHook | Public method to get the autocompletion hook function.
boxCommentLine | Public slot to box comment the current line.
boxCommentLineOrSelection | Public slot to box comment the current line or current selection.
boxCommentSelection | Public slot to box comment the current selection.
callTip | Public method to show calltips.
callTipHook | Public method to get the calltip hook function.
canAutoCompleteFromAPIs | Public method to check for API availablity.
changeEvent | Protected method called to process an event.
checkDirty | Public method to check dirty status and open a message window.
checkSpelling | Public slot to perform an interactive spell check of the document.
clearBookmarks | Public slot to handle the 'Clear all bookmarks' context menu action.
clearBreakpoint | Public method to clear a breakpoint.
clearSearchIndicators | Public method to clear all search indicators.
clearSyntaxError | Public slot to handle the 'Clear all syntax error' context menu action.
close | Public method called when the window gets closed.
closeIt | Public method called by the viewmanager to finally get rid of us.
codeCoverageShowAnnotations | Public method to handle the show code coverage annotations context menu action.
commentLine | Public slot to comment the current line.
commentLineOrSelection | Public slot to comment the current line or current selection.
commentSelection | Public slot to comment the current selection.
contextMenuEvent | Private method implementing the context menu event.
curLineHasBreakpoint | Public method to check for the presence of a breakpoint at the current line.
dragEnterEvent | Protected method to handle the drag enter event.
dragLeaveEvent | Protected method to handle the drag leave event.
dragMoveEvent | Protected method to handle the drag move event.
dropEvent | Protected method to handle the drop event.
editorCommand | Public method to perform a simple editor command.
ensureVisible | Public slot to ensure, that the specified line is visible.
ensureVisibleTop | Public slot to ensure, that the specified line is visible at the top of the editor.
exportFile | Public method to export the file.
extractTasks | Public slot to extract all tasks.
fileRenamed | Public slot to handle the editorRenamed signal.
focusInEvent | Protected method called when the editor receives focus.
focusOutEvent | Public method called when the editor loses focus.
getBookmarks | Public method to retrieve the bookmarks.
getCompleter | Public method to retrieve a reference to the completer object.
getCurrentWord | Public method to get the word at the current position.
getEncoding | Public method to return the current encoding.
getFileName | Public method to return the name of the file being displayed.
getFileType | Public method to return the type of the file being displayed.
getFolds | Public method to get a list line numbers of collapsed folds.
getHighlightPosition | Public method to return the position of the highlight bar.
getLanguage | Public method to retrieve the language of the editor.
getLexer | Public method to retrieve a reference to the lexer object.
getMenu | Public method to get a reference to the main context menu or a submenu.
getNoName | Public method to get the display string for an unnamed editor.
getSearchText | Public method to determine the selection or the current word for the next search operation.
getSyntaxErrors | Public method to retrieve the syntax error markers.
getWord | Public method to get the word at a position.
getWordBoundaries | Public method to get the word boundaries at a position.
getWordLeft | Public method to get the word to the left of a position.
getWordRight | Public method to get the word to the right of a position.
gotoLine | Public slot to jump to the beginning of a line.
gotoSyntaxError | Public slot to handle the 'Goto syntax error' context menu action.
handleMonospacedEnable | Private slot to handle the Use Monospaced Font context menu entry.
handleRenamed | Public slot to handle the editorRenamed signal.
hasBookmarks | Public method to check for the presence of bookmarks.
hasBreakpoints | Public method to check for the presence of breakpoints.
hasCoverageMarkers | Public method to test, if there are coverage markers.
hasMiniMenu | Public method to check the miniMenu flag.
hasSyntaxErrors | Public method to check for the presence of bookmarks.
hasTaskMarkers | Public method to determine, if this editor contains any task markers.
highlight | Public method to highlight (or de-highlight) a particular line.
highlightVisible | Public method to make sure that the highlight is visible.
indentLineOrSelection | Public slot to indent the current line or current selection
isPy3File | Public method to return a flag indicating a Python3 file.
isPyFile | Public method to return a flag indicating a Python file.
isRubyFile | Public method to return a flag indicating a Ruby file.
isSpellCheckRegion | Public method to check, if the given position is within a region, that should be spell checked.
keyPressEvent | Re-implemented to handle the user input a key at a time.
languageChanged | Public slot handling a change of a connected editor's language.
macroDelete | Public method to delete a macro.
macroLoad | Public method to load a macro from a file.
macroRecordingStart | Public method to start macro recording.
macroRecordingStop | Public method to stop macro recording.
macroRun | Public method to execute a macro.
macroSave | Public method to save a macro to a file.
menuEditBreakpoint | Public slot to handle the 'Edit breakpoint' context menu action.
menuNextBreakpoint | Public slot to handle the 'Next breakpoint' context menu action.
menuPreviousBreakpoint | Public slot to handle the 'Previous breakpoint' context menu action.
menuToggleBookmark | Public slot to handle the 'Toggle bookmark' context menu action.
menuToggleBreakpoint | Public slot to handle the 'Toggle breakpoint' context menu action.
mousePressEvent | Protected method to handle the mouse press event.
newBreakpointWithProperties | Private method to set a new breakpoint and its properties.
nextBookmark | Public slot to handle the 'Next bookmark' context menu action.
nextTask | Public slot to handle the 'Next task' context menu action.
nextUncovered | Public slot to handle the 'Next uncovered' context menu action.
previousBookmark | Public slot to handle the 'Previous bookmark' context menu action.
previousTask | Public slot to handle the 'Previous task' context menu action.
previousUncovered | Public slot to handle the 'Previous uncovered' context menu action.
printFile | Public slot to print the text.
printPreviewFile | Public slot to show a print preview of the text.
projectClosed | Public slot to handle the closing of a project.
projectLexerAssociationsChanged | Public slot to handle changes of the project lexer associations.
projectOpened | Public slot to handle the opening of a project.
readFile | Public slot to read the text from a file.
readLine0 | Public slot to read the first line from a file.
readSettings | Public slot to read the settings into our lexer.
redo | Public method to redo the last recorded change.
refresh | Public slot to refresh the editor contents.
removeClone | Public method to remove a clone from our list.
revertToUnmodified | Public method to revert back to the last saved state.
saveFile | Public slot to save the text to a file.
saveFileAs | Public slot to save a file with a new name.
selectCurrentWord | Public method to select the current word.
selectWord | Public method to select the word at a position.
setAutoCompletionEnabled | Public method to enable/disable autocompletion.
setAutoCompletionHook | Public method to set an autocompletion hook.
setAutoSpellChecking | Public method to set the automatic spell checking.
setCallTipHook | Public method to set a calltip hook.
setEolModeByEolString | Public method to set the eol mode given the eol string.
setLanguage | Public method to set a lexer language.
setMonospaced | Public method to set/reset a monospaced font.
setNoName | Public method to set the display string for an unnamed editor.
setSearchIndicator | Public method to set a search indicator for the given range.
setSpellingForProject | Public method to set the spell checking options for files belonging to the current project.
shortenEmptyLines | Public slot to compress lines consisting solely of whitespace characters.
shouldAutosave | Public slot to check the autosave flags.
smartIndentLineOrSelection | Public slot to indent current line smartly.
streamCommentLine | Public slot to stream comment the current line.
streamCommentLineOrSelection | Public slot to stream comment the current line or current selection.
streamCommentSelection | Public slot to comment the current selection.
toggleBookmark | Public method to toggle a bookmark.
toggleSyntaxError | Public method to toggle a syntax error indicator.
uncommentLine | Public slot to uncomment the current line.
uncommentLineOrSelection | Public slot to uncomment the current line or current selection.
uncommentSelection | Public slot to uncomment the current selection.
undo | Public method to undo the last recorded change.
unindentLineOrSelection | Public slot to unindent the current line or current selection.
unsetAutoCompletionHook | Public method to unset a previously installed autocompletion hook.
unsetCallTipHook | Public method to unset a calltip hook.
writeFile | Public slot to write the text to a file.

### Static Methods

None

#### Editor (Constructor)

Editor(dbs, fn = None, vm = None, filetype = "", editor = None, tv = None)

Constructor

dbs
  reference to the debug server object
fn
  name of the file to be opened (string). If it is None, a new (empty) editor is opened
vm
  reference to the view manager object (ViewManager.ViewManager)
filetype
  type of the source file (string)
editor
  reference to an Editor object, if this is a cloned view
tv
  reference to the task viewer object

#### Editor.__addBreakPoint

__addBreakPoint(line, temporary)

Private method to add a new breakpoint.

line
  line number of the breakpoint
temporary
  flag indicating a temporary breakpoint

#### Editor.__addBreakPoints

__addBreakPoints(parentIndex, start, end)

Private slot to add breakpoints.

parentIndex
  index of parent item (QModelIndex)
start
  start row (integer)
end
  end row (integer)

#### Editor.__addFileAliasResource

__addFileAliasResource()

Private method to handle the Add aliased file context menu action.

#### Editor.__addFileResource

__addFileResource()

Private method to handle the Add file context menu action.

#### Editor.__addFileResources

__addFileResources()

Private method to handle the Add files context menu action.

#### Editor.__addLocalizedResource

__addLocalizedResource()

Private method to handle the Add localized resource context menu action.

#### Editor.__addResourceFrame

__addResourceFrame()

Private method to handle the Add resource frame context menu action.

#### Editor.__addToSpellingDictionary

__addToSpellingDictionary()

Private slot to add the word below the spelling context menu to the dictionary.

#### Editor.__adjustedCallTipPosition

__adjustedCallTipPosition(ctshift, pos)

Private method to calculate an adjusted position for showing calltips.

ctshift
  amount the calltip shall be shifted (integer)
pos
  position into the text (integer)

Returns:
  new position for the calltip (integer)

#### Editor.__applyTemplate

__applyTemplate(templateName, language)

Private method to apply a template by name.

templateName
  name of the template to apply (string or QString)
language
  name of the language (group) to get the template from (string)

#### Editor.__autoSyntaxCheck

__autoSyntaxCheck()

Private method to perform an automatic syntax check of the file.

#### Editor.__autosaveEnable

__autosaveEnable()

Private slot handling the autosave enable context menu action.

#### Editor.__bindCompleter

__bindCompleter(filename)

Private slot to set the correct typing completer depending on language.

filename
  filename used to determine the associated typing completer language (string)

#### Editor.__bindLexer

__bindLexer(filename, pyname = "")

Private slot to set the correct lexer depending on language.

filename
  filename used to determine the associated lexer language (string)
pyname=
  name of the pygments lexer to use (string)

#### Editor.__bindName

__bindName(txt)

Private method to generate a dummy filename for binding a lexer.

txt
  first line of text to use in the generation process (QString or string)

#### Editor.__breakPointDataAboutToBeChanged

__breakPointDataAboutToBeChanged(startIndex, endIndex)

Private slot to handle the dataAboutToBeChanged signal of the breakpoint model.

startIndex
  start index of the rows to be changed (QModelIndex)
endIndex
  end index of the rows to be changed (QModelIndex)

#### Editor.__callTip

__callTip()

Private method to show call tips provided by a plugin.

#### Editor.__changeBreakPoints

__changeBreakPoints(startIndex, endIndex)

Private slot to set changed breakpoints.

indexes
  indexes of changed breakpoints.

#### Editor.__charAdded

__charAdded(charNumber)

Public slot called to handle the user entering a character.

charNumber
  value of the character entered (integer)

#### Editor.__checkEncoding

__checkEncoding()

Private method to check the selected encoding of the encodings submenu.

#### Editor.__checkEol

__checkEol()

Private method to check the selected eol type of the eol submenu.

#### Editor.__checkLanguage

__checkLanguage()

Private method to check the selected language of the language submenu.

#### Editor.__checkSpellingSelection

__checkSpellingSelection()

Private slot to spell check the current selection.

#### Editor.__checkSpellingWord

__checkSpellingWord()

Private slot to check the word below the spelling context menu.

#### Editor.__clearBreakpoints

__clearBreakpoints(fileName)

Private slot to clear all breakpoints.

#### Editor.__codeCoverageHideAnnotations

__codeCoverageHideAnnotations()

Private method to handle the hide code coverage annotations context menu action.

#### Editor.__completionListSelected

__completionListSelected(id, txt)

Private slot to handle the selection from the completion list.

id
  the ID of the user list (should be 1) (integer)
txt
  the selected text (QString)

#### Editor.__contextClose

__contextClose()

Private slot handling the close context menu entry.

#### Editor.__contextMenuSpellingTriggered

__contextMenuSpellingTriggered(action)

Private slot to handle the selection of a suggestion of the spelling context menu.

action
  reference to the action that was selected (QAction)

#### Editor.__contextSave

__contextSave()

Private slot handling the save context menu entry.

#### Editor.__contextSaveAs

__contextSaveAs()

Private slot handling the save as context menu entry.

#### Editor.__cursorPositionChanged

__cursorPositionChanged(line, index)

Private slot to handle the cursorPositionChanged signal.

It emits the signal cursorChanged with parameters fileName, line and pos.

line
  line number of the cursor
index
  position in line of the cursor

#### Editor.__deleteBreakPoints

__deleteBreakPoints(parentIndex, start, end)

Private slot to delete breakpoints.

parentIndex
  index of parent item (QModelIndex)
start
  start row (integer)
end
  end row (integer)

#### Editor.__deselectAll

__deselectAll()

Private slot handling the deselect all context menu action.

#### Editor.__encodingChanged

__encodingChanged(encoding, propagate = True)

Private slot to handle a change of the encoding.

propagate=
  flag indicating to propagate the change (boolean)

#### Editor.__encodingsMenuTriggered

__encodingsMenuTriggered(act)

Private method to handle the selection of an encoding.

act
  reference to the action that was triggered (QAction)

#### Editor.__eolChanged

__eolChanged()

Private slot to handle a change of the eol mode.

#### Editor.__eolMenuTriggered

__eolMenuTriggered(act)

Private method to handle the selection of an eol type.

act
  reference to the action that was triggered (QAction)

#### Editor.__exportMenuTriggered

__exportMenuTriggered(act)

Private method to handle the selection of an export format.

act
  reference to the action that was triggered (QAction)

#### Editor.__getCharacter

__getCharacter(pos)

Private method to get the character to the left of the current position in the current line.

pos
  position to get character at (integer)

Returns:
  requested character or "", if there are no more (string) and the next position (i.e. pos - 1)

#### Editor.__getCodeCoverageFile

__getCodeCoverageFile()

Private method to get the filename of the file containing coverage info.

#### Editor.__getMacroName

__getMacroName()

Private method to select a macro name from the list of macros.

Returns:
  Tuple of macro name and a flag, indicating, if the user pressed ok or canceled the operation. (QString, boolean)

#### Editor.__ignoreSpellingAlways

__ignoreSpellingAlways()

Private to always ignore the word below the spelling context menu.

#### Editor.__indentLine

__indentLine(indent = True)

Private method to indent or unindent the current line.

indent
  flag indicating an indent operation
  If the flag is true, an indent operation is performed. Otherwise the current line is unindented.

#### Editor.__indentSelection

__indentSelection(indent = True)

Private method to indent or unindent the current selection.

indent
  flag indicating an indent operation
  If the flag is true, an indent operation is performed. Otherwise the current line is unindented.

#### Editor.__initContextMenu

__initContextMenu()

Private method used to setup the context menu

#### Editor.__initContextMenuAutocompletion

__initContextMenuAutocompletion()

Private method used to setup the Checks context sub menu.

#### Editor.__initContextMenuChecks

__initContextMenuChecks()

Private method used to setup the Checks context sub menu.

#### Editor.__initContextMenuEncodings

__initContextMenuEncodings()

Private method used to setup the Encodings context sub menu.

#### Editor.__initContextMenuEol

__initContextMenuEol()

Private method to setup the eol context sub menu.

#### Editor.__initContextMenuExporters

__initContextMenuExporters()

Private method used to setup the Exporters context sub menu.

#### Editor.__initContextMenuGraphics

__initContextMenuGraphics()

Private method used to setup the diagrams context sub menu.

#### Editor.__initContextMenuLanguages

__initContextMenuLanguages()

Private method used to setup the Languages context sub menu.

#### Editor.__initContextMenuMargins

__initContextMenuMargins()

Private method used to setup the context menu for the margins

#### Editor.__initContextMenuResources

__initContextMenuResources()

Private method used to setup the Resources context sub menu.

#### Editor.__initContextMenuSeparateMargins

__initContextMenuSeparateMargins()

Private method used to setup the context menu for the separated margins

#### Editor.__initContextMenuShow

__initContextMenuShow()

Private method used to setup the Show context sub menu.

#### Editor.__initContextMenuUnifiedMargins

__initContextMenuUnifiedMargins()

Private method used to setup the context menu for the unified margins

#### Editor.__isStartChar

__isStartChar(ch)

Private method to check, if a character is an autocompletion start character.

ch
  character to be checked (one character string)

Returns:
  flag indicating the result (boolean)

#### Editor.__languageMenuTriggered

__languageMenuTriggered(act)

Private method to handle the selection of a lexer language.

act
  reference to the action that was triggered (QAction)

#### Editor.__linesChanged

__linesChanged()

Private method to track text changes.

This method checks, if lines have been inserted or removed in order to update the breakpoints.

#### Editor.__lmBbookmarks

__lmBbookmarks()

Private method to handle the 'LMB toggles bookmark' context menu action.

#### Editor.__lmBbreakpoints

__lmBbreakpoints()

Private method to handle the 'LMB toggles breakpoint' context menu action.

#### Editor.__marginClicked

__marginClicked(margin, line, modifiers)

Private slot to handle the marginClicked signal.

margin
  id of the clicked margin
line
  line number of the click
modifiers
  keyboard modifiers (Qt.KeyboardModifiers)

#### Editor.__marginNumber

__marginNumber(xPos)

Private method to calculate the margin number based on a x position.

xPos
  x position (integer)

Returns:
  margin number (integer, -1 for no margin)

#### Editor.__markOccurrences

__markOccurrences()

Private method to mark all occurrences of the current word.

#### Editor.__menuClearBreakpoints

__menuClearBreakpoints()

Private slot to handle the 'Clear all breakpoints' context menu action.

#### Editor.__menuToggleBreakpointEnabled

__menuToggleBreakpointEnabled()

Private slot to handle the 'Enable/Disable breakpoint' context menu action.

#### Editor.__menuToggleTemporaryBreakpoint

__menuToggleTemporaryBreakpoint()

Private slot to handle the 'Toggle temporary breakpoint' context menu action.

#### Editor.__modificationChanged

__modificationChanged(m)

Private slot to handle the modificationChanged signal.

It emits the signal modificationStatusChanged with parameters m and self.

m
  modification status

#### Editor.__modificationReadOnly

__modificationReadOnly()

Private slot to handle the modificationAttempted signal.

#### Editor.__newView

__newView()

Private slot to create a new view to an open document.

#### Editor.__newViewNewSplit

__newViewNewSplit()

Private slot to create a new view to an open document.

#### Editor.__normalizedEncoding

__normalizedEncoding()

Private method to calculate the normalized encoding string.

Returns:
  normalized encoding (string)

#### Editor.__printPreview

__printPreview(printer)

Private slot to generate a print preview.

printer
  reference to the printer object (QScintilla.Printer.Printer)

#### Editor.__projectPropertiesChanged

__projectPropertiesChanged()

Private slot to handle changes of the project properties.

#### Editor.__registerImages

__registerImages()

Private method to register images for autocompletion lists.

#### Editor.__removeFromSpellingDictionary

__removeFromSpellingDictionary()

Private slot to remove the word below the context menu to the dictionary.

#### Editor.__removeTrailingWhitespace

__removeTrailingWhitespace()

Private method to remove trailing whitespace.

#### Editor.__resetLanguage

__resetLanguage(propagate = True)

Private method used to reset the language selection.

propagate=
  flag indicating to propagate the change (boolean)

#### Editor.__resizeLinenoMargin

__resizeLinenoMargin()

Private slot to resize the line numbers margin.

#### Editor.__restoreBreakpoints

__restoreBreakpoints()

Private method to restore the breakpoints.

#### Editor.__selectAll

__selectAll()

Private slot handling the select all context menu action.

#### Editor.__selectPygmentsLexer

__selectPygmentsLexer()

Private method to select a specific pygments lexer.

Returns:
  name of the selected pygments lexer (string)

#### Editor.__setAutoCompletion

__setAutoCompletion()

Private method to configure the autocompletion function.

#### Editor.__setCallTips

__setCallTips()

Private method to configure the calltips function.

#### Editor.__setEolMode

__setEolMode()

Private method to configure the eol mode of the editor.

#### Editor.__setLineMarkerColours

__setLineMarkerColours()

Private method to set the line marker colours.

#### Editor.__setMarginsDisplay

__setMarginsDisplay()

Private method to configure margins 0 and 2.

#### Editor.__setSpelling

__setSpelling()

Private method to initialize the spell checking functionality.

#### Editor.__setSpellingLanguage

__setSpellingLanguage(language, pwl = "", pel = "")

Private slot to set the spell checking language.

language
  spell checking language to be set (string)
pwl=
  name of the personal/project word list (string)
pel=
  name of the personal/project exclude list (string)

#### Editor.__setTextDisplay

__setTextDisplay()

Private method to configure the text display.

#### Editor.__showApplicationDiagram

__showApplicationDiagram()

Private method to handle the Imports Diagram context menu action.

#### Editor.__showClassDiagram

__showClassDiagram()

Private method to handle the Class Diagram context menu action.

#### Editor.__showCodeCoverage

__showCodeCoverage()

Private method to handle the code coverage context menu action.

#### Editor.__showCodeMetrics

__showCodeMetrics()

Private method to handle the code metrics context menu action.

#### Editor.__showContextMenu

__showContextMenu()

Private slot handling the aboutToShow signal of the context menu.

#### Editor.__showContextMenuAutocompletion

__showContextMenuAutocompletion()

Private slot called before the autocompletion menu is shown.

#### Editor.__showContextMenuChecks

__showContextMenuChecks()

Private slot handling the aboutToShow signal of the checks context menu.

#### Editor.__showContextMenuEncodings

__showContextMenuEncodings()

Private slot handling the aboutToShow signal of the encodings context menu.

#### Editor.__showContextMenuEol

__showContextMenuEol()

Private slot handling the aboutToShow signal of the eol context menu.

#### Editor.__showContextMenuGraphics

__showContextMenuGraphics()

Private slot handling the aboutToShow signal of the diagrams context menu.

#### Editor.__showContextMenuLanguages

__showContextMenuLanguages()

Private slot handling the aboutToShow signal of the languages context menu.

#### Editor.__showContextMenuMargin

__showContextMenuMargin()

Private slot handling the aboutToShow signal of the margins context menu.

#### Editor.__showContextMenuResources

__showContextMenuResources()

Private slot handling the aboutToShow signal of the resources context menu.

#### Editor.__showContextMenuShow

__showContextMenuShow()

Private slot called before the show menu is shown.

#### Editor.__showContextMenuSpelling

__showContextMenuSpelling()

Private slot to set up the spelling menu before it is shown.

#### Editor.__showImportsDiagram

__showImportsDiagram()

Private method to handle the Imports Diagram context menu action.

#### Editor.__showPackageDiagram

__showPackageDiagram()

Private method to handle the Package Diagram context menu action.

#### Editor.__showProfileData

__showProfileData()

Private method to handle the show profile data context menu action.

#### Editor.__showSyntaxError

__showSyntaxError(line = -1)

Private slot to handle the 'Show syntax error message' context menu action.

line
  line number to show the syntax error for (integer)

#### Editor.__spellCharAdded

__spellCharAdded(charNumber)

Public slot called to handle the user entering a character.

charNumber
  value of the character entered (integer)

#### Editor.__styleNeeded

__styleNeeded(position)

Private slot to handle the need for more styling.

position
  end position, that needs styling (integer)

#### Editor.__toggleAutoCompletionEnable

__toggleAutoCompletionEnable()

Private slot to handle the Enable Autocompletion context menu entry.

#### Editor.__toggleBreakpoint

__toggleBreakpoint(line, temporary = False)

Private method to toggle a breakpoint.

line
  line number of the breakpoint
temporary
  flag indicating a temporary breakpoint

#### Editor.__toggleBreakpointEnabled

__toggleBreakpointEnabled(line)

Private method to toggle a breakpoints enabled status.

line
  line number of the breakpoint

#### Editor.__toggleTypingAids

__toggleTypingAids()

Private slot to toggle the typing aids.

#### Editor.__updateReadOnly

__updateReadOnly(bForce = True)

Private method to update the readOnly information for this editor.

If bForce is True, then updates everything regardless if the attributes have actually changed, such as during initialization time. A signal is emitted after the caption change.

bForce
  True to force change, False to only update and emit signal if there was an attribute change.

#### Editor.addClone

addClone(editor)

Public method to add a clone to our list.

clone
  reference to the cloned editor (Editor)

#### Editor.addedToProject

addedToProject()

Public method to signal, that this editor has been added to a project.

#### Editor.autoComplete

autoComplete(auto = False, context = True)

Public method to start autocompletion.

auto=
  flag indicating a call from the __charAdded method (boolean)
context=
  flag indicating to complete a context (boolean)

#### Editor.autoCompleteQScintilla

autoCompleteQScintilla()

Public method to perform an autocompletion using QScintilla methods.

#### Editor.autoCompletionHook

autoCompletionHook()

Public method to get the autocompletion hook function.

Returns:
  function set by setAutoCompletionHook()

#### Editor.boxCommentLine

boxCommentLine()

Public slot to box comment the current line.

#### Editor.boxCommentLineOrSelection

boxCommentLineOrSelection()

Public slot to box comment the current line or current selection.

#### Editor.boxCommentSelection

boxCommentSelection()

Public slot to box comment the current selection.

#### Editor.callTip

callTip()

Public method to show calltips.

#### Editor.callTipHook

callTipHook()

Public method to get the calltip hook function.

Returns:
  function set by setCallTipHook()

#### Editor.canAutoCompleteFromAPIs

canAutoCompleteFromAPIs()

Public method to check for API availablity.

Returns:
  flag indicating autocompletion from APIs is available (boolean)

#### Editor.changeEvent

changeEvent(evt)

Protected method called to process an event.

This implements special handling for the events showMaximized, showMinimized and showNormal. The windows caption is shortened for the minimized mode and reset to the full filename for the other modes. This is to make the editor windows work nicer with the QWorkspace.

evt
  the event, that was generated (QEvent)

Returns:
  flag indicating if the event could be processed (bool)

#### Editor.checkDirty

checkDirty()

Public method to check dirty status and open a message window.

Returns:
  flag indicating successful reset of the dirty flag (boolean)

#### Editor.checkSpelling

checkSpelling()

Public slot to perform an interactive spell check of the document.

#### Editor.clearBookmarks

clearBookmarks()

Public slot to handle the 'Clear all bookmarks' context menu action.

#### Editor.clearBreakpoint

clearBreakpoint(line)

Public method to clear a breakpoint.

Note: This doesn't clear the breakpoint in the debugger, it just deletes it from the editor internal list of breakpoints.

line
  linenumber of the breakpoint

#### Editor.clearSearchIndicators

clearSearchIndicators()

Public method to clear all search indicators.

#### Editor.clearSyntaxError

clearSyntaxError()

Public slot to handle the 'Clear all syntax error' context menu action.

#### Editor.close

close(alsoDelete = False)

Public method called when the window gets closed.

This overwritten method redirects the action to our ViewManager.closeEditor, which in turn calls our closeIt method.

alsoDelete
  ignored

#### Editor.closeIt

closeIt()

Public method called by the viewmanager to finally get rid of us.

#### Editor.codeCoverageShowAnnotations

codeCoverageShowAnnotations()

Public method to handle the show code coverage annotations context menu action.

#### Editor.commentLine

commentLine()

Public slot to comment the current line.

#### Editor.commentLineOrSelection

commentLineOrSelection()

Public slot to comment the current line or current selection.

#### Editor.commentSelection

commentSelection()

Public slot to comment the current selection.

#### Editor.contextMenuEvent

contextMenuEvent(evt)

Private method implementing the context menu event.

evt
  the context menu event (QContextMenuEvent)

#### Editor.curLineHasBreakpoint

curLineHasBreakpoint()

Public method to check for the presence of a breakpoint at the current line.

Returns:
  flag indicating the presence of a breakpoint (boolean)

#### Editor.dragEnterEvent

dragEnterEvent(event)

Protected method to handle the drag enter event.

event
  the drag enter event (QDragEnterEvent)

#### Editor.dragLeaveEvent

dragLeaveEvent(event)

Protected method to handle the drag leave event.

event
  the drag leave event (QDragLeaveEvent)

#### Editor.dragMoveEvent

dragMoveEvent(event)

Protected method to handle the drag move event.

event
  the drag move event (QDragMoveEvent)

#### Editor.dropEvent

dropEvent(event)

Protected method to handle the drop event.

event
  the drop event (QDropEvent)

#### Editor.editorCommand

editorCommand(cmd)

Public method to perform a simple editor command.

cmd
  the scintilla command to be performed

#### Editor.ensureVisible

ensureVisible(line)

Public slot to ensure, that the specified line is visible.

line
  line number to make visible

#### Editor.ensureVisibleTop

ensureVisibleTop(line)

Public slot to ensure, that the specified line is visible at the top of the editor.

line
  line number to make visible

#### Editor.exportFile

exportFile(exporterFormat)

Public method to export the file.

exporterFormat
  format the file should be exported into (string or QString)

#### Editor.extractTasks

extractTasks()

Public slot to extract all tasks.

#### Editor.fileRenamed

fileRenamed(fn)

Public slot to handle the editorRenamed signal.

fn
  filename to be set for the editor (QString or string).

#### Editor.focusInEvent

focusInEvent(event)

Protected method called when the editor receives focus.

This method checks for modifications of the current file and rereads it upon request. The cursor is placed at the current position assuming, that it is in the vicinity of the old position after the reread.

event
  the event object (QFocusEvent)

#### Editor.focusOutEvent

focusOutEvent(event)

Public method called when the editor loses focus.

event
  the event object (QFocusEvent)

#### Editor.getBookmarks

getBookmarks()

Public method to retrieve the bookmarks.

Returns:
  sorted list of all lines containing a bookmark (list of integer)

#### Editor.getCompleter

getCompleter()

Public method to retrieve a reference to the completer object.

Returns:
  the completer object (CompleterBase)

#### Editor.getCurrentWord

getCurrentWord()

Public method to get the word at the current position.

Returns:
  the word at that current position (QString)

#### Editor.getEncoding

getEncoding()

Public method to return the current encoding.

Returns:
  current encoding (string)

#### Editor.getFileName

getFileName()

Public method to return the name of the file being displayed.

Returns:
  filename of the displayed file (string)

#### Editor.getFileType

getFileType()

Public method to return the type of the file being displayed.

Returns:
  type of the displayed file (string)

#### Editor.getFolds

getFolds()

Public method to get a list line numbers of collapsed folds.

Returns:
  list of line numbers of folded lines (list of integer)

#### Editor.getHighlightPosition

getHighlightPosition()

Public method to return the position of the highlight bar.

Returns:
  line number of the highlight bar

#### Editor.getLanguage

getLanguage()

Public method to retrieve the language of the editor.

Returns:
  language of the editor (QString)

#### Editor.getLexer

getLexer()

Public method to retrieve a reference to the lexer object.

Returns:
  the lexer object (Lexer)

#### Editor.getMenu

getMenu(menuName)

Public method to get a reference to the main context menu or a submenu.

menuName
  name of the menu (string)

Returns:
  reference to the requested menu (QMenu) or None

#### Editor.getNoName

getNoName()

Public method to get the display string for an unnamed editor.

Returns:
  display string for this unnamed editor (QString)

#### Editor.getSearchText

getSearchText(selectionOnly = False)

Public method to determine the selection or the current word for the next search operation.

selectionOnly
  flag indicating that only selected text should be returned (boolean)

Returns:
  selection or current word (QString)

#### Editor.getSyntaxErrors

getSyntaxErrors()

Public method to retrieve the syntax error markers.

Returns:
  sorted list of all lines containing a syntax error (list of integer)

#### Editor.getWord

getWord(line, index, direction = 0, useWordChars = True)

Public method to get the word at a position.

line
  number of line to look at (int)
index
  position to look at (int)
direction
  direction to look in (0 = whole word, 1 = left, 2 = right)
useWordChars=
  flag indicating to use the wordCharacters method (boolean)

Returns:
  the word at that position (QString)

#### Editor.getWordBoundaries

getWordBoundaries(line, index, useWordChars = True)

Public method to get the word boundaries at a position.

line
  number of line to look at (int)
index
  position to look at (int)
useWordChars=
  flag indicating to use the wordCharacters method (boolean)

Returns:
  tuple with start and end indices of the word at the position (integer, integer)

#### Editor.getWordLeft

getWordLeft(line, index)

Public method to get the word to the left of a position.

line
  number of line to look at (int)
index
  position to look at (int)

Returns:
  the word to the left of that position (QString)

#### Editor.getWordRight

getWordRight(line, index)

Public method to get the word to the right of a position.

line
  number of line to look at (int)
index
  position to look at (int)

Returns:
  the word to the right of that position (QString)

#### Editor.gotoLine

gotoLine(line)

Public slot to jump to the beginning of a line.

line
  line number to go to

#### Editor.gotoSyntaxError

gotoSyntaxError()

Public slot to handle the 'Goto syntax error' context menu action.

#### Editor.handleMonospacedEnable

handleMonospacedEnable()

Private slot to handle the Use Monospaced Font context menu entry.

#### Editor.handleRenamed

handleRenamed(fn)

Public slot to handle the editorRenamed signal.

fn
  filename to be set for the editor (QString or string).

#### Editor.hasBookmarks

hasBookmarks()

Public method to check for the presence of bookmarks.

Returns:
  flag indicating the presence of bookmarks (boolean)

#### Editor.hasBreakpoints

hasBreakpoints()

Public method to check for the presence of breakpoints.

Returns:
  flag indicating the presence of breakpoints (boolean)

#### Editor.hasCoverageMarkers

hasCoverageMarkers()

Public method to test, if there are coverage markers.

#### Editor.hasMiniMenu

hasMiniMenu()

Public method to check the miniMenu flag.

Returns:
  flag indicating a minimized context menu (boolean)

#### Editor.hasSyntaxErrors

hasSyntaxErrors()

Public method to check for the presence of bookmarks.

Returns:
  flag indicating the presence of bookmarks (boolean)

#### Editor.hasTaskMarkers

hasTaskMarkers()

Public method to determine, if this editor contains any task markers.

Returns:
  flag indicating the presence of task markers (boolean)

#### Editor.highlight

highlight(line = None, error = False, syntaxError = False)

Public method to highlight (or de-highlight) a particular line.

line
  line number to highlight
error
  flag indicating whether the error highlight should be used
syntaxError
  flag indicating a syntax error

#### Editor.highlightVisible

highlightVisible()

Public method to make sure that the highlight is visible.

#### Editor.indentLineOrSelection

indentLineOrSelection()

Public slot to indent the current line or current selection

#### Editor.isPy3File

isPy3File()

Public method to return a flag indicating a Python3 file.

Returns:
  flag indicating a Python3 file (boolean)

#### Editor.isPyFile

isPyFile()

Public method to return a flag indicating a Python file.

Returns:
  flag indicating a Python file (boolean)

#### Editor.isRubyFile

isRubyFile()

Public method to return a flag indicating a Ruby file.

Returns:
  flag indicating a Ruby file (boolean)

#### Editor.isSpellCheckRegion

isSpellCheckRegion(pos)

Public method to check, if the given position is within a region, that should be spell checked.

pos
  position to be checked (integer)

Returns:
  flag indicating pos is in a spell check region (boolean)

#### Editor.keyPressEvent

keyPressEvent(ev)

Re-implemented to handle the user input a key at a time.

ev
  key event (QKeyEvent)

#### Editor.languageChanged

languageChanged(language, propagate = True)

Public slot handling a change of a connected editor's language.

language
  language to be set (string or QString)
propagate=
  flag indicating to propagate the change (boolean)

#### Editor.macroDelete

macroDelete()

Public method to delete a macro.

#### Editor.macroLoad

macroLoad()

Public method to load a macro from a file.

#### Editor.macroRecordingStart

macroRecordingStart()

Public method to start macro recording.

#### Editor.macroRecordingStop

macroRecordingStop()

Public method to stop macro recording.

#### Editor.macroRun

macroRun()

Public method to execute a macro.

#### Editor.macroSave

macroSave()

Public method to save a macro to a file.

#### Editor.menuEditBreakpoint

menuEditBreakpoint(line = None)

Public slot to handle the 'Edit breakpoint' context menu action.

line
  linenumber of the breakpoint to edit

#### Editor.menuNextBreakpoint

menuNextBreakpoint()

Public slot to handle the 'Next breakpoint' context menu action.

#### Editor.menuPreviousBreakpoint

menuPreviousBreakpoint()

Public slot to handle the 'Previous breakpoint' context menu action.

#### Editor.menuToggleBookmark

menuToggleBookmark()

Public slot to handle the 'Toggle bookmark' context menu action.

#### Editor.menuToggleBreakpoint

menuToggleBreakpoint()

Public slot to handle the 'Toggle breakpoint' context menu action.

#### Editor.mousePressEvent

mousePressEvent(event)

Protected method to handle the mouse press event.

event
  the mouse press event (QMouseEvent)

#### Editor.newBreakpointWithProperties

newBreakpointWithProperties(line, properties)

Private method to set a new breakpoint and its properties.

line
  line number of the breakpoint
properties
  properties for the breakpoint (tuple) (condition, temporary flag, enabled flag, ignore count)

#### Editor.nextBookmark

nextBookmark()

Public slot to handle the 'Next bookmark' context menu action.

#### Editor.nextTask

nextTask()

Public slot to handle the 'Next task' context menu action.

#### Editor.nextUncovered

nextUncovered()

Public slot to handle the 'Next uncovered' context menu action.

#### Editor.previousBookmark

previousBookmark()

Public slot to handle the 'Previous bookmark' context menu action.

#### Editor.previousTask

previousTask()

Public slot to handle the 'Previous task' context menu action.

#### Editor.previousUncovered

previousUncovered()

Public slot to handle the 'Previous uncovered' context menu action.

#### Editor.printFile

printFile()

Public slot to print the text.

#### Editor.printPreviewFile

printPreviewFile()

Public slot to show a print preview of the text.

#### Editor.projectClosed

projectClosed()

Public slot to handle the closing of a project.

#### Editor.projectLexerAssociationsChanged

projectLexerAssociationsChanged()

Public slot to handle changes of the project lexer associations.

#### Editor.projectOpened

projectOpened()

Public slot to handle the opening of a project.

#### Editor.readFile

readFile(fn, createIt = False)

Public slot to read the text from a file.

fn
  filename to read from (string or QString)
createIt
  flag indicating the creation of a new file, if the given one doesn't exist (boolean)

#### Editor.readLine0

readLine0(fn, createIt = False)

Public slot to read the first line from a file.

fn
  filename to read from (string or QString)
createIt
  flag indicating the creation of a new file, if the given one doesn't exist (boolean)

Returns:
  first line of the file (string)

#### Editor.readSettings

readSettings()

Public slot to read the settings into our lexer.

#### Editor.redo

redo()

Public method to redo the last recorded change.

#### Editor.refresh

refresh()

Public slot to refresh the editor contents.

#### Editor.removeClone

removeClone(editor)

Public method to remove a clone from our list.

clone
  reference to the cloned editor (Editor)

#### Editor.revertToUnmodified

revertToUnmodified()

Public method to revert back to the last saved state.

#### Editor.saveFile

saveFile(saveas = False, path = None)

Public slot to save the text to a file.

saveas
  flag indicating a 'save as' action
path
  directory to save the file in (string or QString)

Returns:
  tuple of two values (boolean, string) giving a success indicator and the name of the saved file

#### Editor.saveFileAs

saveFileAs(path = None)

Public slot to save a file with a new name.

path
  directory to save the file in (string or QString)

Returns:
  tuple of two values (boolean, string) giving a success indicator and the name of the saved file

#### Editor.selectCurrentWord

selectCurrentWord()

Public method to select the current word.

#### Editor.selectWord

selectWord(line, index)

Public method to select the word at a position.

line
  number of line to look at (int)
index
  position to look at (int)

#### Editor.setAutoCompletionEnabled

setAutoCompletionEnabled(enable)

Public method to enable/disable autocompletion.

enable
  flag indicating the desired autocompletion status

#### Editor.setAutoCompletionHook

setAutoCompletionHook(func)

Public method to set an autocompletion hook.

func
  Function to be set to handle autocompletion. func should be a function taking a reference to the editor and a boolean indicating to complete a context.

#### Editor.setAutoSpellChecking

setAutoSpellChecking()

Public method to set the automatic spell checking.

#### Editor.setCallTipHook

setCallTipHook(func)

Public method to set a calltip hook.

func
  Function to be set to determine calltips. func should be a function taking a reference to the editor, a position into the text and the amount of commas to the left of the cursor. It should return the possible calltips as a list of strings.

#### Editor.setEolModeByEolString

setEolModeByEolString(eolStr)

Public method to set the eol mode given the eol string.

eolStr
  eol string (string)

#### Editor.setLanguage

setLanguage(filename, initTextDisplay = True, propagate = True, pyname = "")

Public method to set a lexer language.

filename
  filename used to determine the associated lexer language (string)
initTextDisplay
  flag indicating an initialization of the text display is required as well (boolean)
propagate=
  flag indicating to propagate the change (boolean)
pyname=
  name of the pygments lexer to use (string)

#### Editor.setMonospaced

setMonospaced(on)

Public method to set/reset a monospaced font.

on
  flag to indicate usage of a monospace font (boolean)

#### Editor.setNoName

setNoName(noName)

Public method to set the display string for an unnamed editor.

noName
  display string for this unnamed editor (QString)

#### Editor.setSearchIndicator

setSearchIndicator(startPos, indicLength)

Public method to set a search indicator for the given range.

startPos
  start position of the indicator (integer)
indicLength
  length of the indicator (integer)

#### Editor.setSpellingForProject

setSpellingForProject()

Public method to set the spell checking options for files belonging to the current project.

#### Editor.shortenEmptyLines

shortenEmptyLines()

Public slot to compress lines consisting solely of whitespace characters.

#### Editor.shouldAutosave

shouldAutosave()

Public slot to check the autosave flags.

Returns:
  flag indicating this editor should be saved (boolean)

#### Editor.smartIndentLineOrSelection

smartIndentLineOrSelection()

Public slot to indent current line smartly.

#### Editor.streamCommentLine

streamCommentLine()

Public slot to stream comment the current line.

#### Editor.streamCommentLineOrSelection

streamCommentLineOrSelection()

Public slot to stream comment the current line or current selection.

#### Editor.streamCommentSelection

streamCommentSelection()

Public slot to comment the current selection.

#### Editor.toggleBookmark

toggleBookmark(line)

Public method to toggle a bookmark.

line
  line number of the bookmark

#### Editor.toggleSyntaxError

toggleSyntaxError(line, index, error, msg = "", show = False)

Public method to toggle a syntax error indicator.

line
  line number of the syntax error (integer)
index
  index number of the syntax error (integer)
error
  flag indicating if the error marker should be set or deleted (boolean)
msg
  error message (string)
show=
  flag indicating to set the cursor to the error position (boolean)

#### Editor.uncommentLine

uncommentLine()

Public slot to uncomment the current line.

This happens only, if it was commented by using the commentLine() or commentSelection() slots

#### Editor.uncommentLineOrSelection

uncommentLineOrSelection()

Public slot to uncomment the current line or current selection.

This happens only, if it was commented by using the commentLine() or commentSelection() slots

#### Editor.uncommentSelection

uncommentSelection()

Public slot to uncomment the current selection.

This happens only, if it was commented by using the commentLine() or commentSelection() slots

#### Editor.undo

undo()

Public method to undo the last recorded change.

#### Editor.unindentLineOrSelection

unindentLineOrSelection()

Public slot to unindent the current line or current selection.

#### Editor.unsetAutoCompletionHook

unsetAutoCompletionHook()

Public method to unset a previously installed autocompletion hook.

#### Editor.unsetCallTipHook

unsetCallTipHook()

Public method to unset a calltip hook.

#### Editor.writeFile

writeFile(fn)

Public slot to write the text to a file.

fn
  filename to write to (string or QString)

Returns:
  flag indicating success

Up