#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::LogLine & | GetLineFromIndex (const QModelIndex &index) |
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