hamyar_paygah.view_models.mission_table_model¶
View model for Missions list table view.
Classes¶
Model for Qt TableView to show missions data. |
Module Contents¶
- class hamyar_paygah.view_models.mission_table_model.MissionTableModel(missions_list, parent=None)¶
Bases:
PySide6.QtCore.QAbstractTableModelModel for Qt TableView to show missions data.
- Parameters:
missions_list (list[hamyar_paygah.models.mission_model.Mission])
parent (PySide6.QtWidgets.QWidget | None)
- _missions_list¶
- _columns¶
- rowCount(parent=QModelIndex())¶
Returns the number of rows under the given parent.
When the parent is valid it means that rowCount is returning the number of children of parent.
- Return type:
- columnCount(parent=QModelIndex())¶
Returns the number of columns for the children of the given parent.
In most subclasses, the number of columns is independent of the parent.
- Return type:
- data(index, role=Qt.DisplayRole)¶
Returns the data stored under the given role for the item referred to by the index.
- Parameters:
index (PySide6.QtCore.QModelIndex)
- Return type:
None | str
- headerData(section, orientation, role=Qt.DisplayRole)¶
Returns the data for the given role and section in the header with the specified orientation.
For horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number.