spinetoolbox.spine_db_editor.widgets.custom_qtreeview
¶
Classes for custom QTreeView.
- author
Marin (KTH)
- date
25.4.2018
Module Contents¶
Classes¶
Tree view base class for object and relationship tree views. |
|
Custom QTreeView class for the object tree in SpineDBEditor. |
|
Custom QTreeView class for the relationship tree in SpineDBEditor. |
|
Base class for all non-entity tree views. |
|
Custom QTreeView class for tools and features in SpineDBEditor. |
|
Custom QTreeView class for the alternative scenario tree in SpineDBEditor. |
|
Custom QTreeView class for parameter_value_list in SpineDBEditor. |
|
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.CopyTreeView
Tree view base class for object and relationship tree views.
Initialize the view.
- connect_spine_db_editor(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:
EntityTreeView
Custom QTreeView class for the object tree in SpineDBEditor.
Initialize the view.
- update_actions_availability(self)[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:
EntityTreeView
Custom 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.CopyTreeView
Base class for all non-entity tree views.
Initialize the view.
- abstract update_actions_availability(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.ToolFeatureTreeView(parent)[source]¶
Bases:
ItemTreeView
Custom QTreeView class for tools and features in SpineDBEditor.
Initialize the view.
- class spinetoolbox.spine_db_editor.widgets.custom_qtreeview.AlternativeScenarioTreeView(parent)[source]¶
Bases:
ItemTreeView
Custom QTreeView class for the alternative scenario tree in SpineDBEditor.
Initialize the view.
- class spinetoolbox.spine_db_editor.widgets.custom_qtreeview.ParameterValueListTreeView(parent)[source]¶
Bases:
ItemTreeView
Custom 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:
ItemTreeView
Custom QTreeView class for the parameter_tag tree in SpineDBEditor.
Initialize the view.