spinetoolbox.widgets.tree_view_mixin
¶
Contains the TreeViewMixin class.
author: |
|
---|---|
date: | 26.11.2018 |
Module Contents¶
-
class
spinetoolbox.widgets.tree_view_mixin.
TreeViewMixin
(*args, **kwargs)[source]¶ Provides object and relationship trees for the data store form.
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
_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
-
static
_db_map_class_id_data
(db_map_data)[source]¶ Returns a new dictionary where the class id is also part of the key.
Returns: lists of dictionary items keyed by tuple (DiffDatabaseMapping, integer class id) Return type: dict
-
static
_extend_merge
(left, right)[source]¶ Returns a new dictionary by uniting left and right.
Returns: lists of dictionary items keyed by DiffDatabaseMapping Return type: dict
-
_update_object_filter
(self)[source]¶ Updates filters object filter according to object tree selection.
-
_update_relationship_filter
(self)[source]¶ Update filters relationship filter according to relationship tree selection.
-
edit_relationship_tree_items
(self, current)[source]¶ Starts editing the given index in the relationship tree.
Shows the context menu for object tree.
Parameters: pos (QPoint) – Mouse position
Shows the context for relationship tree.
Parameters: pos (QPoint) – Mouse position
-
find_next_relationship
(self, index)[source]¶ Expands next occurrence of a relationship in object tree.
-
show_add_object_classes_form
(self, checked=False)[source]¶ Shows dialog to let user select preferences for new object classes.
-
show_add_objects_form
(self, checked=False, class_name='')[source]¶ Shows dialog to let user select preferences for new objects.
-
show_add_relationship_classes_form
(self, checked=False, object_class_one_name=None)[source]¶ Shows dialog to let user select preferences for new relationship class.
-
show_add_relationships_form
(self, checked=False, relationship_class_key=(), object_class_name='', object_name='')[source]¶ Shows dialog to let user select preferences for new relationships.
-
show_remove_relationship_tree_items_form
(self)[source]¶ Shows form to remove items from relationship treeview.