# eric7.QScintilla.EditorOutlineModel

Module implementing the editor outline model.

### Global Attributes

None

### Classes

EditorOutlineModel | Class implementing the editor outline model.
EditorOutlineSortFilterProxyModel | Class implementing the editor outline sort filter proxy model.

### Functions

None

## EditorOutlineModel

Class implementing the editor outline model.

### Derived from

BrowserModel

### Class Attributes

SupportedLanguages

### Class Methods

getSupportedLanguages | Class method to get the list of supported programming languages.

### 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

None

#### EditorOutlineModel.getSupportedLanguages (class method)

getSupportedLanguages()

Class method to get the list of supported programming languages.

Return:
  list of supported programming languages

Return Type:
  str

#### 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.

Return:
  reference to the editor

Return Type:
  Editor

#### EditorOutlineModel.fileName

fileName()

Public method to retrieve the file name of the editor.

Return:
  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

Return:
  found item or None

Return Type:
  BrowserItem

#### EditorOutlineModel.isPopulated

isPopulated()

Public method to check, if the model is populated.

Return:
  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

Return:
  index of the item found

Return Type:
  QModelIndex

#### EditorOutlineModel.repopulate

repopulate()

Public slot to repopulate the model.

Up

## EditorOutlineSortFilterProxyModel

Class implementing the editor outline sort filter proxy model.

### Derived from

BrowserSortFilterProxyModel

### Class Attributes

None

### Class Methods

None

### Methods

EditorOutlineSortFilterProxyModel | Constructor
filterAcceptsRow | Public method to filter rows.

### Static Methods

None

#### EditorOutlineSortFilterProxyModel (Constructor)

EditorOutlineSortFilterProxyModel(parent=None)

Constructor

parent (QObject)
  reference to the parent object

#### EditorOutlineSortFilterProxyModel.filterAcceptsRow

filterAcceptsRow(_source_row, _source_parent)

Public method to filter rows.

This overrides the filtering of the parent class by always accept the row.

_source_row (int)
  row number (in the source model) of item
_source_parent (QModelIndex)
  index of parent item (in the source model) of item

Return:
  flag indicating, if the item should be shown

Return Type:
  bool

Up