Skip to content

transaction_table_model

Flat table model for transaction history — O(1) insertion via QTableView.

Classes:

TransactionTableModel

TransactionTableModel(parent: Any = None)

Bases: QAbstractTableModel

Flat list-backed model. Each row is a tuple; no per-row objects.

Methods:

  • append_rows

    Append rows in a single beginInsertRows/endInsertRows pair.

  • clear

    Remove all rows.

  • columnCount

    Return column count.

  • data

    Return cell data for the given index and role.

  • headerData

    Return column header labels.

  • rowCount

    Return total row count.

  • row_data

    Direct access to a row tuple (for filter checks and selection).

append_rows

append_rows(rows: list[tuple]) -> None

Append rows in a single beginInsertRows/endInsertRows pair.

clear

clear() -> None

Remove all rows.

columnCount

columnCount(parent: QModelIndex = _ROOT) -> int

Return column count.

data

data(index: QModelIndex, role: int = DisplayRole) -> Any

Return cell data for the given index and role.

headerData

headerData(
    section: int,
    orientation: Orientation,
    role: int = DisplayRole,
) -> str | None

Return column header labels.

rowCount

rowCount(parent: QModelIndex = _ROOT) -> int

Return total row count.

row_data

row_data(row: int) -> tuple

Direct access to a row tuple (for filter checks and selection).