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

Docked panel showing aggregate statistics for the currently visible events. More...

#include <StatsSummaryPanel.hpp>

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

Public Slots

void Refresh ()
 Recompute all statistics from the current visible row set.
 

Public Member Functions

 StatsSummaryPanel (db::EventsContainer &events, EventsTableView *eventsView, QWidget *parent=nullptr)
 

Private Member Functions

void BuildLayout ()
 
void RefreshFormatStats (const std::vector< unsigned long > &indices)
 
void RefreshSummaryTable (const std::vector< unsigned long > &indices)
 
void RefreshTypeChart (const std::vector< unsigned long > &indices)
 
void RefreshTopNTable (const std::vector< unsigned long > &indices)
 
void RefreshFieldStats (const std::vector< unsigned long > &indices)
 
std::unique_ptr< IStatisticsStrategy > SelectStrategy () const
 Select the appropriate statistics strategy based on current event data.
 
void PopulateColumnCombo ()
 Populates the column combo from the current model header names.
 
std::vector< unsigned long > VisibleIndices () const
 

Static Private Member Functions

static std::string DetectTimestampField (db::EventsContainer &events, const std::vector< unsigned long > &indices)
 

Private Attributes

db::EventsContainer & m_events
 
EventsTableView * m_eventsView
 
QGroupBox * m_formatStatsGroup {nullptr}
 Hidden for non-CAN formats.
 
QTableWidget * m_formatStatsTable {nullptr}
 Format-specific rows from strategy.
 
QTableWidget * m_summaryTable {nullptr}
 Key/value summary grid.
 
QChartView * m_typeChartView {nullptr}
 Event-type horizontal bars.
 
QComboBox * m_columnCombo {nullptr}
 Column selector for Top-N.
 
QSpinBox * m_topNSpin {nullptr}
 How many top values to show.
 
QTableWidget * m_topNTable {nullptr}
 Top-N value frequency table.
 
QTableWidget * m_fieldStatsTable {nullptr}
 Per-field unique/fill stats.
 

Detailed Description

Docked panel showing aggregate statistics for the currently visible events.

Four sections, all scoped to the filtered (visible) row set:

  1. Summary — compact key/value grid: counts, time range, event rate
  2. Event Types — horizontal bar chart: count per type-field value
  3. Top N Values — frequency table for any chosen column, with % share
  4. Field Statistics — per-column unique value count and fill rate

Bar charts expose hover tooltips with full label text and exact counts so that truncated axis labels never hide information.

Refreshes automatically via a modelReset connection wired up in MainWindow.

Constructor & Destructor Documentation

◆ StatsSummaryPanel()

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

Member Function Documentation

◆ BuildLayout()

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

◆ DetectTimestampField()

std::string ui::qt::StatsSummaryPanel::DetectTimestampField ( db::EventsContainer &  events,
const std::vector< unsigned long > &  indices 
)
staticprivate

Return the name of the first field whose values parse as timestamps, or an empty string if no such field is found.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PopulateColumnCombo()

void ui::qt::StatsSummaryPanel::PopulateColumnCombo ( )
private

Populates the column combo from the current model header names.

Here is the caller graph for this function:

◆ Refresh

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

Recompute all statistics from the current visible row set.

Here is the call graph for this function:

◆ RefreshFieldStats()

void ui::qt::StatsSummaryPanel::RefreshFieldStats ( const std::vector< unsigned long > &  indices)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefreshFormatStats()

void ui::qt::StatsSummaryPanel::RefreshFormatStats ( const std::vector< unsigned long > &  indices)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefreshSummaryTable()

void ui::qt::StatsSummaryPanel::RefreshSummaryTable ( const std::vector< unsigned long > &  indices)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefreshTopNTable()

void ui::qt::StatsSummaryPanel::RefreshTopNTable ( const std::vector< unsigned long > &  indices)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefreshTypeChart()

void ui::qt::StatsSummaryPanel::RefreshTypeChart ( const std::vector< unsigned long > &  indices)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SelectStrategy()

std::unique_ptr< IStatisticsStrategy > ui::qt::StatsSummaryPanel::SelectStrategy ( ) const
private

Select the appropriate statistics strategy based on current event data.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VisibleIndices()

std::vector< unsigned long > ui::qt::StatsSummaryPanel::VisibleIndices ( ) const
private

Returns the indices of currently visible events. If no filter is active the full range [0, Size()) is returned.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_columnCombo

QComboBox* ui::qt::StatsSummaryPanel::m_columnCombo {nullptr}
private

Column selector for Top-N.

◆ m_events

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

◆ m_eventsView

EventsTableView* ui::qt::StatsSummaryPanel::m_eventsView
private

◆ m_fieldStatsTable

QTableWidget* ui::qt::StatsSummaryPanel::m_fieldStatsTable {nullptr}
private

Per-field unique/fill stats.

◆ m_formatStatsGroup

QGroupBox* ui::qt::StatsSummaryPanel::m_formatStatsGroup {nullptr}
private

Hidden for non-CAN formats.

◆ m_formatStatsTable

QTableWidget* ui::qt::StatsSummaryPanel::m_formatStatsTable {nullptr}
private

Format-specific rows from strategy.

◆ m_summaryTable

QTableWidget* ui::qt::StatsSummaryPanel::m_summaryTable {nullptr}
private

Key/value summary grid.

◆ m_topNSpin

QSpinBox* ui::qt::StatsSummaryPanel::m_topNSpin {nullptr}
private

How many top values to show.

◆ m_topNTable

QTableWidget* ui::qt::StatsSummaryPanel::m_topNTable {nullptr}
private

Top-N value frequency table.

◆ m_typeChartView

QChartView* ui::qt::StatsSummaryPanel::m_typeChartView {nullptr}
private

Event-type horizontal bars.


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