eric7.EricWidgets.EricTreeWidget

Module implementing specialized tree views.

Global Attributes

None

Classes

EricTreeWidget Class implementing an extended tree widget.
EricTreeWidgetItemsState Class defining the items expansion state.

Functions

None


EricTreeWidget

Class implementing an extended tree widget.

Signals

itemControlClicked(QTreeWidgetItem)
emitted after a Ctrl-Click on an item
itemMiddleButtonClicked(QTreeWidgetItem)
emitted after a click of the middle button on an item

Derived from

QTreeWidget

Class Attributes

None

Class Methods

None

Methods

EricTreeWidget Constructor
__iterateAllItems Private method to iterate over the child items of the parent.
__scheduleRefresh Private slot to schedule a refresh of the tree.
addTopLevelItem Public method to add a top level item.
addTopLevelItems Public method to add a list of top level items.
allItems Public method to get a list of all items.
appendToParentItem Public method to append an item to a parent item.
clear Public slot to clear the tree.
deleteItem Public method to delete an item.
deleteItems Public method to delete a list of items.
filterString Public slot to set a new filter.
insertTopLevelItem Public method to insert a top level item.
insertTopLevelItems Public method to insert a list of top level items.
mousePressEvent Protected method handling mouse press events.
prependToParentItem Public method to prepend an item to a parent item.
setDefaultItemShowMode Public method to set the default item show mode.

Static Methods

None

EricTreeWidget (Constructor)

EricTreeWidget(parent=None)

Constructor

parent (QWidget)
reference to the parent widget

EricTreeWidget.__iterateAllItems

__iterateAllItems(parent)

Private method to iterate over the child items of the parent.

parent (QTreeWidgetItem)
parent item to iterate

EricTreeWidget.__scheduleRefresh

__scheduleRefresh()

Private slot to schedule a refresh of the tree.

EricTreeWidget.addTopLevelItem

addTopLevelItem(item)

Public method to add a top level item.

item (QTreeWidgetItem)
item to be added as a top level item

EricTreeWidget.addTopLevelItems

addTopLevelItems(items)

Public method to add a list of top level items.

items (list of QTreeWidgetItem)
items to be added as top level items

EricTreeWidget.allItems

allItems()

Public method to get a list of all items.

Return:
list of all items
Return Type:
list of QTreeWidgetItem

EricTreeWidget.appendToParentItem

appendToParentItem(parent, item)

Public method to append an item to a parent item.

parent (str or QTreeWidgetItem)
text of the parent item or the parent item
item (QTreeWidgetItem)
item to be appended
Return:
flag indicating success
Return Type:
bool
Raises RuntimeError:
raised to indicate an illegal type for the parent

EricTreeWidget.clear

clear()

Public slot to clear the tree.

EricTreeWidget.deleteItem

deleteItem(item)

Public method to delete an item.

item (QTreeWidgetItem)
item to be deleted

EricTreeWidget.deleteItems

deleteItems(items)

Public method to delete a list of items.

items (list of QTreeWidgetItem)
items to be deleted

EricTreeWidget.filterString

filterString(filterStr)

Public slot to set a new filter.

filterStr (str)
filter to be set

EricTreeWidget.insertTopLevelItem

insertTopLevelItem(index, item)

Public method to insert a top level item.

index (int)
index for the insertion
item (QTreeWidgetItem)
item to be inserted as a top level item

EricTreeWidget.insertTopLevelItems

insertTopLevelItems(index, items)

Public method to insert a list of top level items.

index (int)
index for the insertion
items (list of QTreeWidgetItem)
items to be inserted as top level items

EricTreeWidget.mousePressEvent

mousePressEvent(evt)

Protected method handling mouse press events.

evt (QMouseEvent)
mouse press event

EricTreeWidget.prependToParentItem

prependToParentItem(parent, item)

Public method to prepend an item to a parent item.

parent (str or QTreeWidgetItem)
text of the parent item or the parent item
item (QTreeWidgetItem)
item to be prepended
Return:
flag indicating success
Return Type:
bool
Raises RuntimeError:
raised to indicate an illegal type for the parent

EricTreeWidget.setDefaultItemShowMode

setDefaultItemShowMode(mode)

Public method to set the default item show mode.

mode (EricTreeWidgetItemsState)
default mode
Up


EricTreeWidgetItemsState

Class defining the items expansion state.

Derived from

enum.Enum

Class Attributes

COLLAPSED
EXPANDED

Class Methods

None

Methods

None

Static Methods

None
Up