|
|
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.
Definition at line 69 of file LogMarkerRegistry.h.
|
explicit |
Definition at line 32 of file LogMarkerRegistry.cpp.
| void add | ( | LogSeq | seq | ) |
Pin the store entry seq, assigning it the next Glasbey color.
No-op if it is already pinned.
Definition at line 37 of file LogMarkerRegistry.cpp.
Here is the call graph for this function:| void clear | ( | ) |
Drop all markers.
Definition at line 129 of file LogMarkerRegistry.cpp.
Here is the call graph for this function:| QColor colorForSeq | ( | LogSeq | seq | ) | const |
Color of the marker pinning seq, or an invalid QColor if it is not pinned.
Definition at line 158 of file LogMarkerRegistry.cpp.
Here is the caller graph for this function:| bool empty | ( | ) | const |
Definition at line 144 of file LogMarkerRegistry.cpp.
| 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.
Definition at line 87 of file LogMarkerRegistry.cpp.
Here is the call graph for this function:| bool isMarked | ( | LogSeq | seq | ) | const |
Whether seq is pinned.
Definition at line 186 of file LogMarkerRegistry.cpp.
Here is the call graph for this function:| LogMarkerId markerIdForSeq | ( | LogSeq | seq | ) | const |
Id of the marker pinning seq, or 0 if it is not pinned.
Definition at line 172 of file LogMarkerRegistry.cpp.
| std::vector< LogMarker > markers | ( | ) | const |
Ordered (insertion-order) view of all markers.
Definition at line 151 of file LogMarkerRegistry.cpp.
|
signal |
Here is the caller graph for this function:| void recolor | ( | LogMarkerId | id, |
| const QColor & | color ) |
Reassign a marker's color (no-op if unknown).
Definition at line 107 of file LogMarkerRegistry.cpp.
Here is the call graph for this function:| void remove | ( | LogMarkerId | id | ) |
Remove the marker with the given id (no-op if unknown).
Definition at line 65 of file LogMarkerRegistry.cpp.
Here is the call graph for this function: