Wireshark 4.7.2
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
FilterHistoryModel Class Referenceabstract

Abstract list model of recently applied filter expressions. More...

#include <filter_history_model.h>

Inheritance diagram for FilterHistoryModel:
CaptureFilterHistoryModel DisplayFilterHistoryModel

Public Member Functions

 FilterHistoryModel (QObject *parent=nullptr)
virtual void addRecent (const QString &expression)=0
 Commits expression to the recent list.

Detailed Description

Abstract list model of recently applied filter expressions.

The recent-history store is process/global-scoped (today fed by the C dfilter_recent_add path). The host injects a concrete model and retains ownership of it: FilterExpressionEdit holds a non-owning reference and must not delete it.

Most-recent entries appear first (row 0). Apply commits an expression here via addRecent(), which deduplicates and moves the entry to the front, bounding the list. Concrete subclasses (DisplayFilterHistoryModel, CaptureFilterHistoryModel) back this with their respective recent stores.

Member Function Documentation

◆ addRecent()

virtual void FilterHistoryModel::addRecent ( const QString & expression)
pure virtual

Commits expression to the recent list.

Implementations deduplicate, move the entry to the front, and bound the list length.

Implemented in CaptureFilterHistoryModel, and DisplayFilterHistoryModel.


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