spinetoolbox.spine_db_editor.mvcmodels.tree_model_base

Models to represent things in a tree.

authors
  1. Marin (KTH)

date

1.0.2020

Module Contents

Classes

TreeModelBase

A base model to display items in a tree view.

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

Bases: spinetoolbox.mvcmodels.minimal_tree_model.MinimalTreeModel

A base model to display items in a tree view.

Parameters

Initialize class

columnCount(self, parent=QModelIndex())[source]

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

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

Builds tree.

abstract static _make_db_item(db_map)[source]
abstract static _top_children()[source]
_items_per_db_item(self, db_map_data)[source]
_ids_per_root_item(self, db_map_data, root_number=0)[source]
static _db_map_data_per_id(db_map_data, id_key)[source]
_update_leaf_items(self, root_item, ids)[source]
static _remove_leaf_items(root_item, ids)[source]
static db_item(item)[source]
db_row(self, item)[source]