pyleecan.GUI.Tools.WTreeEdit.TreeEditModel module

class TreeEditModel(obj, parent=None)[source]

Bases: QAbstractItemModel

objChanged
dataChanged
setRoot()[source]
setupModelData(obj, name=None, index=None, parent=None, viewItem=None)[source]

obj : an object (that should be modeled and shown) parent : a model item name : name of the property (or the parent that contains the object) id : list index or dict key if parent object is a list or a dict

is_not_tree_type(prop, prop_type)[source]
get_obj_info(item)[source]

Get some information on the object in the context of its parent.

index(row, column, index=<PySide2.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]

Get the index of the item in the model.

item(index)[source]

Get the item from the given index.

parent(index)[source]

Get the parent of the item with the given index. If the item has no parent, an invalid QModelIndex is returned.

rowCount(index=<PySide2.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]

Get the number of rows of the item of the given index.

columnCount(index=<PySide2.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]

Get the number of columns of the model.

data(index, role=None)[source]

Get data of the given role for the item referred to by the index.

isValid(item)[source]

Check if the view item still represent the respective object.

updateItem(index)[source]
removeRows(row, count, parent=<PySide2.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]

Remove the given rows from the model.

headerData(section, orientation, role=PySide2.QtCore.Qt.ItemDataRole.DisplayRole)[source]

Get the data for the given role and section in the header with the specified orientation.

isListType(typ)[source]
isDictType(typ)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>