eric3.Debugger.VariablesViewer

Module implementing the variables viewer widget.

Classes

ClassNode Class implementing a QListViewItem that represents a class.
VariablesViewer Class implementing the variables viewer widget.

Functions

None

ClassNode

Class implementing a QListViewItem that represents a class.

Derived from

QListViewItem

Methods

ClassNode Constructor
setOpen Public slot to set/reset the open state.

ClassNode (Constructor)

ClassNode(parent, dvar, dvalue, dtype, frmnr, scope)

Constructor

dtype
type string (string or QString)
dvalue
value string (string or QString)
dvar
variable name (string or QString)
frmnr
frame number (0 is the current frame) (int)
parent
parent of this item
scope
flag indicating global (0) or local (1) variables

ClassNode.setOpen

setOpen(o)

Public slot to set/reset the open state.

o
flag indicating the open state

Up

VariablesViewer

Class implementing the variables viewer widget.

This widget is used to display the variables of the program being debugged in a tree. Compound types will be shown with their main entry first. Once the subtree has been expanded, the individual entries will be shown. Double clicking an entry will popup a dialog showing the variables parameters in a more readable form. This is especially useful for lengthy strings.

This widget has two modes for displaying the global and the local variables.

Derived from

QListView

Methods

VariablesViewer Constructor
addItem Private method used to add an item to the listview.
contentsMouseDoubleClickEvent Protected method of QListView.
findItem Reimplemented method
generateItem Private method used to generate a QListViewItem representing a variable.
getDispType Private method used to get the display string for type vtype.
getType Private method used to get the type of the value passed in.
showVariable Public method to show variables in a listview.
showVariables Public method to show variables in a listview.

VariablesViewer (Constructor)

VariablesViewer(parent=None, scope=1)

Constructor

parent
the parent (QWidget)
scope
flag indicating global (0) or local (1) variables

VariablesViewer.addItem

addItem(parent, vtype, var, value)

Private method used to add an item to the listview.

If the item is of a type with subelements (i.e. list, dictionary, tuple), these subelements are added by calling this method recursively.

parent
the parent of the item to be added (QListViewItem or None)
value
the value string (string)
var
the variable name (string)
vtype
the type of the item to be added (string)
Returns:
The item that was added to the listview (QListViewItem).

VariablesViewer.contentsMouseDoubleClickEvent

contentsMouseDoubleClickEvent(mouseEvent)

Protected method of QListView.

Reimplemented to disable expanding/collapsing of items when double-clicking. Instead the double-clicked entry is opened.

mouseEvent
The mouse event object. (QMouseEvent)

VariablesViewer.findItem

findItem(slist, column, node=None)

Reimplemented method

It is used to find a specific item in column, that is a child of node. If node is None, a child of the QListView is searched.

column
index of column to search in (int)
node
start point of the search
slist
searchlist (list of strings or QStrings)
Returns:
the found item or None

VariablesViewer.generateItem

generateItem(parent, dvar, dvalue, dtype)

Private method used to generate a QListViewItem representing a variable.

dtype
type string (string or QString)
dvalue
value string (string or QString)
dvar
variable name (string or QString)
parent
parent of the item to be generated
Returns:
The item that was generated (QListViewItem or ClassNode).

VariablesViewer.getDispType

getDispType(vtype)

Private method used to get the display string for type vtype.

vtype
the type, the display string should be looked up for (string)
Returns:
displaystring (string or QString)

VariablesViewer.getType

getType(value)

Private method used to get the type of the value passed in.

value
the real value (any)
Returns:
type (string).

VariablesViewer.showVariable

showVariable(vlist)

Public method to show variables in a listview.

vlist
the list of variables to be displayed. Each listentry is a tuple of three values.

VariablesViewer.showVariables

showVariables(vlist, frmnr)

Public method to show variables in a listview.

frmnr
frame number (0 is the current frame) (int)
vlist
the list of variables to be displayed. Each listentry is a tuple of three values.

Up