LogMarkerRegistry Class Reference

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

const LogMarkeradd (const LogMessage &snapshot)
 Pin the given message.
 
void clear ()
 Drop all markers.
 
bool isMarked (const LogMessage &message) const
 Whether any marker's snapshot is identical to message.
 
 LogMarkerRegistry (QObject *parent=nullptr)
 
const LogMarkermarkerForMessage (const LogMessage &message) const
 Marker for a message identical to message, or nullptr.
 
std::vector< LogMarkermarkers () 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).
 

Detailed Description

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.

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 59 of file LogMarkerRegistry.h.

Constructor & Destructor Documentation

◆ LogMarkerRegistry()

LogMarkerRegistry ( QObject * parent = nullptr)
explicit

Definition at line 30 of file LogMarkerRegistry.cpp.

Member Function Documentation

◆ add()

const LogMarker * add ( const LogMessage & snapshot)

Pin the given message.

If an equal message is already pinned, its existing marker is returned unchanged (no duplicate). Assigns the next Glasbey color otherwise.

Definition at line 41 of file LogMarkerRegistry.cpp.

+ Here is the call graph for this function:

◆ clear()

void clear ( )

Drop all markers.

Definition at line 116 of file LogMarkerRegistry.cpp.

+ Here is the call graph for this function:

◆ isMarked()

bool isMarked ( const LogMessage & message) const

Whether any marker's snapshot is identical to message.

Definition at line 152 of file LogMarkerRegistry.cpp.

+ Here is the call graph for this function:

◆ markerForMessage()

const LogMarker * markerForMessage ( const LogMessage & message) const

Marker for a message identical to message, or nullptr.

Identity is (time, who, what); see LogMarkerRegistry.cpp.

Definition at line 138 of file LogMarkerRegistry.cpp.

+ Here is the caller graph for this function:

◆ markers()

std::vector< LogMarker > markers ( ) const

Ordered (insertion-order) view of all markers.

Definition at line 131 of file LogMarkerRegistry.cpp.

◆ markersChanged

void markersChanged ( )
signal
+ Here is the caller graph for this function:

◆ recolor()

void recolor ( LogMarkerId id,
const QColor & color )

Reassign a marker's color (no-op if unknown).

Definition at line 94 of file LogMarkerRegistry.cpp.

+ Here is the call graph for this function:

◆ remove()

void remove ( LogMarkerId id)

Remove the marker with the given id (no-op if unknown).

Definition at line 72 of file LogMarkerRegistry.cpp.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: