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

Interactive event-timeline panel. More...

#include <TimelineChartPanel.hpp>

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

Public Slots

void Refresh ()
 Rebuild the chart from the current visible row set.
 

Public Member Functions

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

Private Member Functions

void BuildLayout ()
 

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
 
QChartView * m_chartView {nullptr}
 
QSpinBox * m_bucketSpin {nullptr}
 
QPushButton * m_clearBtn {nullptr}
 
QLabel * m_statusLabel {nullptr}
 
std::vector< std::vector< unsigned long > > m_bucketEvents
 Per-bucket event indices populated during Refresh; consumed by click handlers.
 
DrillDownFilter m_bucketFilter
 The bucket filter set by a click, and the filter it replaced.
 

Detailed Description

Interactive event-timeline panel.

Displays a stacked bar chart of visible events distributed over time, colour-coded by log level. Clicking a bar narrows the events view to the events in that time bucket. A Clear Selection button removes the bucket filter and restores the previous visible set.

Refreshes automatically via a modelReset connection wired up in MainWindow.

Constructor & Destructor Documentation

◆ TimelineChartPanel()

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

Member Function Documentation

◆ BuildLayout()

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

◆ DetectTimestampField()

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

Return the name of the first field whose values parse as timestamps, or empty if none is found.

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

◆ Refresh

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

Rebuild the chart from the current visible row set.

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

Member Data Documentation

◆ m_bucketEvents

std::vector<std::vector<unsigned long> > ui::qt::TimelineChartPanel::m_bucketEvents
private

Per-bucket event indices populated during Refresh; consumed by click handlers.

◆ m_bucketFilter

DrillDownFilter ui::qt::TimelineChartPanel::m_bucketFilter
private

The bucket filter set by a click, and the filter it replaced.

◆ m_bucketSpin

QSpinBox* ui::qt::TimelineChartPanel::m_bucketSpin {nullptr}
private

◆ m_chartView

QChartView* ui::qt::TimelineChartPanel::m_chartView {nullptr}
private

◆ m_clearBtn

QPushButton* ui::qt::TimelineChartPanel::m_clearBtn {nullptr}
private

◆ m_events

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

◆ m_eventsView

EventsTableView* ui::qt::TimelineChartPanel::m_eventsView
private

◆ m_statusLabel

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

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