widgets.tree_view_widget
¶
Contains the TreeViewForm class.
author: |
|
---|---|
date: | 26.11.2018 |
Module Contents¶
-
class
widgets.tree_view_widget.
TreeViewForm
(project, db_maps)[source]¶ Bases:
widgets.data_store_widget.DataStoreForm
A widget to show and edit Spine objects in a data store.
-
project
¶ The project instance that owns this form
Type: SpineToolboxProject
-
db_maps
¶ named DiffDatabaseMapping instances
Type: dict
-
restore_dock_widgets
(self)[source]¶ Dock all floating and or hidden QDockWidgets back to the window at ‘factory’ positions.
-
update_copy_and_remove_actions
(self)[source]¶ Update copy and remove actions according to selections across the widgets.
-
_handle_object_parameter_definition_selection_changed
(self, selected, deselected)[source]¶ Enable/disable the option to remove rows.
-
_handle_object_parameter_value_selection_changed
(self, selected, deselected)[source]¶ Enable/disable the option to remove rows.
-
_handle_relationship_parameter_definition_selection_changed
(self, selected, deselected)[source]¶ Enable/disable the option to remove rows.
-
_handle_relationship_parameter_value_selection_changed
(self, selected, deselected)[source]¶ Enable/disable the option to remove rows.
-
_handle_parameter_value_list_selection_changed
(self, selected, deselected)[source]¶ Enable/disable the option to remove rows.
-
show_import_file_dialog
(self, checked=False)[source]¶ Show dialog to allow user to select a file to import.
-
_select_database
(self)[source]¶ Lets user select a database from available databases.
Shows a dialog from which user can select a single database. If there is only a single database it is selected automatically and no dialog is shown.
Returns: the database map of the database or None if no database was selected
-
find_next_leaf
(self, index)[source]¶ If object tree index corresponds to a relationship, then expand the next ocurrence of it.
-
clear_other_selections
(self, *skip_widgets)[source]¶ Clear selections in all widgets except skip_widgets.
-
_handle_object_tree_selection_changed
(self, selected, deselected)[source]¶ Called when the object tree selection changes. Set default rows and apply filters on parameter models.
-
_handle_relationship_tree_selection_changed
(self, selected, deselected)[source]¶ Called when the relationship tree selection changes. Set default rows and apply filters on parameter models.
-
update_filter
(self)[source]¶ Update filters on parameter models according to selected and deselected object tree indexes.
Context menu for object tree.
Parameters: pos (QPoint) – Mouse position
Context menu for relationship tree.
Parameters: pos (QPoint) – Mouse position
-
edit_object_tree_items
(self)[source]¶ Called when F2 is pressed while the object tree has focus. Call the appropriate method to show the edit form, depending on the current index.
-
edit_relationship_tree_items
(self)[source]¶ Called when F2 is pressed while the relationship tree has focus. Call the appropriate method to show the edit form, depending on the current index.
-
show_remove_relationship_tree_items_form
(self)[source]¶ Show form to remove items from relationship treeview.
Context menu for object parameter value table view.
Parameters: pos (QPoint) – Mouse position
Context menu for relationship parameter value table view.
Parameters: pos (QPoint) – Mouse position
Context menu for object parameter table view.
Parameters: pos (QPoint) – Mouse position
Context menu for relationship parameter table view.
Parameters: pos (QPoint) – Mouse position
Show a context menu for parameter tables.
Parameters: - position (QPoint) – local mouse position in the table view
- table_view (QTableView) – the table view where the context menu was triggered
- value_column_header (str) – column header for editable/plottable values
Context menu for relationship parameter table view.
Parameters: pos (QPoint) – Mouse position
-
remove_object_parameter_values
(self)[source]¶ Remove selected rows from object parameter value table.
-
remove_relationship_parameter_values
(self)[source]¶ Remove selected rows from relationship parameter value table.
-
_remove_parameter_values
(self, table_view)[source]¶ Remove selected rows from parameter value table.
Parameters: table_view (QTableView) – a table view from which to remove
-
remove_object_parameter_definitions
(self)[source]¶ Remove selected rows from object parameter definition table.
-
remove_relationship_parameter_definitions
(self)[source]¶ Remove selected rows from relationship parameter definition table.
-
_remove_parameter_definitions
(self, table_view, value_model, class_id_header)[source]¶ Remove selected rows from parameter table.
Parameters: - table_view (QTableView) – the table widget from which to remove
- value_model (QAbstractTableModel) – a value model corresponding to the definition model of table_view
- class_id_header (str) – header of the class id column
-