|
|
Shared, session-only store of pinned ("labeled") log lines. More...
#include <ArmarXGui/gui-plugins/LoggingPlugin/ArmarXLogViewer/LogMarkerRegistry.h>
Inheritance diagram for LogMarkerRegistry:Signals | |
| void | markersChanged () |
Public Member Functions | |
| void | add (LogSeq seq) |
Pin the store entry seq, assigning it the next Glasbey color. | |
| void | clear () |
| Drop all markers. | |
| QColor | colorForSeq (LogSeq seq) const |
Color of the marker pinning seq, or an invalid QColor if it is not pinned. | |
| bool | empty () const |
| bool | expireBefore (LogSeq firstSeq) |
| Remove every marker whose line has been dropped from the store, i.e. | |
| bool | isMarked (LogSeq seq) const |
Whether seq is pinned. | |
| LogMarkerRegistry (QObject *parent=nullptr) | |
| LogMarkerId | markerIdForSeq (LogSeq seq) const |
Id of the marker pinning seq, or 0 if it is not pinned. | |
| std::vector< LogMarker > | markers () const |
| Ordered (insertion-order) view of all markers. | |
| void | recolor (LogMarkerId id, const QColor &color) |
| Reassign a marker's color (no-op if unknown). | |
| void | remove (LogMarkerId id) |
| Remove the marker with the given id (no-op if unknown). | |
Shared, session-only store of pinned ("labeled") log lines.
Owned by the LogViewer and shared by (non-owning) pointer with every LogTableModel, so a line pinned in one filter becomes visible (injected) in all of them. Colors are drawn from the Glasbey lookup table (maximally distinct) by an increasing color index.
Pins identify their line by LogStore sequence number. That is exact (no same-timestamp ambiguity), makes lookups O(1) instead of a message-text comparison against every retained row, and makes expiry a single range check against the store's oldest sequence number.
All mutating methods emit markersChanged() so the Labels panel and every model can refresh. Access is GUI-thread only in practice, but a mutex guards the container.
|
explicit |
| void add | ( | LogSeq | seq | ) |
Pin the store entry seq, assigning it the next Glasbey color.
No-op if it is already pinned.
| void clear | ( | ) |
Drop all markers.
| QColor colorForSeq | ( | LogSeq | seq | ) | const |
Color of the marker pinning seq, or an invalid QColor if it is not pinned.
| bool empty | ( | ) | const |
| bool expireBefore | ( | LogSeq | firstSeq | ) |
Remove every marker whose line has been dropped from the store, i.e.
whose sequence number is below firstSeq. Returns true if anything was removed.
| bool isMarked | ( | LogSeq | seq | ) | const |
Whether seq is pinned.
| LogMarkerId markerIdForSeq | ( | LogSeq | seq | ) | const |
Id of the marker pinning seq, or 0 if it is not pinned.
| std::vector< LogMarker > markers | ( | ) | const |
Ordered (insertion-order) view of all markers.
|
signal |
| void recolor | ( | LogMarkerId | id, |
| const QColor & | color ) |
Reassign a marker's color (no-op if unknown).
| void remove | ( | LogMarkerId | id | ) |
Remove the marker with the given id (no-op if unknown).