| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
conversation_colorize_action.h
Go to the documentation of this file.
1
9
10#ifndef CONVERSATIONCOLORIZEACTION_H
11#define CONVERSATIONCOLORIZEACTION_H
12
13#include <QAction>
14
15 struct conversation_filter_s;
16 struct _packet_info;
17
18// Actions for "Conversation Filter" and "Colorize with Filter" menu items.
19
23 class ConversationAction : public QAction
24{
25 Q_OBJECT
26 public:
32 ConversationAction(QObject *parent, struct conversation_filter_s *conv_filter = NULL);
33
39 bool isFilterValid(struct _packet_info *pinfo);
40
45 const QByteArray filter() { return filter_ba_; }
46
51 void setColorNumber(int color_number) { color_number_ = color_number; }
52
57 int colorNumber() { return color_number_; }
58
59 public slots:
60 // Exactly one of these should be connected.
65 void setPacketInfo(struct _packet_info *pinfo);
66
71 void setFieldFilter(const QByteArray field_filter);
72
73 private:
75 struct conversation_filter_s *conv_filter_;
76
78 QByteArray filter_ba_;
79
81 int color_number_;
82};
83
87 class ColorizeAction : public QAction
88{
89 Q_OBJECT
90 public:
95 ColorizeAction(QObject *parent) : QAction(parent),
96 color_number_(-1)
97 {}
98
103 const QByteArray filter() { return filter_ba_; }
104
109 void setColorNumber(int color_number) { color_number_ = color_number; }
110
115 int colorNumber() { return color_number_; }
116
117 public slots:
122 void setFieldFilter(const QByteArray field_filter) { filter_ba_ = field_filter; }
123
124 private:
126 QByteArray filter_ba_;
127
129 int color_number_;
130};
131
132#endif // CONVERSATIONCOLORIZEACTION_H
ColorizeAction::colorNumber
int colorNumber()
Retrieves the color number associated with this action.
Definition conversation_colorize_action.h:115
ColorizeAction::setFieldFilter
void setFieldFilter(const QByteArray field_filter)
Sets the field filter directly.
Definition conversation_colorize_action.h:122
ColorizeAction::filter
const QByteArray filter()
Retrieves the filter string as a byte array.
Definition conversation_colorize_action.h:103
ColorizeAction::setColorNumber
void setColorNumber(int color_number)
Sets the color number associated with this action.
Definition conversation_colorize_action.h:109
ColorizeAction::ColorizeAction
ColorizeAction(QObject *parent)
Constructs a new ColorizeAction.
Definition conversation_colorize_action.h:95
ConversationAction::isFilterValid
bool isFilterValid(struct _packet_info *pinfo)
Checks if the conversation filter is valid for the provided packet information.
Definition conversation_colorize_action.cpp:53
ConversationAction::colorNumber
int colorNumber()
Retrieves the color number associated with this action.
Definition conversation_colorize_action.h:57
ConversationAction::setColorNumber
void setColorNumber(int color_number)
Sets the color number associated with this action.
Definition conversation_colorize_action.h:51
ConversationAction::filter
const QByteArray filter()
Retrieves the filter string as a byte array.
Definition conversation_colorize_action.h:45
ConversationAction::setFieldFilter
void setFieldFilter(const QByteArray field_filter)
Sets the field filter directly.
Definition conversation_colorize_action.cpp:47
ConversationAction::setPacketInfo
void setPacketInfo(struct _packet_info *pinfo)
Sets the packet information used to build the filter.
Definition conversation_colorize_action.cpp:30
ConversationAction::ConversationAction
ConversationAction(QObject *parent, struct conversation_filter_s *conv_filter=NULL)
Constructs a new ConversationAction.
Definition conversation_colorize_action.cpp:20
_packet_info
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
conversation_filter_s
Describes a registered conversation filter that can build a display filter string from a packet.
Definition conversation_filter.h:109