HistoryStripListWidget

A list of rows, each drawn over a coloured strip of its own history.

Declared in src/libs/libwidgets/components/visualization/HistoryStripListWidget.hpp
Inherits QWidget

Detailed description

The look and the behaviour of the Monitor's process list (ProcessListWidget), for any list whose rows come and go and carry a few numbers: an id column, a name column, a detail text drawn over the row's heat strip, and numeric columns on the right with colour swatches in their headers.

It is Qt's model/view (monitor-load-color §MHD-8): a ResourceRowModel holds the rows, their HeatStrip and their life, a LoadCellDelegate paints a cell, and a QTableView with one fixed row height shows them, so a list of 1 000 000 rows paints only its visible rows. This widget owns the three, paints the header, and keeps the API it had before the port.

Each tick's pixel is the LoadColor of the row's channels, each a colour and a share: up to a share of 1 the colour at that opacity, above it toward the white end, the channels mixed by their real size, so an idle tick is clear (§MHD-1, §MHD-2). With a TimeGridGeometry set, a tick is exactly pxPerSample pixels wide and the newest sits at the strip's right edge, so the strips scroll by whole pixels with the charts above them; without one, the strip is stretched over its area as the Monitor's is.

A row whose key is absent from the next setRows() lingers for a few ticks with a black NAME cell and its other text faded, then goes; a pinned one stays as a ghost, its history frozen, until it is unpinned. A new row has a white NAME cell for a few ticks (§MHD-5). Clicking a header sorts by that column, descending, then ascending, then back to the default order (the order setRows() gave): a numeric column by its values, the id by Row::idValue, the name by its text, and the detail header gives the default order or, with setDetailSortsByName(), the name. A left click on a row pins or unpins it: pinned rows float to the top in pin order. A right click offers the row's copy actions, and the order holds while the menu is open. Hovering shows the row's values in the shared ChartHoverTip; the wheel scrolls.

Every size is derived from the font, as the Monitor's is, so the list follows the body-font-size setting. It has no knowledge of what its rows are: the owner maps its domain onto Row and Channel.

See also ProcessListWidget, StackedAreaChartWidget, TimeGridGeometry.

In this section