spinetoolbox.project_items.exporter.widgets.parameter_index_settings_window

Parameter indexing settings window for .gdx export.

author:
  1. Soininen (VTT)
date:

25.11.2019

Module Contents

Classes

ParameterIndexSettingsWindow A window which shows a list of ParameterIndexSettings widgets, one for each parameter with indexed values.

Functions

_disable_domain_updates(window) A context manager which disables updates on the indexing settings widgets.
class spinetoolbox.project_items.exporter.widgets.parameter_index_settings_window.ParameterIndexSettingsWindow(indexing_settings, set_settings, database_path, scenario, parent)[source]

Bases: PySide2.QtWidgets.QWidget

A window which shows a list of ParameterIndexSettings widgets, one for each parameter with indexed values.

Parameters:
  • indexing_settings (dict) – a map from parameter name to IndexingSetting
  • set_settings (SetSettings) – export settings
  • database_path (str) – a database url
  • scenario (str) – scenario name
  • parent (QWidget) – a parent widget
settings_approved[source]

Emitted when the settings have been approved.

settings_rejected[source]

Emitted when the settings have been rejected.

indexing_settings[source]

indexing settings dictionary

additional_indexing_domains(self)[source]
set_domain_updated_enabled(self, enabled)[source]

Enables or disables updating the indexing settings widgets.

Parameters:enabled (bool) – if True, allow the widgets to update
_switch_additional_domain_widgets_enabled_state(self, using_expression)[source]

Enabled and disables additional domain widgets.

Parameters:using_expression (bool) – True if expression is used, False if record keys are extracted from existing parameter
_set_additional_domain_widgets_enabled(self, enabled)[source]
_add_domain(self, _)[source]

Creates a new additional domain.

_collect_and_hide(self)[source]

Collects settings from individual ParameterIndexSettings widgets and hides the window.

_load_additional_domain(self, current, previous)[source]
_reject_and_close(self)[source]
_remove_selected_domains(self, _)[source]
_send_domains_to_indexing_widgets(self, parent, first, last)[source]

Updates the available domains combo boxes in indexing widgets.

_update_after_domain_rename(self, old_name, new_name)[source]

Propagates changes in domain names to widgets.

Parameters:
  • old_name (str) – domain’s previous name
  • new_name (str) – domain’s current name
_update_expression(self, expression)[source]

Updates the domain’s record key expression.

Parameters:expression (str) – new expression
_update_length(self, length)[source]

Updates the number of additional domain’s records.

Parameters:length (int) – new record count
_use_expression(self, _)[source]
_use_extraction(self, _)[source]
_set_extraction_domain(self, domain_name)[source]

Sets the domain from which domain’s records are extracted.

Parameters:domain_name (str) – domain name
closeEvent(self, event)[source]

Handles the close event.

spinetoolbox.project_items.exporter.widgets.parameter_index_settings_window._disable_domain_updates(window)[source]

A context manager which disables updates on the indexing settings widgets.

Parameters:window (ParameterIndexSettingsWindow) – settings window