SpecAggregateModel

The bodies of the work units of a spec, a section or the side quests, as one read-only list.

Inherits QAbstractListModel
Group libtrove

In the namespace octomy::trove::workspace. Declared in src/libs/libtrove/trove/workspace/SpecAggregateModel.hpp.

Detailed description

A spec and a section have no body (trove-spec-workspace §SW-4). When the operator selects one, the workspace shows the bodies of the work units below it, one row each: the instruction and the Definition of Done. A spec shows its sections in order, each under a header row with the section's rollup.

A model and a view, not a stack of widgets

§SW-4.1 rules out a QVBoxLayout with one widget for each unit: it builds every row to show ten. This model is a QAbstractListModel, a QListView shows it, and SpecAggregateDelegate paints each row from a QTextDocument, the pattern of ChatMessageModel and ChatBubbleDelegate (§RES-8). The model loads windowRows() rows at a time with canFetchMore() and fetchMore(), the way ChatMessageModel loads its windows.

Every unit shows

§SW-10.2: nothing is left out, finished work included. A terminal unit starts collapsed to its title line, for reading. The operator can open it, and close an open one, with setCollapsed() or toggleCollapsed(). rollup() counts every unit of what shows, also the units that are not rows yet.

See also SpecAggregateDelegate, SpecTreeModel, SpecTreeSource.

In this section