| 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
19class ExpertPacketItem;
20
21 class 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
43 virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
44
45 //GUI helpers
46 void setSeverityMode(enum SeverityMode);
47 void setSeverityFilter(int severity, bool hide);
48 void setSummaryFilter(const QString &filter);
49
50protected:
51 bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
52 bool filterAcceptItem(ExpertPacketItem& item) const;
53
54 enum SeverityMode severityMode_;
55 QList<int> hidden_severities_;
56
57 QString textFilter_;
58
59};
60
61#endif // EXPERT_INFO_PROXY_MODEL_H
ExpertInfoProxyModel
Definition expert_info_proxy_model.h:22
ExpertPacketItem
Definition expert_info_model.h:28