Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::LogPanel::RingBufferLogDataModel Class Reference

#include <LogPanel_Panel.h>

Inherits QAbstractTableModel.

Public Types

enum class  DataRoles { Icon = 0 , Time , Window , Message }
 

Public Member Functions

 RingBufferLogDataModel (QObject *pParent)
 
virtual int rowCount (const QModelIndex &) const
 
virtual int columnCount (const QModelIndex &) const
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
virtual QVariant data (const QModelIndex &, int role) const
 
void AppendLine (Logging::LogLine &source)
 
void CommitAdd ()
 
void Clear ()
 
const Logging::LogLineGetLineFromIndex (const QModelIndex &index)
 

Detailed Description

this is a ringbuffer-based log panel model meant for the AZ::TraceBus, but could be used by any data source that can construct LogLine structures and feed them to AppendLine. Since its a ring buffer, it can be set to have a maximum number of lines, which will cause the older lines to drop off when they accumulate too deeply it is primarily used for incoming data streams that are constantly filling, not static sources such as files. of particular interest here is how it implements the required rowCount, columnCount, data, and flags functions


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