spinetoolbox.import_editor.mvcmodels.source_data_table_model¶
Contains the source data table model.
| author: |
|
|---|---|
| date: | 1.6.2019 |
Module Contents¶
Classes¶
SourceDataTableModel |
A model for import mapping specification. |
-
class
spinetoolbox.import_editor.mvcmodels.source_data_table_model.SourceDataTableModel(parent=None)[source]¶ Bases:
spinetoolbox.mvcmodels.minimal_table_model.MinimalTableModelA model for import mapping specification.
Highlights columns, rows, and so on, depending on Mapping specification.
Table model for outlining simple tabular data.
Parameters: parent (QObject) – the parent object -
set_mapping(self, mapping)[source]¶ Set mapping to display colors from
Parameters: mapping (MappingSpecificationModel) – mapping model
-
data(self, index, role=Qt.DisplayRole)[source]¶ Returns the data stored under the given role for the item referred to by the index.
Parameters: - index (QModelIndex) – Index of item
- role (int) – Data role
Returns: Item data for given role.
-
data_color(self, index)[source]¶ Returns background color for index depending on mapping.
Parameters: index (PySide2.QtCore.QModelIndex) – index Returns: color of index Return type: QColor
-