LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::TestStepsPanel Class Reference

"Test Steps" tab: the step outline of a test-harness log. More...

#include <TestStepsPanel.hpp>

Inheritance diagram for ui::qt::TestStepsPanel:
Inheritance graph
Collaboration diagram for ui::qt::TestStepsPanel:
Collaboration graph

Public Slots

void Refresh ()
 Re-analyses the events if they changed since the last call.
 

Signals

void NavigateToEvent (int actualRow)
 

Public Member Functions

 TestStepsPanel (db::EventsContainer &events, QWidget *parent=nullptr)
 

Protected Member Functions

bool eventFilter (QObject *watched, QEvent *event) override
 Enter / Return on the tree activates the current row.
 

Private Member Functions

void BuildLayout ()
 
void ShowOutline ()
 
void ActivateItem (QTreeWidgetItem *item)
 

Private Attributes

db::EventsContainer & m_events
 
analyzer::TestOutline m_outline
 
bool m_built {false}
 
std::uint64_t m_builtGeneration {0}
 
std::size_t m_builtSize {0}
 
db::EventsContainer::FileMetadata m_builtMetadata
 
QLabel * m_hint {nullptr}
 
QFrame * m_banner {nullptr}
 
QLabel * m_bannerText {nullptr}
 
QPushButton * m_goToFailure {nullptr}
 
QTreeWidget * m_tree {nullptr}
 

Detailed Description

"Test Steps" tab: the step outline of a test-harness log.

Shows analyzer::BuildTestOutline() as a tree (sections → keywords and expectations) with status, start relative to TEST_START, duration and event count, under a banner with the verdict and, for a failed test, the step and message that failed it plus a "Go to failure" button. Double-click or Enter on a row, or the button, emits NavigateToEvent() with the event's container index. Logs without TEST_START only get a short hint.

The outline describes the whole log, not the filtered rows, so Refresh() re-analyses only when the loaded data changes.

Constructor & Destructor Documentation

◆ TestStepsPanel()

ui::qt::TestStepsPanel::TestStepsPanel ( db::EventsContainer &  events,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ ActivateItem()

void ui::qt::TestStepsPanel::ActivateItem ( QTreeWidgetItem *  item)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildLayout()

void ui::qt::TestStepsPanel::BuildLayout ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ eventFilter()

bool ui::qt::TestStepsPanel::eventFilter ( QObject *  watched,
QEvent *  event 
)
overrideprotected

Enter / Return on the tree activates the current row.

Here is the call graph for this function:

◆ NavigateToEvent

void ui::qt::TestStepsPanel::NavigateToEvent ( int  actualRow)
signal
Here is the caller graph for this function:

◆ Refresh

void ui::qt::TestStepsPanel::Refresh ( )
slot

Re-analyses the events if they changed since the last call.

Here is the call graph for this function:

◆ ShowOutline()

void ui::qt::TestStepsPanel::ShowOutline ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_banner

QFrame* ui::qt::TestStepsPanel::m_banner {nullptr}
private

◆ m_bannerText

QLabel* ui::qt::TestStepsPanel::m_bannerText {nullptr}
private

◆ m_built

bool ui::qt::TestStepsPanel::m_built {false}
private

◆ m_builtGeneration

std::uint64_t ui::qt::TestStepsPanel::m_builtGeneration {0}
private

◆ m_builtMetadata

db::EventsContainer::FileMetadata ui::qt::TestStepsPanel::m_builtMetadata
private

◆ m_builtSize

std::size_t ui::qt::TestStepsPanel::m_builtSize {0}
private

◆ m_events

db::EventsContainer& ui::qt::TestStepsPanel::m_events
private

◆ m_goToFailure

QPushButton* ui::qt::TestStepsPanel::m_goToFailure {nullptr}
private

◆ m_hint

QLabel* ui::qt::TestStepsPanel::m_hint {nullptr}
private

◆ m_outline

analyzer::TestOutline ui::qt::TestStepsPanel::m_outline
private

◆ m_tree

QTreeWidget* ui::qt::TestStepsPanel::m_tree {nullptr}
private

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