spinetoolbox.spine_db_editor.mvcmodels.tree_model_base

Models to represent things in a tree.

Module Contents

Classes

TreeModelBase

A base model to display items in a tree view.

class spinetoolbox.spine_db_editor.mvcmodels.tree_model_base.TreeModelBase(db_editor, db_mngr, *db_maps)[source]

Bases: spinetoolbox.mvcmodels.minimal_tree_model.MinimalTreeModel

A base model to display items in a tree view.

Parameters
columnCount(parent=QModelIndex())[source]

Returns the number of columns under the given parent. Always 2.

Returns

column count

Return type

int

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

Builds tree.

abstract _make_db_item(db_map)[source]
static db_item(item)[source]
db_row(item)[source]
_tear_down_tree(obj=None)[source]

Tears down tree items recursively