spinetoolbox.spine_db_editor.widgets.parameter_view_mixin

Contains the ParameterViewMixin class.

author
  1. Marin (KTH)

date

26.11.2018

Module Contents

Classes

ParameterViewMixin

Provides stacked parameter tables for the Spine db editor.

class spinetoolbox.spine_db_editor.widgets.parameter_view_mixin.ParameterViewMixin(*args, **kwargs)[source]

Provides stacked parameter tables for the Spine db editor.

connect_signals(self)[source]

Connects signals to slots.

init_models(self)[source]

Initializes models.

set_parameter_data(self, index, new_value)[source]

Updates (object or relationship) parameter_definition or value with newly edited data.

show_object_name_list_editor(self, index, rel_cls_id, db_map)[source]

Shows the object names list editor.

Parameters
  • index (QModelIndex) –

  • rel_cls_id (int) –

  • db_map (DiffDatabaseMapping) –

set_default_parameter_data(self, index=None)[source]

Sets default rows for parameter models according to given index.

Parameters

index (QModelIndex) – and index of the object or relationship tree

_get_filter_class_ids(self)[source]

Returns filter class ids by combining filter class ids from entity tree and parameter_tag toolbar.

Returns

mapping db maps to sets of ids, or None if no filter (none shall pass)

Return type

dict, NoneType

reset_filters(self)[source]

Resets filters.

_handle_graph_selection_changed(self, selected_items)[source]

Resets filter according to graph selection.

_handle_object_tree_selection_changed(self, selected_indexes)[source]

Resets filter according to object tree selection.

_handle_relationship_tree_selection_changed(self, selected_indexes)[source]

Resets filter according to relationship tree selection.

_handle_alternative_selection_changed(self, selected_db_map_alt_ids)[source]

Resets filter according to selection in alternative tree view.

_handle_tag_selection_changed(self, selected_db_map_tag_ids)[source]

Resets filter according to selection in parameter_tag tree view.

restore_ui(self)[source]

Restores UI state from previous session.

save_window_state(self)[source]

Saves window state parameters (size, position, state) via QSettings.

receive_alternatives_updated(self, db_map_data)[source]
receive_parameter_tags_fetched(self, db_map_data)[source]
receive_parameter_definitions_fetched(self, db_map_data)[source]
receive_parameter_values_fetched(self, db_map_data)[source]
receive_parameter_tags_added(self, db_map_data)[source]
receive_parameter_definitions_added(self, db_map_data)[source]
receive_parameter_values_added(self, db_map_data)[source]
receive_parameter_tags_updated(self, db_map_data)[source]
receive_parameter_definitions_updated(self, db_map_data)[source]
receive_parameter_values_updated(self, db_map_data)[source]
receive_parameter_definition_tags_set(self, db_map_data)[source]
receive_object_classes_removed(self, db_map_data)[source]
receive_relationship_classes_removed(self, db_map_data)[source]
receive_parameter_tags_removed(self, db_map_data)[source]
receive_parameter_definitions_removed(self, db_map_data)[source]
receive_parameter_values_removed(self, db_map_data)[source]