Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
expert_info_proxy_model.h
Go to the documentation of this file.
1
12#ifndef EXPERT_INFO_PROXY_MODEL_H
13#define EXPERT_INFO_PROXY_MODEL_H
14
15#include <config.h>
16
17#include <QSortFilterProxyModel>
18
20
21class ExpertInfoProxyModel : public QSortFilterProxyModel
22{
23 Q_OBJECT
24
25public:
26 ExpertInfoProxyModel(QObject *parent = 0);
27
28 enum SeverityMode { Group, Packet };
29 enum ExpertProxyColumn {
30 colProxySeverity = 0,
31 colProxySummary,
32 colProxyGroup,
33 colProxyProtocol,
34 colProxyCount,
35 colProxyLast
36 };
37
38 QVariant data(const QModelIndex &index, int role) const;
39 QVariant headerData(int section, Qt::Orientation orientation,
40 int role = Qt::DisplayRole) const;
41 int columnCount(const QModelIndex &parent = QModelIndex()) const;
42 bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
43
44 virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
45
46 //GUI helpers
47 void setSeverityMode(enum SeverityMode);
48 void setSeverityFilter(int severity, bool hide);
49 void setSummaryFilter(const QString &filter);
50
51protected:
52 bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
53 bool filterAcceptItem(ExpertPacketItem& item) const;
54
55 enum SeverityMode severityMode_;
56 QList<int> hidden_severities_;
57
58 QString textFilter_;
59
60};
61
62#endif // EXPERT_INFO_PROXY_MODEL_H
Definition expert_info_proxy_model.h:22
Definition expert_info_model.h:28