eric6.QScintilla.EditorOutlineModel
Module implementing the editor outline model.
Global Attributes
Classes
Functions
EditorOutlineModel
Class implementing the editor outline model.
Derived from
BrowserModel
Class Attributes
Class Methods
Methods
| EditorOutlineModel |
Constructor |
| __populateModel |
Private slot to populate the model. |
| editor |
Public method to retrieve a reference to the editor. |
| fileName |
Public method to retrieve the file name of the editor. |
| findItem |
Function to iteratively search for an item containing the given line. |
| isPopulated |
Public method to check, if the model is populated. |
| itemIndexByLine |
Public method to find an item's index given a line number. |
| repopulate |
Public slot to repopulate the model. |
Static Methods
EditorOutlineModel (Constructor)
EditorOutlineModel(editor, populate=True)
Constructor
- editor (Editor)
-
reference to the editor containing the source text
- populate (bool)
-
flag indicating to populate the outline
EditorOutlineModel.__populateModel
__populateModel(repopulate=False)
Private slot to populate the model.
- repopulate (bool)
-
flag indicating a repopulation
EditorOutlineModel.editor
editor()
Public method to retrieve a reference to the editor.
- Returns:
-
reference to the editor
- Return Type:
-
Editor
EditorOutlineModel.fileName
fileName()
Public method to retrieve the file name of the editor.
- Returns:
-
file name of the editor
- Return Type:
-
str
EditorOutlineModel.findItem
findItem(parent)
Function to iteratively search for an item containing the given
line.
- lineno (int)
-
one based line number of the item
- parent (BrowserItem)
-
reference to the parent item
- Returns:
-
found item or None
- Return Type:
-
BrowserItem
EditorOutlineModel.isPopulated
isPopulated()
Public method to check, if the model is populated.
- Returns:
-
flag indicating a populated model
- Return Type:
-
bool
EditorOutlineModel.itemIndexByLine
itemIndexByLine(lineno)
Public method to find an item's index given a line number.
- lineno (int)
-
one based line number of the item
- Returns:
-
index of the item found
- Return Type:
-
QModelIndex
EditorOutlineModel.repopulate
repopulate()
Public slot to repopulate the model.