RumPi Linux Client 1.0
A wxWidgets desktop dashboard that visualizes a RumPi robot's live sensor data as a condition-reactive scene
LoggerListData Class Reference

A virtual list model backing the on-screen log's data-view control, holding the log lines and colouring rows by severity. More...

#include <LoggerListData.h>

Inheritance diagram for LoggerListData:
[legend]
Collaboration diagram for LoggerListData:
[legend]

Public Member Functions

 LoggerListData ()
 Builds an empty logger list model. More...
 
virtual ~LoggerListData ()=default
 Defaulted destructor. More...
 
virtual void AddToList (const LoggerLineData &dataToAdd)
 Appends a log line to the model and notifies the view that a row was added. More...
 
virtual void GetValueByRow (wxVariant &variant, unsigned int row, unsigned int col) const override
 Supplies the value for a given row and column to the data-view control (icon, timestamp, level text, or description). More...
 
virtual bool GetAttrByRow (unsigned int row, unsigned int col, wxDataViewItemAttr &attr) const override
 Supplies a per-row display attribute, colouring alert rows red/bold and warning rows amber so the log is scannable at a glance. More...
 
virtual bool SetValueByRow (const wxVariant &variant, unsigned int row, unsigned int col) override
 Rejects edits from the UI: the log is read-only from the view's perspective. More...
 

Protected Attributes

std::vector< LoggerLineDatamyLoggerLineDatas
 The log lines backing the view, one per row. More...
 
bool myHasWarnedAtCapacity
 Latches the one-time "log is now rolling off" warning (see AddToList). More...
 

Detailed Description

A virtual list model backing the on-screen log's data-view control, holding the log lines and colouring rows by severity.

Author
Eddie O'Hagan
Date
8/13/2026

Constructor & Destructor Documentation

◆ LoggerListData()

LoggerListData::LoggerListData ( )

Builds an empty logger list model.

Author
Eddie O'Hagan
Date
8/13/2026
A virtual list model backing the on-screen log's data-view control, holding the log lines and colouri...
Definition: LoggerListData.h:27

◆ ~LoggerListData()

virtual LoggerListData::~LoggerListData ( )
virtualdefault

Defaulted destructor.

Author
Eddie O'Hagan
Date
8/13/2026
delete model;
LoggerListData()
Builds an empty logger list model.
Definition: LoggerListData.cpp:15

Member Function Documentation

◆ AddToList()

void LoggerListData::AddToList ( const LoggerLineData dataToAdd)
virtual

Appends a log line to the model and notifies the view that a row was added.

Author
Eddie O'Hagan
Date
8/13/2026
model.AddToList(logLine);
Parameters
[in]dataToAddThe log line to append.

◆ GetAttrByRow()

bool LoggerListData::GetAttrByRow ( unsigned int  row,
unsigned int  col,
wxDataViewItemAttr &  attr 
) const
overridevirtual

Supplies a per-row display attribute, colouring alert rows red/bold and warning rows amber so the log is scannable at a glance.

Author
Eddie O'Hagan
Date
8/13/2026
//Called by the wxDataViewCtrl as it styles each row.
Parameters
[in]rowThe row index.
[in]colThe column index.
[out]attrThe attribute to set for the row.
Returns
True if a custom attribute was set (Alert/Warning), false to keep default styling (OK).

◆ GetValueByRow()

void LoggerListData::GetValueByRow ( wxVariant &  variant,
unsigned int  row,
unsigned int  col 
) const
overridevirtual

Supplies the value for a given row and column to the data-view control (icon, timestamp, level text, or description).

Author
Eddie O'Hagan
Date
8/13/2026
//Called by the wxDataViewCtrl as it renders each cell.
Parameters
[out]variantThe variant to fill with the cell's value.
[in]rowThe row index.
[in]colThe column index (a LoggerColumnID).

◆ SetValueByRow()

bool LoggerListData::SetValueByRow ( const wxVariant &  variant,
unsigned int  row,
unsigned int  col 
)
overridevirtual

Rejects edits from the UI: the log is read-only from the view's perspective.

Author
Eddie O'Hagan
Date
8/13/2026
//Called by the wxDataViewCtrl on an edit attempt; always refuses.
Parameters
[in]variantThe value the control tried to set.
[in]rowThe row index.
[in]colThe column index.
Returns
Always false (the log cannot be edited).

Member Data Documentation

◆ myHasWarnedAtCapacity

bool LoggerListData::myHasWarnedAtCapacity
protected

Latches the one-time "log is now rolling off" warning (see AddToList).

◆ myLoggerLineDatas

std::vector<LoggerLineData> LoggerListData::myLoggerLineDatas
protected

The log lines backing the view, one per row.


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