LogScrollModel
The rows of a log view (log-color §LGC-D-9).
| Inherits | QAbstractListModel and LogLevels |
| Group | log |
Declared in src/libs/libwidgets/models/LogScrollModel.hpp.
Detailed description
An entry of several lines becomes one row per line, each with the entry's level, so every row is one line high. Only the first row of an entry carries the prefix, and allText() joins the rows of an entry again with newlines. The model keeps the text, the level and the time of an entry; LogRowDelegate paints them. Appending never resets the model, and the trim removes rows from the front without a copy.
An entry can carry a language of libsyntax: the language of the scroll when it was appended (setTextLanguage()). Its text then shows in the syntax colors, and each row knows the tokenizer's state at its start.
See also LogRowDelegate, LogScrollWidget.