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

#include <ColumnFilterPopup.hpp>

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

Signals

void Applied (const QSet< QString > &allowed)
 
void AppliedExcluding (const QSet< QString > &excluded)
 
void Cleared ()
 

Public Member Functions

 ColumnFilterPopup (const QString &columnTitle, const ColumnDistinctValues &distinct, const std::optional< QSet< QString > > &allowed, QWidget *parent=nullptr)
 
QSet< QString > CheckedValues () const
 Raw values of every checked entry (including ones hidden by the search).
 
QSet< QString > UncheckedValues () const
 Raw values of every listed entry that is not checked.
 

Private Member Functions

void OnSearchChanged (const QString &text)
 
void OnSelectAllToggled ()
 
void OnItemChanged (QListWidgetItem *item)
 
void UpdateSelectAllState ()
 
void Accept ()
 

Private Attributes

QLineEdit * m_search {nullptr}
 
QCheckBox * m_selectAll {nullptr}
 
QListWidget * m_list {nullptr}
 
bool m_updating {false}
 
bool m_truncated {false}
 

Detailed Description

Excel-style value filter for one table column: a search box, a "Select all" check box and one check box per distinct value.

Emits Applied(checked) on OK (even with every value checked: only the receiver knows whether the old filter restricts values the list could not show), or Cleared() when "Clear filter" is pressed. When the value list was truncated, OK emits AppliedExcluding(unchecked) instead: the values that could not be listed must stay visible.

Constructor & Destructor Documentation

◆ ColumnFilterPopup()

ui::qt::ColumnFilterPopup::ColumnFilterPopup ( const QString &  columnTitle,
const ColumnDistinctValues &  distinct,
const std::optional< QSet< QString > > &  allowed,
QWidget *  parent = nullptr 
)
Parameters
allowedcurrently allowed values; std::nullopt = no filter yet (every value starts checked).
Here is the call graph for this function:

Member Function Documentation

◆ Accept()

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

◆ Applied

void ui::qt::ColumnFilterPopup::Applied ( const QSet< QString > &  allowed)
signal
Here is the caller graph for this function:

◆ AppliedExcluding

void ui::qt::ColumnFilterPopup::AppliedExcluding ( const QSet< QString > &  excluded)
signal
Here is the caller graph for this function:

◆ CheckedValues()

QSet< QString > ui::qt::ColumnFilterPopup::CheckedValues ( ) const

Raw values of every checked entry (including ones hidden by the search).

Here is the caller graph for this function:

◆ Cleared

void ui::qt::ColumnFilterPopup::Cleared ( )
signal
Here is the caller graph for this function:

◆ OnItemChanged()

void ui::qt::ColumnFilterPopup::OnItemChanged ( QListWidgetItem *  item)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSearchChanged()

void ui::qt::ColumnFilterPopup::OnSearchChanged ( const QString &  text)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSelectAllToggled()

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

◆ UncheckedValues()

QSet< QString > ui::qt::ColumnFilterPopup::UncheckedValues ( ) const

Raw values of every listed entry that is not checked.

Here is the caller graph for this function:

◆ UpdateSelectAllState()

void ui::qt::ColumnFilterPopup::UpdateSelectAllState ( )
private
Here is the caller graph for this function:

Member Data Documentation

◆ m_list

QListWidget* ui::qt::ColumnFilterPopup::m_list {nullptr}
private

◆ m_search

QLineEdit* ui::qt::ColumnFilterPopup::m_search {nullptr}
private

◆ m_selectAll

QCheckBox* ui::qt::ColumnFilterPopup::m_selectAll {nullptr}
private

◆ m_truncated

bool ui::qt::ColumnFilterPopup::m_truncated {false}
private

◆ m_updating

bool ui::qt::ColumnFilterPopup::m_updating {false}
private

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