eric7.UI.BrowserModel

Module implementing the browser model.

Global Attributes

None

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.
BrowserItemType Class defining the various browser item types.
BrowserMethodItem Class implementing the data structure for browser method items.
BrowserModel Class implementing the browser model.
BrowserSimpleDirectoryItem Class implementing the data structure for browser simple directory items.
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.
colOffset Public method to return the column offset of the item definition.
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 (BrowserItem)
parent item
attribute (Attribute)
reference to the attribute object
isClass (bool)
flag indicating a class attribute

BrowserClassAttributeItem.attributeObject

attributeObject()

Public method returning the class object.

Return:
reference to the class object
Return Type:
Class

BrowserClassAttributeItem.colOffset

colOffset()

Public method to return the column offset of the item definition.

Return:
column offset defining the object
Return Type:
int

BrowserClassAttributeItem.fileName

fileName()

Public method returning the filename.

Return:
filename
Return Type:
str

BrowserClassAttributeItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
flag indicating public visibility
Return Type:
bool

BrowserClassAttributeItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserClassAttributeItem.lineno

lineno()

Public method returning the line number defining this object.

Return:
line number defining the object
Return Type:
int

BrowserClassAttributeItem.linenos

linenos()

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

Return:
line number the object is assigned to
Return Type:
list of int
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 (BrowserItem)
parent item
attributes (list of Attribute)
list of attributes
text (str)
text to be shown by this item
isClass (bool)
flag indicating class attributes

BrowserClassAttributesItem.attributes

attributes()

Public method returning the attribute list.

Return:
reference to the list of attributes
Return Type:
list of Attribute

BrowserClassAttributesItem.isClassAttributes

isClassAttributes()

Public method returning the attributes type.

Return:
flag indicating class attributes
Return Type:
bool

BrowserClassAttributesItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserClassAttributesItem.name

name()

Public method to return the name of the item.

Return:
name of the item
Return Type:
str
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.
colOffset Public method to return the column offset of the item definition.
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 (BrowserItem)
parent item
cl (Class)
Class object to be shown
filename (str)
file name 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
Return Type:
tuple of (int, int)

BrowserClassItem.classObject

classObject()

Public method returning the class object.

Return:
reference to the class object
Return Type:
Class

BrowserClassItem.colOffset

colOffset()

Public method to return the column offset of the item definition.

Return:
column offset defining the object
Return Type:
int

BrowserClassItem.fileName

fileName()

Public method returning the filename.

Return:
filename
Return Type:
str

BrowserClassItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
flag indicating public visibility
Return Type:
bool

BrowserClassItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserClassItem.lineno

lineno()

Public method returning the line number defining this object.

Return:
line number defining the object
Return Type:
int

BrowserClassItem.name

name()

Public method to return the name of the item.

Return:
name of the item
Return Type:
str
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 (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

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 (BrowserItem)
parent item
dinfo (str)
dinfo is the string for the directory
full (bool)
flag indicating full pathname should be displayed

BrowserDirectoryItem.dirName

dirName()

Public method returning the directory name.

Return:
directory name
Return Type:
str

BrowserDirectoryItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserDirectoryItem.name

name()

Public method to return the name of the item.

Return:
name of the item
Return Type:
str

BrowserDirectoryItem.setName

setName(dinfo, full=True)

Public method to set the directory name.

dinfo (str)
dinfo is the string for the directory
full (bool)
flag indicating full pathname should be displayed
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.
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.
isParsableFile Public method to check, if the file is supported by class browsers.
isPdfFile Public method to check, if this file is a PDF 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.
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 (BrowserItem)
parent item
finfo (str)
the string for the file
full (bool)
flag indicating full pathname should be displayed
sourceLanguage (str)
source code language of the project

BrowserFileItem.dirName

dirName()

Public method returning the directory name.

Return:
directory name
Return Type:
str

BrowserFileItem.fileExt

fileExt()

Public method returning the file extension.

Return:
file extension
Return Type:
str

BrowserFileItem.fileName

fileName()

Public method returning the filename.

Return:
filename
Return Type:
str

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

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

isParsableFile()

Public method to check, if the file is supported by class browsers.

Return:
flag indicating a supported file
Return Type:
bool

BrowserFileItem.isPdfFile

isPdfFile()

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

Return:
flag indicating a PDF 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.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 (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserFileItem.moduleName

moduleName()

Public method returning the module name.

Return:
module name
Return Type:
str

BrowserFileItem.name

name()

Public method to return the name of the item.

Return:
name of the item
Return Type:
str

BrowserFileItem.setName

setName(finfo, full=True)

Public method to set the directory name.

finfo (str)
the string for the file
full (bool)
flag indicating full path name should be displayed (unused)
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 (BrowserItem)
parent item
attributes (list of Attribute)
list of attributes
text (str)
text to be shown by this item
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 (BrowserItem)
parent item
text (str)
text to be shown by this item
filename (str)
name of the file
lineNumbers (list of int)
list of line numbers of the import statement
isModule (bool)
flag indicating a module item entry

BrowserImportItem.fileName

fileName()

Public method returning the filename.

Return:
filename
Return Type:
str

BrowserImportItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserImportItem.lineno

lineno()

Public method returning the line number of the first import.

Return:
line number of the first import
Return Type:
int

BrowserImportItem.linenos

linenos()

Public method returning the line numbers of all imports.

Return:
line numbers of all imports
Return Type:
list of int
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 (BrowserItem)
parent item
text (str)
text to be shown by this item

BrowserImportsItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool
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.
colOffset Public method to return the column offset of the item definition.
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.
lineno Public method to return the line number of the item.
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 (BrowserItem)
reference to the parent item
data (Any)
single data of the item

BrowserItem.appendChild

appendChild(child)

Public method to add a child to this item.

child (BrowserItem)
reference to the child item to add

BrowserItem.child

child(row)

Public method to get a child id.

row (int)
number of child to get the id of
Return:
reference to the child item
Return Type:
BrowserItem

BrowserItem.childCount

childCount()

Public method to get the number of available child items.

Return:
number of child items
Return Type:
int

BrowserItem.children

children()

Public method to get the ids of all child items.

Return:
references to all child items
Return Type:
list of BrowserItem

BrowserItem.colOffset

colOffset()

Public method to return the column offset of the item definition.

Return:
column offset defining the object
Return Type:
int

BrowserItem.columnCount

columnCount()

Public method to get the number of available data items.

Return:
number of data items
Return Type:
int

BrowserItem.data

data(column)

Public method to get a specific data item.

column (int)
number of the requested data item
Return:
stored data item
Return Type:
Any

BrowserItem.getIcon

getIcon()

Public method to get the items icon.

Return:
the icon
Return Type:
QIcon

BrowserItem.isLazyPopulated

isLazyPopulated()

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

Return:
lazy population flag
Return Type:
bool

BrowserItem.isPopulated

isPopulated()

Public method to chek, if this item is populated.

Return:
population status
Return Type:
bool

BrowserItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
flag indicating public visibility
Return Type:
bool

BrowserItem.isSymlink

isSymlink()

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

Return:
flag indicating a symbolic link
Return Type:
bool

BrowserItem.lessThan

lessThan(other, column, _order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
_order (Qt.SortOrder)
sort order (for special sorting) (unused)
Return:
true, if this item is less than other
Return Type:
bool

BrowserItem.lineno

lineno()

Public method to return the line number of the item.

Return:
line number defining the object
Return Type:
int

BrowserItem.parent

parent()

Public method to get the reference to the parent item.

Return:
reference to the parent item
Return Type:
BrowserItem

BrowserItem.removeChild

removeChild(child)

Public method to remove a child.

child (BrowserItem)
reference to the child to remove

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

BrowserItem.type

type()

Public method to get the item type.

Return:
type of the item
Return Type:
BrowserItemType
Up


BrowserItemType

Class defining the various browser item types.

Derived from

enum.Enum

Class Attributes

Attribute
Attributes
Class
Coding
Directory
File
Import
Imports
Method
PbDirectory
PbFile
PbSimpleDirectory
Root
SimpleDirectory
SysPath

Class Methods

None

Methods

None

Static Methods

None
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.
colOffset Public method to return the column offset of the item 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 (BrowserItem)
parent item
fn (Function)
Function object to be shown
filename (str)
filename of the file defining this class

BrowserMethodItem.boundaries

boundaries()

Public method returning the boundaries of the method definition.

Return:
tuple with start end end line number
Return Type:
tuple of (int, int)

BrowserMethodItem.colOffset

colOffset()

Public method to return the column offset of the item definition.

Return:
column offset defining the object
Return Type:
int

BrowserMethodItem.fileName

fileName()

Public method returning the filename.

Return:
filename
Return Type:
str

BrowserMethodItem.functionObject

functionObject()

Public method returning the function object.

Return:
reference to the function object
Return Type:
Function

BrowserMethodItem.isPublic

isPublic()

Public method returning the public visibility status.

Return:
flag indicating public visibility
Return Type:
bool

BrowserMethodItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserMethodItem.lineno

lineno()

Public method returning the line number defining this object.

Return:
line number defining the object
Return Type:
int

BrowserMethodItem.name

name()

Public method to return the name of the item.

Return:
name of the item
Return Type:
str
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.
entryCreated Public method to handle the creation of a file or directory.
entryDeleted Public method to handle the deletion of a file or directory.
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 (QObject)
reference to parent object
nopopulate (bool)
flag indicating to not populate the model

BrowserModel.__populateModel

__populateModel()

Private method to populate the browser model.

BrowserModel._addItem

_addItem(itm, parentItem)

Protected slot to add an item.

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

BrowserModel._addWatchedItem

_addWatchedItem(itm)

Protected method to watch an item.

itm (BrowserDirectoryItem)
item to be watched

BrowserModel._removeWatchedItem

_removeWatchedItem(itm)

Protected method to remove a watched item.

itm (BrowserDirectoryItem)
item to be removed

BrowserModel.addItem

addItem(itm, parent=None)

Public slot to add an item.

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

BrowserModel.addTopLevelDir

addTopLevelDir(dirname)

Public method to add a new toplevel directory.

dirname (str)
name of the new toplevel directory

BrowserModel.clear

clear()

Public method to clear the model.

BrowserModel.columnCount

columnCount(parent=None)

Public method to get the number of columns.

parent (QModelIndex)
index of parent item
Return:
number of columns
Return Type:
int

BrowserModel.data

data(index, role)

Public method to get data of an item.

index (QModelIndex)
index of the data to retrieve
role (Qt.ItemDataRole)
role of data
Return:
requested data
Return Type:
Any

BrowserModel.entryCreated

entryCreated(path, isDir=False)

Public method to handle the creation of a file or directory.

path (str)
path of the created file or directory
isDir (bool (optional))
flag indicating a created directory (defaults to False)

BrowserModel.entryDeleted

entryDeleted(path, isDir=False)

Public method to handle the deletion of a file or directory.

path (str)
path of the deleted file or directory
isDir (bool (optional))
flag indicating a deleted directory (defaults to False) (unused)

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 (QModelIndex)
index of the data to retrieve
Return:
requested flags
Return Type:
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 (QModelIndex)
index of parent item
Return:
flag indicating the presence of child items
Return Type:
bool

BrowserModel.headerData

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

Public method to get the header data.

section (int)
number of section to get data for
orientation (Qt.Orientation)
header orientation
role (Qt.ItemDataRole)
role of data
Return:
requested header data
Return Type:
Any

BrowserModel.index

index(row, column, parent=None)

Public method to create an index.

row (int)
row number of the new index
column (int)
column number of the new index
parent (QModelIndex)
index of parent item
Return:
index object
Return Type:
QModelIndex

BrowserModel.interpreterChanged

interpreterChanged(interpreter)

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

interpreter (str)
interpreter of the debug client

BrowserModel.item

item(index)

Public method to get a reference to an item.

index (QModelIndex)
index of the data to retrieve
Return:
requested item reference
Return Type:
BrowserItem

BrowserModel.parent

parent(index)

Public method to get the index of the parent object.

index (QModelIndex)
index of the item
Return:
index of parent item
Return Type:
QModelIndex

BrowserModel.populateClassAttributesItem

populateClassAttributesItem(parentItem, repopulate=False)

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

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

BrowserModel.populateClassItem

populateClassItem(parentItem, repopulate=False)

Public method to populate a class item's subtree.

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

BrowserModel.populateDirectoryItem

populateDirectoryItem(parentItem, repopulate=False)

Public method to populate a directory item's subtree.

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

BrowserModel.populateFileItem

populateFileItem(parentItem, repopulate=False)

Public method to populate a file item's subtree.

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

BrowserModel.populateItem

populateItem(parentItem, repopulate=False)

Public method to populate an item's subtree.

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

BrowserModel.populateMethodItem

populateMethodItem(parentItem, repopulate=False)

Public method to populate a method item's subtree.

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

BrowserModel.populateSysPathItem

populateSysPathItem(parentItem, repopulate=False)

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

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

BrowserModel.programChange

programChange(dirname)

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

dirname (str)
name of the directory containing the file

BrowserModel.removeToplevelDir

removeToplevelDir(index)

Public method to remove a toplevel directory.

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

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 (QModelIndex)
index of parent item
Return:
number of rows
Return Type:
int

BrowserModel.saveToplevelDirs

saveToplevelDirs()

Public slot to save the toplevel directories.

Up


BrowserSimpleDirectoryItem

Class implementing the data structure for browser simple directory items.

Derived from

BrowserItem

Class Attributes

None

Class Methods

None

Methods

BrowserSimpleDirectoryItem 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

BrowserSimpleDirectoryItem (Constructor)

BrowserSimpleDirectoryItem(parent, text, path="")

Constructor

parent (BrowserItem)
parent item
text (str)
text to be displayed
path (str)
path of the directory

BrowserSimpleDirectoryItem.dirName

dirName()

Public method returning the directory name.

Return:
directory name
Return Type:
str

BrowserSimpleDirectoryItem.lessThan

lessThan(other, column, order)

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

other (BrowserItem)
reference to item to compare against
column (int)
column number to use for the comparison
order (Qt.SortOrder)
sort order (for special sorting)
Return:
true, if this item is less than other
Return Type:
bool

BrowserSimpleDirectoryItem.name

name()

Public method to return the name of the item.

Return:
name of the item
Return Type:
str

BrowserSimpleDirectoryItem.setName

setName(dinfo, full=True)

Public method to set the directory name.

dinfo (str)
dinfo is the string for the directory
full (bool)
flag indicating full path name should be displayed (unused)
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 (BrowserItem)
parent item

BrowserSysPathItem.name

name()

Public method to return the name of the item.

Return:
name of the item
Return Type:
str
Up