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::GenericLogPanel Class Reference

#include <GenericLogPanel.h>

Inherits AzToolsFramework::LogPanel::BaseLogPanel.

Public Member Functions

 GenericLogPanel (QWidget *pParent=nullptr)
 
void FillFromFile (const AZStd::string &fileName)
 
virtual void ParseData (const char *entireLog, AZ::u64 logLength)
 
void AddLogLine (Logging::LogLine &target)
 calling AddLogLine consumes the given line (move operation) and updates all tabs
 
void SetCurrentItemsExpandToFit (bool expandToFit)
 Whether tabs will expand the row height of their current item to show the full message text.
 
- Public Member Functions inherited from AzToolsFramework::LogPanel::BaseLogPanel
 BaseLogPanel (QWidget *pParent=nullptr)
 
void SaveState ()
 SaveState uses the storageID to store which tabs were active and what their settings were.
 
bool LoadState ()
 LoadState reads which tabs were active last time.
 
void AddLogTab (const TabSettings &settings)
 
virtual QSize minimumSize () const
 
virtual QSize sizeHint () const
 
void SetStorageID (AZ::u32 id)
 
int GetTabWidgetCount ()
 
QWidget * GetTabWidgetAtIndex (int index)
 

Protected Member Functions

QWidget * CreateTab (const TabSettings &settings) override
 
virtual QWidget * CreateTab (const TabSettings &settings)=0
 

Protected Attributes

ListLogDataModel m_dataModel
 
bool m_alreadyQueuedCommit = false
 

Additional Inherited Members

- Signals inherited from AzToolsFramework::LogPanel::BaseLogPanel
void TabsReset ()
 
void onLinkActivated (const QString &link)
 
- Static Public Member Functions inherited from AzToolsFramework::LogPanel::BaseLogPanel
static void Reflect (AZ::ReflectContext *reflection)
 

Detailed Description

A log panel that is used for generic data. Used for generic data sources such as Log Files, or special case logging and forensic data that isn't Expected to constantly stream in over time. General usage: Create the panel, put it in your GUI, add as many tabs as you want, using AddLogTab, then call FillFromFile(...) or AddLine(...) unlike the traceprintf view, this does not expect you to be filling it from many threads, so it has no thread safety on FillFromFile or AddLine - call those from the GUI thread. The tabs created will be separate views on the same log data. Note that if you want to have your own log file format you can derive from this base class and override the parseData function

Member Function Documentation

◆ CreateTab()

QWidget * AzToolsFramework::LogPanel::GenericLogPanel::CreateTab ( const TabSettings settings)
overrideprotectedvirtual

◆ FillFromFile()

void AzToolsFramework::LogPanel::GenericLogPanel::FillFromFile ( const AZStd::string &  fileName)

Fill From File - append log data from a file You can call this repeatedly if you'd like.

◆ ParseData()

virtual void AzToolsFramework::LogPanel::GenericLogPanel::ParseData ( const char *  entireLog,
AZ::u64  logLength 
)
virtual

ParseData - override to read whatever format(s) you want. entireLog will be a null terminated buffer (extra null at the end). If your source data is binary then there will be an extra null. The length does not include that extra null, its there for convenience.


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