spinetoolbox.spine_db_editor.widgets.tree_view_mixin¶
Contains the TreeViewMixin class.
| author: |
|
|---|---|
| date: | 26.11.2018 |
Module Contents¶
Classes¶
TreeViewMixin |
Provides object and relationship trees for the Spine db editor. |
-
class
spinetoolbox.spine_db_editor.widgets.tree_view_mixin.TreeViewMixin(*args, **kwargs)[source]¶ Provides object and relationship trees for the Spine db editor.
Initialize self. See help(type(self)) for accurate signature.
-
_relationship_classes_fetched[source]¶ Emitted from fetcher thread, connected to Slots in GUI thread.
Adds toggle view actions to View menu.
-
_handle_object_tree_selection_changed(self, selected, deselected)[source]¶ Updates object filter and sets default rows.
-
_handle_relationship_tree_selection_changed(self, selected, deselected)[source]¶ Updates relationship filter and sets default rows.
-
static
_clear_tree_selections_silently(tree_view)[source]¶ Clears the selections on a given abstract item view without emitting any signals.
-
static
_db_map_items(indexes)[source]¶ Groups items from given tree indexes by db map.
Returns: lists of dictionary items keyed by DiffDatabaseMapping Return type: dict
-
export_selected(self, selected_indexes)[source]¶ Exports data from given indexes in the entity tree.
-
duplicate_object(self, index)[source]¶ Duplicates the object at the given object tree model index.
Parameters: index (QModelIndex) –
-
show_add_relationship_classes_form(self, checked=False, object_class_one_name=None)[source]¶ Shows dialog to add new relationship_class.
-
show_add_relationships_form(self, checked=False, relationship_class_key=None, object_names_by_class_name=None)[source]¶ Shows dialog to add new relationships.
-
show_remove_alternative_tree_items_form(self)[source]¶ Shows form to remove items from object treeview.
-
show_remove_entity_tree_items_form(self, selected_indexes)[source]¶ Shows form to remove items from object treeview.
-