DataTableModel¶
- class sofia_redux.pipeline.gui.widgets.DataTableModel(data, parent=None)[source]¶
Bases:
QAbstractTableModel
Model for the File Information table view.
Initialize the data model.
- Parameters:
- data
OrderedDict
Keys are the column headers; values are the row items. Format is that of the
redux.reduction.Reduction
data_id
attribute.- parentQWidget, optional
Parent widget.
- data
Methods Summary
columnCount
([parent])Return the total number of columns of data.
data
(index[, role])Retrieve table data by index.
headerData
(col, orientation[, role])Retrieve column data.
rowCount
([parent])Return the total number of rows of data.
Methods Documentation
- columnCount(parent=None)[source]¶
Return the total number of columns of data.
- Parameters:
- parentQWidget, optional
Parent widget.
- Returns:
- int
The number of columns in the table.
- data(index, role=0)[source]¶
Retrieve table data by index.
- Parameters:
- indexQModelIndex
Data index to retrieve.
- roleint, optional
Qt display role.
- Returns:
- str or None
If index is valid, a string representation of the data at the index value is returned. If not, None is returned.