|
Wireshark 4.7.2
The Wireshark network protocol analyzer
|
Abstract list model of saved ("bookmarked") filter expressions. More...
#include <bookmark_model.h>
Public Types | |
| enum | Roles { ExpressionRole = Qt::UserRole + 1 , NameRole } |
| Item-data roles exposed by every bookmark model. More... | |
Public Member Functions | |
| BookmarkModel (QObject *parent=nullptr) | |
| virtual bool | contains (const QString &expression) const =0 |
Returns true when expression exactly matches a saved entry. | |
Abstract list model of saved ("bookmarked") filter expressions.
Separate store and model from the recent history. Each entry carries at least an expression and a display name, exposed through ExpressionRole and NameRole. DisplayRole/EditRole return the expression, so typeahead completion offers the value; the bookmark menu reads ExpressionRole/NameRole explicitly. The model owns load/save/persistence.
The bookmark model is widget-owned: FilterExpressionEdit deletes it with itself. Concrete subclasses (DisplayFilterBookmarkModel, CaptureFilterBookmarkModel) back this with their existing saved-filter stores.
| enum BookmarkModel::Roles |
|
pure virtual |
Returns true when expression exactly matches a saved entry.
Drives the enablement of the bookmark menu's "remove current" action, centralising logic that the old edits duplicated inside checkFilter().
Implemented in CaptureFilterBookmarkModel, and DisplayFilterBookmarkModel.