spine_io.io_models¶
Classes for handling models in PySide2’s model/view framework.
| author: |
|
|---|---|
| date: | 1.6.2019 |
Module Contents¶
-
class
spine_io.io_models.MappingPreviewModel(parent=None)[source]¶ Bases:
models.MinimalTableModelA model for highlighting columns, rows, and so on, depending on Mapping specification. Used by ImportPreviewWidget.
-
set_mapping(self, mapping)[source]¶ Set mapping to display colors from
Parameters: {MappingSpecModel} -- mapping model (mapping) –
-
data_color(self, index)[source]¶ returns background color for index depending on mapping
Parameters: {PySide2.QtCore.QModelIndex} -- index (index) – Returns: [QColor] – QColor of index
-
-
class
spine_io.io_models.MappingSpecModel(model, parent=None)[source]¶ Bases:
PySide2.QtCore.QAbstractTableModelA model to hold a Mapping specification.