spinetoolbox.project_items.exporter.mvcmodels.indexing_table_model¶
Contains IndexingTableModel.
| author: |
|
|---|---|
| date: | 25.8.2020 |
Module Contents¶
Classes¶
IndexingTableModel |
A table model for parameter_value indexing. |
-
class
spinetoolbox.project_items.exporter.mvcmodels.indexing_table_model.IndexingTableModel(parameter)[source]¶ Bases:
PySide2.QtCore.QAbstractTableModelA table model for parameter_value indexing.
First column contains the proposed new index keys. The rest of the columns contain the parameter values for each set of existing index keys. Only selected new index keys are used for indexing. Unselected rows are left empty.
Parameters: parameter (Parameter) – a parameter to model -
get_picking(self)[source]¶ Turns the checked record into picking.
Returns: picked records Return type: FixedPicking
-
data(self, index, role=Qt.DisplayRole)[source]¶ Returns data associated with given model index and role.
-
mapped_values_balance(self)[source]¶ Returns the balance between available indexes and parameter values.
Zero means that there is as many indexes available as there are values, i.e. the parameter is ‘perfectly’ indexed. A positive value means there are more indexes than values while a negative value means there are not enough indexes for all values.
Returns: mapped values’ balance Return type: int
-