| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
display_filter_bookmark_model.h
Go to the documentation of this file.
1
9
10#ifndef DISPLAY_FILTER_BOOKMARK_MODEL_H
11#define DISPLAY_FILTER_BOOKMARK_MODEL_H
12
13#include <ui/qt/models/bookmark_model.h>
14
15 class FilterListModel;
16
25 class DisplayFilterBookmarkModel : public BookmarkModel
26{
27 Q_OBJECT
28
29 public:
30 explicit DisplayFilterBookmarkModel(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
42 public slots:
44 void reload();
45
46 private:
47 FilterListModel *list_;
48};
49
50#endif // DISPLAY_FILTER_BOOKMARK_MODEL_H
bookmark_model.h
DisplayFilterBookmarkModel::contains
bool contains(const QString &expression) const override
Returns true when expression exactly matches a saved entry.
Definition display_filter_bookmark_model.cpp:50
DisplayFilterBookmarkModel::reload
void reload()
Reloads from the saved-filters store (e.g. on external change).
Definition display_filter_bookmark_model.cpp:76
DisplayFilterBookmarkModel::addBookmark
void addBookmark(const QString &name, const QString &expression)
Adds a saved filter and persists the list.
Definition display_filter_bookmark_model.cpp:55
DisplayFilterBookmarkModel::removeBookmark
void removeBookmark(const QString &expression)
Removes the saved filter matching expression and persists.
Definition display_filter_bookmark_model.cpp:65
FilterListModel
A list model for managing capture filters, display filters, and display macros.
Definition filter_list_model.h:25