Code Documentation 3.5
Social Network Visualizer
Loading...
Searching...
No Matches
FilterBarWidget Class Reference

Thin strip between toolbar and canvas showing one chip per active filter. More...

#include <widgets/filterbarwidget.h>

Inheritance diagram for FilterBarWidget:
Collaboration diagram for FilterBarWidget:

Classes

struct  ChipData
 

Public Slots

void clearAllChips ()
 

Signals

void chipCloseRequested (FilterCondition::Scope scope)
 
void clearAllRequested ()
 

Public Member Functions

 FilterBarWidget (QWidget *parent=nullptr)
 
void addChip (const QString &label, FilterCondition::Scope scope)
 
void removeLatestChipForScope (FilterCondition::Scope scope)
 
void removeAllChipsForScope (FilterCondition::Scope scope)
 

Private Member Functions

void removeChip (QFrame *chip)
 
void updateVisibility ()
 
void updateCloseButtons ()
 

Private Attributes

QHBoxLayout * m_chipsLayout
 
QPushButton * m_clearAllBtn
 
QList< ChipDatam_chips
 

Detailed Description

Thin strip between toolbar and canvas showing one chip per active filter.

Hidden when no filters are active. Each chip carries a label and a × button. Clicking × removes the chip and emits chipCloseRequested() so MainWindow can pop the corresponding snapshot. "Clear all" emits clearAllRequested() and lets MainWindow drain the stack before calling clearAllChips().

Menu-driven restores (Restore All Nodes / Restore All Edges) must call removeLatestChipForScope() / removeAllChipsForScope() so the bar stays in sync.

Constructor & Destructor Documentation

◆ FilterBarWidget()

FilterBarWidget::FilterBarWidget ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ addChip()

void FilterBarWidget::addChip ( const QString &  label,
FilterCondition::Scope  scope 
)

◆ chipCloseRequested

void FilterBarWidget::chipCloseRequested ( FilterCondition::Scope  scope)
signal

Emitted after the chip has already been removed from the bar.

◆ clearAllChips

void FilterBarWidget::clearAllChips ( )
slot

◆ clearAllRequested

void FilterBarWidget::clearAllRequested ( )
signal

Emitted when the user clicks "Clear all".

◆ removeAllChipsForScope()

void FilterBarWidget::removeAllChipsForScope ( FilterCondition::Scope  scope)

◆ removeChip()

void FilterBarWidget::removeChip ( QFrame *  chip)
private

◆ removeLatestChipForScope()

void FilterBarWidget::removeLatestChipForScope ( FilterCondition::Scope  scope)

◆ updateCloseButtons()

void FilterBarWidget::updateCloseButtons ( )
private

◆ updateVisibility()

void FilterBarWidget::updateVisibility ( )
private

Member Data Documentation

◆ m_chips

QList<ChipData> FilterBarWidget::m_chips
private

◆ m_chipsLayout

QHBoxLayout* FilterBarWidget::m_chipsLayout
private

◆ m_clearAllBtn

QPushButton* FilterBarWidget::m_clearAllBtn
private

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