Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
in_packet_search.h
Go to the documentation of this file.
1
9
10#ifndef IN_PACKET_SEARCH_H
11#define IN_PACKET_SEARCH_H
12
13#include <QModelIndex>
14#include <QObject>
15#include <QString>
16
17class ProtoTree;
18
23class InPacketSearch : public QObject
24{
25 Q_OBJECT
26
27public:
28 explicit InPacketSearch(ProtoTree *tree, QObject *parent = nullptr);
29
30 void installDelegate();
31
32 bool isMatch(const QModelIndex &index) const;
33 bool isCurrentMatch(const QModelIndex &index) const;
34 bool highlightsVisible() const;
35
36 void setHighlightEnabled(bool enabled);
37 void clearMatches();
38
39 void search(const QString &pattern, bool case_sensitive, bool use_regex);
40 void findNext();
41 void findPrevious();
42
43 qsizetype matchCount() const { return matches_.size(); }
44 qsizetype currentMatchIndex() const { return current_match_; }
45 bool isRegexInvalid() const { return regex_invalid_; }
46
47signals:
48 void matchesChanged();
49
50private:
51 void collectIndices(const QModelIndex &parent, QList<QModelIndex> &out);
52 void navigateTo(qsizetype index);
53 void expandParents(const QModelIndex &index);
54
55 ProtoTree *proto_tree_;
56 QList<QModelIndex> matches_;
57 qsizetype current_match_;
58 bool highlight_enabled_;
59 bool regex_invalid_;
60};
61
62#endif // IN_PACKET_SEARCH_H
A tree view for displaying protocol dissection details.
Definition proto_tree.h:30