ResourceRowModel

The rows of a load list, with their history, their life and their order (monitor-load-color §MHD-8).

Declared in src/libs/libwidgets/components/visualization/ResourceRowModel.hpp.

Detailed description

One table row per list row, in the order drawn: pinned rows first, in pin order, then the rest by the sort column or in the order the last snapshot gave. The columns are the id, the name, the detail over the strip, then one column per numeric value.

Each row keeps a HeatStrip of its past load colors and the state of its life (RowLifecycle): a row absent from a snapshot lingers for RowLifecycle::kLingerTicks ticks, and a pinned one stays as a ghost until it is unpinned. The model holds the LoadColor that colors every strip and cell, so the pixels of a paint and of a tick are one function.

A view reads everything through data() and its roles, so a proxy between them sees every read (§MHT-5 counts them). A tick that keeps the order is a dataChanged() of the rows; a tick that changes the order, adds or removes rows is a model reset. With 1 000 000 rows a view still paints only its visible rows: a QTableView with a fixed row height finds a row by arithmetic.

sort() is the model's own, because pins stay on top and the default order is the snapshot's. It counts its comparisons for the test of §MHT-5.

See also HistoryStripListWidget, LoadCellDelegate, LoadColor, HeatStrip.

In this section