spinetoolbox.mvcmodels.indexed_value_table_model

A model for indexed parameter values, used by the parameter_value editors.

Module Contents

Classes

IndexedValueTableModel

A base class for time pattern and time series models.

Attributes

EXPANSE_COLOR

spinetoolbox.mvcmodels.indexed_value_table_model.EXPANSE_COLOR[source]
class spinetoolbox.mvcmodels.indexed_value_table_model.IndexedValueTableModel(value, parent)[source]

Bases: PySide6.QtCore.QAbstractTableModel

A base class for time pattern and time series models.

Parameters
  • value (IndexedValue) – a parameter_value

  • parent (QObject) – parent object

property value[source]

Returns the parameter_value associated with the model.

columnCount(parent=QModelIndex())[source]

Returns the number of columns which is two.

data(index, role=Qt.ItemDataRole.DisplayRole)[source]

Returns the data at index for given role.

headerData(section, orientation=Qt.Orientation.Horizontal, role=Qt.ItemDataRole.DisplayRole)[source]

Returns a header.

is_expanse_row(row)[source]

Returns True if row is the expanse row.

Parameters

row (int) – a row

Returns

True if row is the expanse row, False otherwise

Return type

bool

reset(value)[source]

Resets the model.

rowCount(parent=QModelIndex())[source]

Returns the number of rows.

setHeaderData(section, orientation, value, role=Qt.ItemDataRole.EditRole)[source]