spinetoolbox.import_editor.widgets.import_mapping_options¶
ImportMappingOptions widget.
| author: |
|
|---|---|
| date: | 12.5.2020 |
Module Contents¶
Classes¶
ImportMappingOptions |
Provides methods for managing Mapping options (class type, dimensions, parameter type, ignore columns, and so on). |
-
class
spinetoolbox.import_editor.widgets.import_mapping_options.ImportMappingOptions(ui, undo_stack)[source]¶ Bases:
PySide2.QtCore.QObjectProvides methods for managing Mapping options (class type, dimensions, parameter type, ignore columns, and so on).
Parameters: - ui (QWidget) – importer window’s UI
- undo_stack (QUndoStack) – undo stack
-
update_ui(self)[source]¶ updates ui to RelationshipClassMapping, ObjectClassMapping or ObjectGroupMapping model
-
_change_item_mapping_type(self, new_type)[source]¶ Pushes a SetItemMappingType command to the undo stack
Parameters: new_type (str) – item’s new type
-
set_item_mapping_type(self, source_table_name, mapping_specification_name, new_type)[source]¶ Sets the type for an item mapping.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- new_type (str) – name of the type
-
set_item_mapping(self, source_table_name, mapping_specification_name, mapping)[source]¶ Sets item mapping.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- mapping (ItemMappingBase) – item mapping
-
_change_dimension(self, dimension)[source]¶ Pushes a SetItemMappingDimension command to the undo stack.
Parameters: dimension (int) – mapping’s dimension
-
set_dimension(self, source_table_name, mapping_specification_name, dimension)[source]¶ Changes the item mapping’s dimension and emits about_to_undo.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- dimension (int) – new dimension value
-
_change_parameter_type(self, type_name)[source]¶ Pushes a SetParameterType command to undo stack.
Parameters: type_name (str) – new parameter type’s name
-
set_parameter_type(self, source_table_name, mapping_specification_name, type_name)[source]¶ Sets parameter type for an item mapping.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- type_name (src) – new parameter type’s name
-
set_parameter_mapping(self, source_table_name, mapping_specification_name, parameter_mapping)[source]¶ Sets parameter mapping for an item mapping.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- parameter_mapping (ParameterDefinitionMapping) – new parameter
-
_change_import_objects(self, state)[source]¶ Pushes SetImportObjectsFlag command to the undo stack.
Parameters: state (bool) – new flag value
-
set_import_objects_flag(self, source_table_name, mapping_specification_name, import_objects)[source]¶ Sets the import objects flag.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- import_objects (bool) – flag value
-
_change_read_start_row(self, row)[source]¶ Pushes
SetReadStartRowto the undo stack.Parameters: row (int) – new read start row
-
set_read_start_row(self, source_table_name, mapping_specification_name, start_row)[source]¶ Sets item’s parameter’s read start row.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- start_row (int) – new read start row value
-
_change_time_series_repeat_flag(self, repeat)[source]¶ Pushes
SetTimeSeriesRepeatFlagto the undo stack.Parameters: repeat (bool) – True is repeat is enable, False otherwise
-
set_time_series_repeat_flag(self, source_table_name, mapping_specification_name, repeat)[source]¶ Sets the time series repeat flag to given value.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- repeat (bool) – new repeat flag value
-
_change_map_dimensions(self, dimensions)[source]¶ Pushes
SetMapDimensionsto the undo stack.Parameters: dimensions (int) – new map dimensions
-
set_map_dimensions(self, source_table_name, mapping_specification_name, dimensions)[source]¶ Sets map dimensions.
Parameters: - source_table_name (str) – name of the source table
- mapping_specification_name (str) – name of the mapping specification
- dimensions (int) – new map dimensions
-
_change_map_compression_flag(self, compress)[source]¶ Pushes
SetMapCompressFlagto the undo stack.Parameters: compress (CheckState) – if Qt.Checked, Maps will be compressed