spinetoolbox.spine_db_editor.mvcmodels.entity_tree_models

Models to represent entities in a tree.

Module Contents

Classes

EntityTreeModel

Base class for all tree models in Spine db editor.

Functions

group_items_by_db_map(indexes)

Groups items from given tree indexes by db map.

class spinetoolbox.spine_db_editor.mvcmodels.entity_tree_models.EntityTreeModel(*args, **kwargs)[source]

Bases: spinetoolbox.spine_db_editor.mvcmodels.multi_db_tree_model.MultiDBTreeModel

Base class for all tree models in Spine db editor.

Init class.

Parameters
property root_item_type[source]

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

property hide_empty_classes[source]
find_next_entity_index(index)[source]

Find and return next occurrence of relationship item.

save_hide_empty_classes()[source]
spinetoolbox.spine_db_editor.mvcmodels.entity_tree_models.group_items_by_db_map(indexes)[source]

Groups items from given tree indexes by db map.

Parameters

indexes (Iterable of QModelIndex) – index to entity tree model

Returns

lists of dictionary items keyed by DatabaseMapping

Return type

dict