Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
capture_filter_bookmark_model.h
Go to the documentation of this file.
1
9
10#ifndef CAPTURE_FILTER_BOOKMARK_MODEL_H
11#define CAPTURE_FILTER_BOOKMARK_MODEL_H
12
14
15class FilterListModel;
16
25class CaptureFilterBookmarkModel : public BookmarkModel
26{
27 Q_OBJECT
28
29public:
30 explicit CaptureFilterBookmarkModel(QObject *parent = nullptr);
31
32 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
33 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
34
35 bool contains(const QString &expression) const override;
36
38 void addBookmark(const QString &name, const QString &expression);
40 void removeBookmark(const QString &expression);
41
42public slots:
44 void reload();
45
46private:
47 FilterListModel *list_;
48};
49
50#endif // CAPTURE_FILTER_BOOKMARK_MODEL_H
bool contains(const QString &expression) const override
Returns true when expression exactly matches a saved entry.
Definition capture_filter_bookmark_model.cpp:50
void addBookmark(const QString &name, const QString &expression)
Adds a saved filter and persists the list.
Definition capture_filter_bookmark_model.cpp:55
void reload()
Reloads from the saved-filters store (e.g. on external change).
Definition capture_filter_bookmark_model.cpp:76
void removeBookmark(const QString &expression)
Removes the saved filter matching expression and persists.
Definition capture_filter_bookmark_model.cpp:65
A list model for managing capture filters, display filters, and display macros.
Definition filter_list_model.h:25