# eric7.UI.BrowserModel

Module implementing the browser model.

### Global Attributes

BrowserItemAttribute
BrowserItemAttributes
BrowserItemClass
BrowserItemCoding
BrowserItemDirectory
BrowserItemFile
BrowserItemImport
BrowserItemImports
BrowserItemMethod
BrowserItemRoot
BrowserItemSysPath

### Classes

BrowserClassAttributeItem | Class implementing the data structure for browser class attribute items.
BrowserClassAttributesItem | Class implementing the data structure for browser class attributes items.
BrowserClassItem | Class implementing the data structure for browser class items.
BrowserCodingItem | Class implementing the data structure for browser coding items.
BrowserDirectoryItem | Class implementing the data structure for browser directory items.
BrowserFileItem | Class implementing the data structure for browser file items.
BrowserGlobalsItem | Class implementing the data structure for browser globals items.
BrowserImportItem | Class implementing the data structure for browser imported module and imported names items.
BrowserImportsItem | Class implementing the data structure for browser import items.
BrowserItem | Class implementing the data structure for browser items.
BrowserMethodItem | Class implementing the data structure for browser method items.
BrowserModel | Class implementing the browser model.
BrowserSysPathItem | Class implementing the data structure for browser sys.path items.

### Functions

None

## BrowserClassAttributeItem

Class implementing the data structure for browser class attribute items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserClassAttributeItem | Constructor
attributeObject | Public method returning the class object.
fileName | Public method returning the filename.
isPublic | Public method returning the public visibility status.
lessThan | Public method to check, if the item is less than the other one.
lineno | Public method returning the line number defining this object.
linenos | Public method returning the line numbers this object is assigned to.

### Static Methods

None

#### BrowserClassAttributeItem (Constructor)

BrowserClassAttributeItem(parent, attribute, isClass=False)

Constructor

parent
  parent item
attribute
  reference to the attribute object
isClass
  flag indicating a class attribute (boolean)

#### BrowserClassAttributeItem.attributeObject

attributeObject()

Public method returning the class object.

Return:
  reference to the class object

#### BrowserClassAttributeItem.fileName

fileName()

Public method returning the filename.

Return:
  filename (string)

#### BrowserClassAttributeItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
  flag indicating public visibility (boolean)

#### BrowserClassAttributeItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserClassAttributeItem.lineno

lineno()

Public method returning the line number defining this object.

Return:
  line number defining the object (integer)

#### BrowserClassAttributeItem.linenos

linenos()

Public method returning the line numbers this object is assigned to.

Return:
  line number the object is assigned to (list of integers)

Up

## BrowserClassAttributesItem

Class implementing the data structure for browser class attributes items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserClassAttributesItem | Constructor
attributes | Public method returning the attribute list.
isClassAttributes | Public method returning the attributes type.
lessThan | Public method to check, if the item is less than the other one.
name | Public method to return the name of the item.

### Static Methods

None

#### BrowserClassAttributesItem (Constructor)

BrowserClassAttributesItem(parent, attributes, text, isClass=False)

Constructor

parent
  parent item
attributes
  list of attributes
text
  text to be shown by this item (string)
isClass
  flag indicating class attributes (boolean)

#### BrowserClassAttributesItem.attributes

attributes()

Public method returning the attribute list.

Return:
  reference to the list of attributes

#### BrowserClassAttributesItem.isClassAttributes

isClassAttributes()

Public method returning the attributes type.

Return:
  flag indicating class attributes (boolean)

#### BrowserClassAttributesItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserClassAttributesItem.name

name()

Public method to return the name of the item.

Return:
  name of the item (string)

Up

## BrowserClassItem

Class implementing the data structure for browser class items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserClassItem | Constructor
boundaries | Public method returning the boundaries of the method definition.
classObject | Public method returning the class object.
fileName | Public method returning the filename.
isPublic | Public method returning the public visibility status.
lessThan | Public method to check, if the item is less than the other one.
lineno | Public method returning the line number defining this object.
name | Public method to return the name of the item.

### Static Methods

None

#### BrowserClassItem (Constructor)

BrowserClassItem(parent, cl, filename)

Constructor

parent
  parent item
cl
  Class object to be shown
filename
  filename of the file defining this class

#### BrowserClassItem.boundaries

boundaries()

Public method returning the boundaries of the method definition.

Return:
  tuple with start end end line number (integer, integer)

#### BrowserClassItem.classObject

classObject()

Public method returning the class object.

Return:
  reference to the class object

#### BrowserClassItem.fileName

fileName()

Public method returning the filename.

Return:
  filename (string)

#### BrowserClassItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
  flag indicating public visibility (boolean)

#### BrowserClassItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserClassItem.lineno

lineno()

Public method returning the line number defining this object.

Return:
  line number defining the object (integer)

#### BrowserClassItem.name

name()

Public method to return the name of the item.

Return:
  name of the item (string)

Up

## BrowserCodingItem

Class implementing the data structure for browser coding items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserCodingItem | Constructor
lessThan | Public method to check, if the item is less than the other one.
lineno | Public method returning the line number of the coding line.

### Static Methods

None

#### BrowserCodingItem (Constructor)

BrowserCodingItem(parent, text, linenumber)

Constructor

parent (BrowserItem)
  parent item
text (str)
  text to be shown by this item
linenumber (int)
  line number of the coding line

#### BrowserCodingItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserCodingItem.lineno

lineno()

Public method returning the line number of the coding line.

Return:
  line number defining the coding line

Return Type:
  int

Up

## BrowserDirectoryItem

Class implementing the data structure for browser directory items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserDirectoryItem | Constructor
dirName | Public method returning the directory name.
lessThan | Public method to check, if the item is less than the other one.
name | Public method to return the name of the item.
setName | Public method to set the directory name.

### Static Methods

None

#### BrowserDirectoryItem (Constructor)

BrowserDirectoryItem(parent, dinfo, full=True)

Constructor

parent
  parent item
dinfo
  dinfo is the string for the directory (string)
full
  flag indicating full pathname should be displayed (boolean)

#### BrowserDirectoryItem.dirName

dirName()

Public method returning the directory name.

Return:
  directory name (string)

#### BrowserDirectoryItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserDirectoryItem.name

name()

Public method to return the name of the item.

Return:
  name of the item (string)

#### BrowserDirectoryItem.setName

setName(dinfo, full=True)

Public method to set the directory name.

dinfo
  dinfo is the string for the directory (string)
full
  flag indicating full pathname should be displayed (boolean)

Up

## BrowserFileItem

Class implementing the data structure for browser file items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserFileItem | Constructor
dirName | Public method returning the directory name.
fileExt | Public method returning the file extension.
fileName | Public method returning the filename.
isCythonFile | Public method to check, if this file is a Cython file.
isDFile | Public method to check, if this file is a D file.
isDesignerFile | Public method to check, if this file is a Qt-Designer file.
isEricGraphicsFile | Public method to check, if this is an eric graphics file.
isIdlFile | Public method to check, if this file is a CORBA IDL file.
isJavaScriptFile | Public method to check, if this file is a JavaScript file.
isLinguistFile | Public method to check, if this file is a Qt-Linguist file.
isMultiProjectFile | Public method to check, if this file is an eric multi project file.
isPixmapFile | Public method to check, if this file is a pixmap file.
isProjectFile | Public method to check, if this file is an eric project file.
isProtobufFile | Public method to check, if this file is a Google Protocol Buffer file.
isPython3File | Public method to check, if this file is a Python3 script.
isResourcesFile | Public method to check, if this file is a Qt-Resources file.
isRubyFile | Public method to check, if this file is a Ruby script.
isSvgFile | Public method to check, if this file is a SVG file.
lessThan | Public method to check, if the item is less than the other one.
moduleName | Public method returning the module name.
name | Public method to return the name of the item.
setName | Public method to set the directory name.

### Static Methods

None

#### BrowserFileItem (Constructor)

BrowserFileItem(parent, finfo, full=True, sourceLanguage="")

Constructor

parent
  parent item
finfo
  the string for the file (string)
full
  flag indicating full pathname should be displayed (boolean)
sourceLanguage
  source code language of the project (string)

#### BrowserFileItem.dirName

dirName()

Public method returning the directory name.

Return:
  directory name (string)

#### BrowserFileItem.fileExt

fileExt()

Public method returning the file extension.

Return:
  file extension (string)

#### BrowserFileItem.fileName

fileName()

Public method returning the filename.

Return:
  filename (string)

#### BrowserFileItem.isCythonFile

isCythonFile()

Public method to check, if this file is a Cython file.

Return:
  flag indicating a Cython file

Return Type:
  bool

#### BrowserFileItem.isDFile

isDFile()

Public method to check, if this file is a D file.

Return:
  flag indicating a D file (boolean)

#### BrowserFileItem.isDesignerFile

isDesignerFile()

Public method to check, if this file is a Qt-Designer file.

Return:
  flag indicating a Qt-Designer file

Return Type:
  bool

#### BrowserFileItem.isEricGraphicsFile

isEricGraphicsFile()

Public method to check, if this is an eric graphics file.

Return:
  flag indicating an eric graphics file

Return Type:
  bool

#### BrowserFileItem.isIdlFile

isIdlFile()

Public method to check, if this file is a CORBA IDL file.

Return:
  flag indicating a CORBA IDL file

Return Type:
  bool

#### BrowserFileItem.isJavaScriptFile

isJavaScriptFile()

Public method to check, if this file is a JavaScript file.

Return:
  flag indicating a JavaScript file

Return Type:
  bool

#### BrowserFileItem.isLinguistFile

isLinguistFile()

Public method to check, if this file is a Qt-Linguist file.

Return:
  flag indicating a Qt-Linguist file

Return Type:
  bool

#### BrowserFileItem.isMultiProjectFile

isMultiProjectFile()

Public method to check, if this file is an eric multi project file.

Return:
  flag indicating an eric project file

Return Type:
  bool

#### BrowserFileItem.isPixmapFile

isPixmapFile()

Public method to check, if this file is a pixmap file.

Return:
  flag indicating a pixmap file

Return Type:
  bool

#### BrowserFileItem.isProjectFile

isProjectFile()

Public method to check, if this file is an eric project file.

Return:
  flag indicating an eric project file

Return Type:
  bool

#### BrowserFileItem.isProtobufFile

isProtobufFile()

Public method to check, if this file is a Google Protocol Buffer file.

Return:
  flag indicating a protobuf file

Return Type:
  bool

#### BrowserFileItem.isPython3File

isPython3File()

Public method to check, if this file is a Python3 script.

Return:
  flag indicating a Python3 file

Return Type:
  bool

#### BrowserFileItem.isResourcesFile

isResourcesFile()

Public method to check, if this file is a Qt-Resources file.

Return:
  flag indicating a Qt-Resources file

Return Type:
  bool

#### BrowserFileItem.isRubyFile

isRubyFile()

Public method to check, if this file is a Ruby script.

Return:
  flag indicating a Ruby file

Return Type:
  bool

#### BrowserFileItem.isSvgFile

isSvgFile()

Public method to check, if this file is a SVG file.

Return:
  flag indicating a SVG file

Return Type:
  bool

#### BrowserFileItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserFileItem.moduleName

moduleName()

Public method returning the module name.

Return:
  module name (string)

#### BrowserFileItem.name

name()

Public method to return the name of the item.

Return:
  name of the item (string)

#### BrowserFileItem.setName

setName(finfo, full=True)

Public method to set the directory name.

finfo
  the string for the file (string)
full
  flag indicating full pathname should be displayed (boolean)

Up

## BrowserGlobalsItem

Class implementing the data structure for browser globals items.

### Derived from

BrowserClassAttributesItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserGlobalsItem | Constructor

### Static Methods

None

#### BrowserGlobalsItem (Constructor)

BrowserGlobalsItem(parent, attributes, text)

Constructor

parent
  parent item
attributes
  list of attributes
text
  text to be shown by this item (string)

Up

## BrowserImportItem

Class implementing the data structure for browser imported module and imported names items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserImportItem | Constructor
fileName | Public method returning the filename.
lessThan | Public method to check, if the item is less than the other one.
lineno | Public method returning the line number of the first import.
linenos | Public method returning the line numbers of all imports.

### Static Methods

None

#### BrowserImportItem (Constructor)

BrowserImportItem(parent, text, filename, lineNumbers, isModule=True)

Constructor

parent
  parent item
text
  text to be shown by this item (string)
filename
  name of the file (string)
lineNumbers
  list of line numbers of the import statement (list of integer)
isModule
  flag indicating a module item entry (boolean)

#### BrowserImportItem.fileName

fileName()

Public method returning the filename.

Return:
  filename (string)

#### BrowserImportItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserImportItem.lineno

lineno()

Public method returning the line number of the first import.

Return:
  line number of the first import (integer)

#### BrowserImportItem.linenos

linenos()

Public method returning the line numbers of all imports.

Return:
  line numbers of all imports (list of integers)

Up

## BrowserImportsItem

Class implementing the data structure for browser import items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserImportsItem | Constructor
lessThan | Public method to check, if the item is less than the other one.

### Static Methods

None

#### BrowserImportsItem (Constructor)

BrowserImportsItem(parent, text)

Constructor

parent
  parent item
text
  text to be shown by this item (string)

#### BrowserImportsItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

Up

## BrowserItem

Class implementing the data structure for browser items.

### Derived from

None

### Class Attributes

None

### Class Methods

None

### Methods

BrowserItem | Constructor
appendChild | Public method to add a child to this item.
child | Public method to get a child id.
childCount | Public method to get the number of available child items.
children | Public method to get the ids of all child items.
columnCount | Public method to get the number of available data items.
data | Public method to get a specific data item.
getIcon | Public method to get the items icon.
isLazyPopulated | Public method to check, if this item should be populated lazyly.
isPopulated | Public method to chek, if this item is populated.
isPublic | Public method returning the public visibility status.
isSymlink | Public method to check, if the items is a symbolic link.
lessThan | Public method to check, if the item is less than the other one.
parent | Public method to get the reference to the parent item.
removeChild | Public method to remove a child.
removeChildren | Public method to remove all children.
row | Public method to get the row number of this item.
type | Public method to get the item type.

### Static Methods

None

#### BrowserItem (Constructor)

BrowserItem(parent, data)

Constructor

parent
  reference to the parent item
data
  single data of the item

#### BrowserItem.appendChild

appendChild(child)

Public method to add a child to this item.

child
  reference to the child item to add (BrowserItem)

#### BrowserItem.child

child(row)

Public method to get a child id.

row
  number of child to get the id of (integer)

Return:
  reference to the child item (BrowserItem)

#### BrowserItem.childCount

childCount()

Public method to get the number of available child items.

Return:
  number of child items (integer)

#### BrowserItem.children

children()

Public method to get the ids of all child items.

Return:
  references to all child items (list of BrowserItem)

#### BrowserItem.columnCount

columnCount()

Public method to get the number of available data items.

Return:
  number of data items (integer)

#### BrowserItem.data

data(column)

Public method to get a specific data item.

column
  number of the requested data item (integer)

Return:
  stored data item

#### BrowserItem.getIcon

getIcon()

Public method to get the items icon.

Return:
  the icon (QIcon)

#### BrowserItem.isLazyPopulated

isLazyPopulated()

Public method to check, if this item should be populated lazyly.

Return:
  lazy population flag (boolean)

#### BrowserItem.isPopulated

isPopulated()

Public method to chek, if this item is populated.

Return:
  population status (boolean)

#### BrowserItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
  flag indicating public visibility (boolean)

#### BrowserItem.isSymlink

isSymlink()

Public method to check, if the items is a symbolic link.

Return:
  flag indicating a symbolic link (boolean)

#### BrowserItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserItem.parent

parent()

Public method to get the reference to the parent item.

Return:
  reference to the parent item

#### BrowserItem.removeChild

removeChild(child)

Public method to remove a child.

child
  reference to the child to remove (BrowserItem)

#### BrowserItem.removeChildren

removeChildren()

Public method to remove all children.

#### BrowserItem.row

row()

Public method to get the row number of this item.

Return:
  row number (integer)

#### BrowserItem.type

type()

Public method to get the item type.

Return:
  type of the item

Up

## BrowserMethodItem

Class implementing the data structure for browser method items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserMethodItem | Constructor
boundaries | Public method returning the boundaries of the method definition.
fileName | Public method returning the filename.
functionObject | Public method returning the function object.
isPublic | Public method returning the public visibility status.
lessThan | Public method to check, if the item is less than the other one.
lineno | Public method returning the line number defining this object.
name | Public method to return the name of the item.

### Static Methods

None

#### BrowserMethodItem (Constructor)

BrowserMethodItem(parent, fn, filename)

Constructor

parent
  parent item
fn
  Function object to be shown
filename
  filename of the file defining this class (string)

#### BrowserMethodItem.boundaries

boundaries()

Public method returning the boundaries of the method definition.

Return:
  tuple with start end end line number (integer, integer)

#### BrowserMethodItem.fileName

fileName()

Public method returning the filename.

Return:
  filename (string)

#### BrowserMethodItem.functionObject

functionObject()

Public method returning the function object.

Return:
  reference to the function object

#### BrowserMethodItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
  flag indicating public visibility (boolean)

#### BrowserMethodItem.lessThan

lessThan(other, column, order)

Public method to check, if the item is less than the other one.

other
  reference to item to compare against (BrowserItem)
column
  column number to use for the comparison (integer)
order
  sort order (Qt.SortOrder) (for special sorting)

Return:
  true, if this item is less than other (boolean)

#### BrowserMethodItem.lineno

lineno()

Public method returning the line number defining this object.

Return:
  line number defining the object (integer)

#### BrowserMethodItem.name

name()

Public method to return the name of the item.

Return:
  name of the item (string)

Up

## BrowserModel

Class implementing the browser model.

### Derived from

QAbstractItemModel

### Class Attributes

None

### Class Methods

None

### Methods

BrowserModel | Constructor
__populateModel | Private method to populate the browser model.
_addItem | Protected slot to add an item.
_addWatchedItem | Protected method to watch an item.
_removeWatchedItem | Protected method to remove a watched item.
addItem | Public slot to add an item.
addTopLevelDir | Public method to add a new toplevel directory.
clear | Public method to clear the model.
columnCount | Public method to get the number of columns.
data | Public method to get data of an item.
directoryChanged | Public slot to handle the directoryChanged signal of the watcher.
fileChanged | Public method to react upon file changes.
flags | Public method to get the item flags.
hasChildren | Public method to check for the presence of child items.
headerData | Public method to get the header data.
index | Public method to create an index.
interpreterChanged | Public method to handle a change of the debug client's interpreter.
item | Public method to get a reference to an item.
parent | Public method to get the index of the parent object.
populateClassAttributesItem | Public method to populate a class attributes item's subtree.
populateClassItem | Public method to populate a class item's subtree.
populateDirectoryItem | Public method to populate a directory item's subtree.
populateFileItem | Public method to populate a file item's subtree.
populateItem | Public method to populate an item's subtree.
populateMethodItem | Public method to populate a method item's subtree.
populateSysPathItem | Public method to populate a sys.path item's subtree.
programChange | Public method to change the entry for the directory of file being debugged.
removeToplevelDir | Public method to remove a toplevel directory.
repopulateFileItem | Public method to repopulate a file item.
rowCount | Public method to get the number of rows.
saveToplevelDirs | Public slot to save the toplevel directories.

### Static Methods

None

#### BrowserModel (Constructor)

BrowserModel(parent=None, nopopulate=False)

Constructor

parent
  reference to parent object (QObject)
nopopulate
  flag indicating to not populate the model (boolean)

#### BrowserModel.__populateModel

__populateModel()

Private method to populate the browser model.

#### BrowserModel._addItem

_addItem(itm, parentItem)

Protected slot to add an item.

itm
  reference to item to add (BrowserItem)
parentItem
  reference to item to add to (BrowserItem)

#### BrowserModel._addWatchedItem

_addWatchedItem(itm)

Protected method to watch an item.

itm
  item to be watched (BrowserDirectoryItem)

#### BrowserModel._removeWatchedItem

_removeWatchedItem(itm)

Protected method to remove a watched item.

itm
  item to be removed (BrowserDirectoryItem)

#### BrowserModel.addItem

addItem(itm, parent=None)

Public slot to add an item.

itm
  item to add (BrowserItem)
parent
  index of parent item (QModelIndex)

#### BrowserModel.addTopLevelDir

addTopLevelDir(dirname)

Public method to add a new toplevel directory.

dirname
  name of the new toplevel directory (string)

#### BrowserModel.clear

clear()

Public method to clear the model.

#### BrowserModel.columnCount

columnCount(parent=None)

Public method to get the number of columns.

parent
  index of parent item (QModelIndex)

Return:
  number of columns (integer)

#### BrowserModel.data

data(index, role)

Public method to get data of an item.

index
  index of the data to retrieve (QModelIndex)
role
  role of data (Qt.ItemDataRole)

Return:
  requested data

#### BrowserModel.directoryChanged

directoryChanged(path)

Public slot to handle the directoryChanged signal of the watcher.

path
  path of the directory (string)

#### BrowserModel.fileChanged

fileChanged(fileName)

Public method to react upon file changes.

fileName (str)
  path of the changed file

#### BrowserModel.flags

flags(index)

Public method to get the item flags.

index
  index of the data to retrieve (QModelIndex)

Return:
  requested flags (Qt.ItemFlags)

#### BrowserModel.hasChildren

hasChildren(parent=None)

Public method to check for the presence of child items.

We always return True for normal items in order to do lazy population of the tree.

parent
  index of parent item (QModelIndex)

Return:
  flag indicating the presence of child items (boolean)

#### BrowserModel.headerData

headerData(section, orientation, role=Qt.ItemDataRole.DisplayRole)

Public method to get the header data.

section
  number of section to get data for (integer)
orientation
  header orientation (Qt.Orientation)
role
  role of data (Qt.ItemDataRole)

Return:
  requested header data

#### BrowserModel.index

index(row, column, parent=None)

Public method to create an index.

row
  row number of the new index (integer)
column
  column number of the new index (integer)
parent
  index of parent item (QModelIndex)

Return:
  index object (QModelIndex)

#### BrowserModel.interpreterChanged

interpreterChanged(interpreter)

Public method to handle a change of the debug client's interpreter.

interpreter
  interpreter of the debug client (string)

#### BrowserModel.item

item(index)

Public method to get a reference to an item.

index
  index of the data to retrieve (QModelIndex)

Return:
  requested item reference (BrowserItem)

#### BrowserModel.parent

parent(index)

Public method to get the index of the parent object.

index
  index of the item (QModelIndex)

Return:
  index of parent item (QModelIndex)

#### BrowserModel.populateClassAttributesItem

populateClassAttributesItem(parentItem, repopulate=False)

Public method to populate a class attributes item's subtree.

parentItem
  reference to the class attributes item to be populated
repopulate
  flag indicating a repopulation (boolean)

#### BrowserModel.populateClassItem

populateClassItem(parentItem, repopulate=False)

Public method to populate a class item's subtree.

parentItem
  reference to the class item to be populated
repopulate
  flag indicating a repopulation (boolean)

#### BrowserModel.populateDirectoryItem

populateDirectoryItem(parentItem, repopulate=False)

Public method to populate a directory item's subtree.

parentItem
  reference to the directory item to be populated
repopulate
  flag indicating a repopulation (boolean)

#### BrowserModel.populateFileItem

populateFileItem(parentItem, repopulate=False)

Public method to populate a file item's subtree.

parentItem
  reference to the file item to be populated
repopulate
  flag indicating a repopulation (boolean)

#### BrowserModel.populateItem

populateItem(parentItem, repopulate=False)

Public method to populate an item's subtree.

parentItem
  reference to the item to be populated
repopulate
  flag indicating a repopulation (boolean)

#### BrowserModel.populateMethodItem

populateMethodItem(parentItem, repopulate=False)

Public method to populate a method item's subtree.

parentItem
  reference to the method item to be populated
repopulate
  flag indicating a repopulation (boolean)

#### BrowserModel.populateSysPathItem

populateSysPathItem(parentItem, repopulate=False)

Public method to populate a sys.path item's subtree.

parentItem
  reference to the sys.path item to be populated
repopulate
  flag indicating a repopulation (boolean)

#### BrowserModel.programChange

programChange(dirname)

Public method to change the entry for the directory of file being debugged.

dirname
  name of the directory containing the file (string)

#### BrowserModel.removeToplevelDir

removeToplevelDir(index)

Public method to remove a toplevel directory.

index
  index of the toplevel directory to be removed (QModelIndex)

#### BrowserModel.repopulateFileItem

repopulateFileItem(itm)

Public method to repopulate a file item.

itm (BrowserFileItem)
  reference to the item to be repopulated

#### BrowserModel.rowCount

rowCount(parent=None)

Public method to get the number of rows.

parent
  index of parent item (QModelIndex)

Return:
  number of rows (integer)

#### BrowserModel.saveToplevelDirs

saveToplevelDirs()

Public slot to save the toplevel directories.

Up

## BrowserSysPathItem

Class implementing the data structure for browser sys.path items.

### Derived from

BrowserItem

### Class Attributes

None

### Class Methods

None

### Methods

BrowserSysPathItem | Constructor
name | Public method to return the name of the item.

### Static Methods

None

#### BrowserSysPathItem (Constructor)

BrowserSysPathItem(parent)

Constructor

parent
  parent item

#### BrowserSysPathItem.name

name()

Public method to return the name of the item.

Return:
  name of the item (string)

Up