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

#include <SequenceDiagramPanel.hpp>

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

Public Slots

void Refresh ()
 
void SetDefinitions (const std::vector< ActorDefinition > &defs)
 

Public Member Functions

 ~SequenceDiagramPanel () override
 
 SequenceDiagramPanel (db::EventsContainer &events, EventsTableView *eventsView, QWidget *parent=nullptr)
 

Private Slots

void OnDiscoveryFinished ()
 
void OnLimitChanged (int value)
 
void OnSceneClicked (qulonglong eventIndex)
 

Private Member Functions

void BuildLayout ()
 
void RenderDiagram (const analyzer::ExchangePattern &pat, bool resetZoom)
 

Private Attributes

db::EventsContainer & m_events
 
EventsTableView * m_eventsView
 
QGraphicsScene * m_scene {nullptr}
 
SequenceZoomView * m_view {nullptr}
 
QSpinBox * m_limitSpin {nullptr}
 
QLabel * m_statusLabel {nullptr}
 
QPushButton * m_refreshBtn {nullptr}
 
std::optional< analyzer::ExchangePattern > m_pattern {std::nullopt}
 
QFutureWatcher< analyzer::ActorDiscoveryResult > * m_watcher {nullptr}
 
bool m_refreshPending {false}
 Refresh() was called while discovery ran.
 
std::string m_selfActor
 Raw value of the "self" actor (empty = none)
 
std::map< std::string, std::string > m_aliasMap
 raw value → display alias
 

Detailed Description

Sequence diagram panel.

On Refresh(), runs ActorDiscoverer::Discover on a background thread (QtConcurrent) so the UI stays responsive. Once discovery completes the exchange pattern is stored and RenderDiagram() draws the swimlane. Each arrow is clickable (double-click) to navigate to the source event.

Navigation: scroll bars / mouse wheel scroll, drag pans, Ctrl(Cmd)+wheel, trackpad pinch, the toolbar buttons and Ctrl++ / Ctrl+- / Ctrl+0 zoom. A freshly discovered diagram opens fit to width (never enlarged past 100%); changing the message limit or aliases keeps the current zoom.

Constructor & Destructor Documentation

◆ ~SequenceDiagramPanel()

ui::qt::SequenceDiagramPanel::~SequenceDiagramPanel ( )
override

◆ SequenceDiagramPanel()

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

Member Function Documentation

◆ BuildLayout()

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

◆ OnDiscoveryFinished

void ui::qt::SequenceDiagramPanel::OnDiscoveryFinished ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnLimitChanged

void ui::qt::SequenceDiagramPanel::OnLimitChanged ( int  value)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSceneClicked

void ui::qt::SequenceDiagramPanel::OnSceneClicked ( qulonglong  eventIndex)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Refresh

void ui::qt::SequenceDiagramPanel::Refresh ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RenderDiagram()

void ui::qt::SequenceDiagramPanel::RenderDiagram ( const analyzer::ExchangePattern &  pat,
bool  resetZoom 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDefinitions

void ui::qt::SequenceDiagramPanel::SetDefinitions ( const std::vector< ActorDefinition > &  defs)
slot

Called whenever actor definitions change. Updates alias and self information used during rendering without re-running discovery.

Here is the call graph for this function:

Member Data Documentation

◆ m_aliasMap

std::map<std::string, std::string> ui::qt::SequenceDiagramPanel::m_aliasMap
private

raw value → display alias

◆ m_events

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

◆ m_eventsView

EventsTableView* ui::qt::SequenceDiagramPanel::m_eventsView
private

◆ m_limitSpin

QSpinBox* ui::qt::SequenceDiagramPanel::m_limitSpin {nullptr}
private

◆ m_pattern

std::optional<analyzer::ExchangePattern> ui::qt::SequenceDiagramPanel::m_pattern {std::nullopt}
private

◆ m_refreshBtn

QPushButton* ui::qt::SequenceDiagramPanel::m_refreshBtn {nullptr}
private

◆ m_refreshPending

bool ui::qt::SequenceDiagramPanel::m_refreshPending {false}
private

Refresh() was called while discovery ran.

◆ m_scene

QGraphicsScene* ui::qt::SequenceDiagramPanel::m_scene {nullptr}
private

◆ m_selfActor

std::string ui::qt::SequenceDiagramPanel::m_selfActor
private

Raw value of the "self" actor (empty = none)

◆ m_statusLabel

QLabel* ui::qt::SequenceDiagramPanel::m_statusLabel {nullptr}
private

◆ m_view

SequenceZoomView* ui::qt::SequenceDiagramPanel::m_view {nullptr}
private

◆ m_watcher

QFutureWatcher<analyzer::ActorDiscoveryResult>* ui::qt::SequenceDiagramPanel::m_watcher {nullptr}
private

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