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

#include <FilterHeaderView.hpp>

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

Signals

void FilterIndicatorClicked (int logicalIndex)
 

Public Member Functions

 FilterHeaderView (Qt::Orientation orientation, QWidget *parent=nullptr)
 
void SetFilteredPredicate (std::function< bool(int)> isFiltered)
 Tells the header which columns currently carry a filter.
 
QRect IndicatorRect (int logicalIndex) const
 Hit area of the filter button of logicalIndex, in viewport coordinates.
 

Protected Member Functions

void paintSection (QPainter *painter, const QRect &rect, int logicalIndex) const override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 

Private Attributes

std::function< bool(int)> m_isFiltered
 
bool m_swallowRelease {false}
 

Detailed Description

Horizontal header that draws a small filter button at the right edge of every section (highlighted while that column has a value filter). Clicking the button emits FilterIndicatorClicked(); clicking anywhere else on the section keeps its normal behaviour (sort, drag, resize).

Constructor & Destructor Documentation

◆ FilterHeaderView()

ui::qt::FilterHeaderView::FilterHeaderView ( Qt::Orientation  orientation,
QWidget *  parent = nullptr 
)
explicit

Member Function Documentation

◆ FilterIndicatorClicked

void ui::qt::FilterHeaderView::FilterIndicatorClicked ( int  logicalIndex)
signal
Here is the caller graph for this function:

◆ IndicatorRect()

QRect ui::qt::FilterHeaderView::IndicatorRect ( int  logicalIndex) const

Hit area of the filter button of logicalIndex, in viewport coordinates.

Here is the caller graph for this function:

◆ mousePressEvent()

void ui::qt::FilterHeaderView::mousePressEvent ( QMouseEvent *  event)
overrideprotected
Here is the call graph for this function:

◆ mouseReleaseEvent()

void ui::qt::FilterHeaderView::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

◆ paintSection()

void ui::qt::FilterHeaderView::paintSection ( QPainter *  painter,
const QRect &  rect,
int  logicalIndex 
) const
overrideprotected

◆ SetFilteredPredicate()

void ui::qt::FilterHeaderView::SetFilteredPredicate ( std::function< bool(int)>  isFiltered)

Tells the header which columns currently carry a filter.

Here is the caller graph for this function:

Member Data Documentation

◆ m_isFiltered

std::function<bool(int)> ui::qt::FilterHeaderView::m_isFiltered
private

◆ m_swallowRelease

bool ui::qt::FilterHeaderView::m_swallowRelease {false}
private

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