spinetoolbox.spine_db_editor.widgets.stacked_view_mixin

Contains the StackedViewMixin class.

Module Contents

Classes

StackedViewMixin

Provides stacked parameter tables for the Spine db editor.

class spinetoolbox.spine_db_editor.widgets.stacked_view_mixin.StackedViewMixin(*args, **kwargs)[source]

Provides stacked parameter tables for the Spine db editor.

connect_signals()[source]

Connects signals to slots.

init_models()[source]

Initializes models.

show_element_name_list_editor(index, entity_class_id, db_map)[source]

Shows the element name list editor.

Parameters
  • index (QModelIndex) –

  • entity_class_id (int) –

  • db_map (DatabaseMapping) –

_set_default_parameter_data(index=None)[source]

Sets default rows for parameter models according to given index.

Parameters

index (QModelIndex) – an index of the entity tree

set_default_parameter_data(default_data, default_db_map)[source]
clear_all_filters()[source]
_reset_filters()[source]

Resets filters.

_handle_graph_selection_changed(selected_items)[source]

Resets filter according to graph selection.

_handle_entity_tree_selection_changed_in_parameter_tables(selected_indexes)[source]

Resets filter according to entity tree selection.

_handle_alternative_selection_changed(selected_db_map_alt_ids)[source]

Resets filter according to selection in alternative tree view.

_handle_scenario_alternative_selection_changed(selected_db_map_alt_ids)[source]

Resets filter according to selection in scenario tree view.

_update_alternative_selection(selected_db_map_alt_ids, other_tree_view, this_tree_view)[source]

Combines alternative selections from alternative and scenario tree views.

Parameters
_clear_all_other_selections(current, other=None)[source]

Clears all the other selections besides the one that was just made.

Parameters
  • current – the tree where the selection that was just made

  • other (optional) – other optional tree

tear_down()[source]