spinetoolbox.spine_db_editor.mvcmodels.multi_db_tree_model

A base model class to represent items from multiple databases in a tree.

authors
  1. Vennström (VTT), M. Marin (KTH)

date

17.6.2020

Module Contents

Classes

MultiDBTreeModel

Base class for all tree models in Spine db editor.

class spinetoolbox.spine_db_editor.mvcmodels.multi_db_tree_model.MultiDBTreeModel(parent, db_mngr, *db_maps)[source]

Bases: spinetoolbox.mvcmodels.minimal_tree_model.MinimalTreeModel

Base class for all tree models in Spine db editor.

Init class.

Parameters
  • parent (SpineDBEditor) –

  • db_mngr (SpineDBManager) – A manager for the given db_maps

  • db_maps (iter) – DiffDatabaseMapping instances

property root_item_type(self)[source]

Implement in subclasses to create a model specific to any entity type.

property root_item(self)[source]
property root_index(self)[source]
build_tree(self)[source]

Builds tree.

columnCount(self, parent=QModelIndex())[source]
headerData(self, section, orientation, role=Qt.DisplayRole)[source]
find_items(self, db_map, path_prefix, parent_items=(), fetch=False)[source]

Returns items at given path prefix.