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

Panel for filtering events by a timestamp range. More...

#include <TimeRangeFilterPanel.hpp>

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

Classes

struct  State
 Plain-data snapshot of the panel state — used by filter profiles. More...
 

Signals

void FilterApplied ()
 Emitted after the filter has been applied to the events view.
 
void FilterCleared ()
 Emitted after the filter has been cleared.
 

Public Member Functions

 TimeRangeFilterPanel (db::EventsContainer &events, EventsTableView *eventsView, QWidget *parent=nullptr)
 
State GetState () const
 Returns the current widget state (field, from, to, active).
 
void SetState (const State &s)
 Restores state from a profile. Does NOT automatically apply the filter.
 
void Apply ()
 Applies the filter to the events view immediately.
 
void Clear ()
 Clears the time-range filter (shows all events).
 

Private Slots

void HandleAutoDetect ()
 
void HandleApply ()
 
void HandleClear ()
 

Private Member Functions

void BuildLayout ()
 
std::vector< unsigned long > ComputeMatchingIndices () const
 Scans all events and returns indices whose timestamp falls in [from, to].
 

Private Attributes

db::EventsContainer & m_events
 
EventsTableView * m_eventsView
 
QComboBox * m_fieldCombo {nullptr}
 
QLineEdit * m_fromEdit {nullptr}
 
QLineEdit * m_toEdit {nullptr}
 
QLabel * m_statusLabel {nullptr}
 
bool m_active {false}
 

Detailed Description

Panel for filtering events by a timestamp range.

The user selects a timestamp field name, then specifies optional "from" and "to" bounds (ISO-format strings). The filter is applied by string comparison, so any lexicographically-ordered timestamp format (ISO 8601 etc.) works correctly.

Applying the filter calls EventsTableView::SetFilteredEvents() directly and emits FilterApplied() so that dependent panels (e.g. ActorsPanel) can refresh against the new visible set.

Constructor & Destructor Documentation

◆ TimeRangeFilterPanel()

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

Member Function Documentation

◆ Apply()

void ui::qt::TimeRangeFilterPanel::Apply ( )

Applies the filter to the events view immediately.

Here is the call graph for this function:

◆ BuildLayout()

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

◆ Clear()

void ui::qt::TimeRangeFilterPanel::Clear ( )

Clears the time-range filter (shows all events).

Here is the call graph for this function:

◆ ComputeMatchingIndices()

std::vector< unsigned long > ui::qt::TimeRangeFilterPanel::ComputeMatchingIndices ( ) const
private

Scans all events and returns indices whose timestamp falls in [from, to].

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

◆ FilterApplied

void ui::qt::TimeRangeFilterPanel::FilterApplied ( )
signal

Emitted after the filter has been applied to the events view.

Here is the caller graph for this function:

◆ FilterCleared

void ui::qt::TimeRangeFilterPanel::FilterCleared ( )
signal

Emitted after the filter has been cleared.

Here is the caller graph for this function:

◆ GetState()

TimeRangeFilterPanel::State ui::qt::TimeRangeFilterPanel::GetState ( ) const

Returns the current widget state (field, from, to, active).

◆ HandleApply

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

◆ HandleAutoDetect

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

◆ HandleClear

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

◆ SetState()

void ui::qt::TimeRangeFilterPanel::SetState ( const State &  s)

Restores state from a profile. Does NOT automatically apply the filter.

Member Data Documentation

◆ m_active

bool ui::qt::TimeRangeFilterPanel::m_active {false}
private

◆ m_events

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

◆ m_eventsView

EventsTableView* ui::qt::TimeRangeFilterPanel::m_eventsView
private

◆ m_fieldCombo

QComboBox* ui::qt::TimeRangeFilterPanel::m_fieldCombo {nullptr}
private

◆ m_fromEdit

QLineEdit* ui::qt::TimeRangeFilterPanel::m_fromEdit {nullptr}
private

◆ m_statusLabel

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

◆ m_toEdit

QLineEdit* ui::qt::TimeRangeFilterPanel::m_toEdit {nullptr}
private

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