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
root_item_type[source]

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

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

Builds tree.

columnCount(self, parent=QModelIndex())[source]
data(self, index, role=Qt.DisplayRole)[source]

Returns the data stored under the given role for the index.

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.

is_active_member_index(self, index)[source]
set_active_member_indexes(self, indexes)[source]
emit_data_changed_for_column(self, column, parents)[source]