pyleecan.GUI.Tools.WTreeEdit.TreeEditModel module¶
- class TreeEditModel(obj, parent=None)[source]¶
Bases:
QAbstractItemModel
- objChanged¶
- dataChanged¶
- 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
- index(row, column, index=<PySide2.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]¶
Get the index of the item in the model.
- 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.
- 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.
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶