spinetoolbox.spine_db_editor.widgets.custom_qtreeview¶
Classes for custom QTreeView.
| author: |
|
|---|---|
| date: | 25.4.2018 |
Module Contents¶
Classes¶
EntityTreeView |
Tree view base class for object and relationship tree views. |
ObjectTreeView |
Custom QTreeView class for the object tree in SpineDBEditor. |
RelationshipTreeView |
Custom QTreeView class for the relationship tree in SpineDBEditor. |
ItemTreeView |
Custom QTreeView class for parameter_value_list in SpineDBEditor. |
AlternativeScenarioTreeView |
Custom QTreeView class for the alternative scenario tree in SpineDBEditor. |
ParameterValueListTreeView |
Custom QTreeView class for parameter_value_list in SpineDBEditor. |
ParameterTagTreeView |
Custom QTreeView class for the parameter_tag tree in SpineDBEditor. |
-
class
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.EntityTreeView(parent)[source]¶ Bases:
spinetoolbox.widgets.custom_qtreeview.CopyTreeViewTree view base class for object and relationship tree views.
Initialize the view.
-
connect_data_store_form(self, spine_db_editor)[source]¶ Connects a Spine db editor to work with this view.
Parameters: spine_db_editor (SpineDBEditor) –
-
_add_middle_actions(self)[source]¶ Adds action at the middle of the context menu. Subclasses can reimplement at will.
Creates a context menu for this view.
-
_handle_selection_changed(self, selected, deselected)[source]¶ Classifies selection by item type and emits signal.
-
export_selected(self)[source]¶ Exports data from selected indexes using the connected Spine db editor.
-
mousePressEvent(self, event)[source]¶ Overrides selection behaviour if the user has selected sticky selection in Settings. If sticky selection is enabled, multiple-selection is enabled when selecting items in the Object tree. Pressing the Ctrl-button down, enables single selection.
Parameters: event (QMouseEvent) –
-
-
class
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ObjectTreeView(parent)[source]¶ Bases:
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.EntityTreeViewCustom QTreeView class for the object tree in SpineDBEditor.
Initialize the view.
-
update_actions_visibility(self, item)[source]¶ Updates the visible property of actions according to whether or not they apply to given item.
-
_add_middle_actions(self)[source]¶ Adds action at the middle of the context menu. Subclasses can reimplement at will.
-
find_next_relationship(self)[source]¶ Finds the next occurrence of the relationship at the current index and expands it.
-
-
class
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.RelationshipTreeView(parent)[source]¶ Bases:
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.EntityTreeViewCustom QTreeView class for the relationship tree in SpineDBEditor.
Initialize the view.
-
_add_middle_actions(self)[source]¶ Adds action at the middle of the context menu. Subclasses can reimplement at will.
-
-
class
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ItemTreeView(parent)[source]¶ Bases:
spinetoolbox.widgets.custom_qtreeview.CopyTreeViewCustom QTreeView class for parameter_value_list in SpineDBEditor.
Initialize the view.
-
update_actions_visibility(self, item)[source]¶ Updates the visible property of actions according to whether or not they apply to given item.
Creates a context menu for this view.
-
-
class
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.AlternativeScenarioTreeView(parent)[source]¶ Bases:
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ItemTreeViewCustom QTreeView class for the alternative scenario tree in SpineDBEditor.
Initialize the view.
-
class
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ParameterValueListTreeView(parent)[source]¶ Bases:
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ItemTreeViewCustom QTreeView class for parameter_value_list in SpineDBEditor.
Initialize the view.
Creates a context menu for this view.
-
class
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ParameterTagTreeView(parent)[source]¶ Bases:
spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ItemTreeViewCustom QTreeView class for the parameter_tag tree in SpineDBEditor.
Initialize the view.