Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
conversation_colorize_action.h
Go to the documentation of this file.
1
10#ifndef CONVERSATIONCOLORIZEACTION_H
11#define CONVERSATIONCOLORIZEACTION_H
12
13#include <QAction>
14
16struct _packet_info;
17
18// Actions for "Conversation Filter" and "Colorize with Filter" menu items.
19
20class ConversationAction : public QAction
21{
22 Q_OBJECT
23public:
24 ConversationAction(QObject *parent, struct conversation_filter_s *conv_filter = NULL);
25
26 bool isFilterValid(struct _packet_info *pinfo);
27
28 const QByteArray filter() { return filter_ba_; }
29
30 void setColorNumber(int color_number) { color_number_ = color_number; }
31 int colorNumber() { return color_number_; }
32
33public slots:
34 // Exactly one of these should be connected.
35 void setPacketInfo(struct _packet_info *pinfo);
36 void setFieldFilter(const QByteArray field_filter);
37
38private:
39 struct conversation_filter_s *conv_filter_;
40 QByteArray filter_ba_;
41 int color_number_;
42};
43
44class ColorizeAction : public QAction
45{
46 Q_OBJECT
47public:
48 ColorizeAction(QObject *parent) : QAction(parent),
49 color_number_(-1)
50 {}
51
52 const QByteArray filter() { return filter_ba_; }
53
54 void setColorNumber(int color_number) { color_number_ = color_number; }
55 int colorNumber() { return color_number_; }
56
57public slots:
58 void setFieldFilter(const QByteArray field_filter) { filter_ba_ = field_filter; }
59
60private:
61 QByteArray filter_ba_;
62 int color_number_;
63};
64
65#endif // CONVERSATIONCOLORIZEACTION_H
Definition conversation_colorize_action.h:45
Definition conversation_colorize_action.h:21
Definition packet_info.h:43
Definition conversation_filter.h:103