Tool Tree Widget (tooltree)

Tool Tree

A ToolTree widget presenting the user with a set of actions organized in a tree structure.

class orangecanvas.gui.tooltree.ToolTree(parent: QWidget | None = None, **kwargs: Any)[source]

Bases: QWidget

A ListView like presentation of a list of actions.

triggered(QAction)

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

Signal emitted when an action in the widget is triggered.

hovered(QAction)

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

Signal emitted when an action in the widget is hovered.

setFlattened(flatten: bool) None[source]

Show the actions in a flattened view.

flattened() bool[source]

Are actions shown in a flattened tree (a list).

setRootIndex(index: QModelIndex) None[source]

Set the root index

rootIndex() QModelIndex[source]

Return the root index.

view() QTreeView[source]

Return the QTreeView instance used.

setActionRole(role: ItemDataRole) None[source]

Set the action role. By default this is Qt.UserRole

ensureCurrent() None[source]

Ensure the view has a current item if one is available.

eventFilter(self, a0: QObject | None, a1: QEvent | None) bool[source]