3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef CONVERSATIONCOLORIZEACTION_H
11 #define CONVERSATIONCOLORIZEACTION_H
15 struct conversation_filter_s
;
18 // Actions for "Conversation Filter" and "Colorize with Filter" menu items.
20 class ConversationAction
: public QAction
24 ConversationAction(QObject
*parent
, struct conversation_filter_s
*conv_filter
= NULL
);
26 bool isFilterValid(struct _packet_info
*pinfo
);
28 const QByteArray
filter() { return filter_ba_
; }
30 void setColorNumber(int color_number
) { color_number_
= color_number
; }
31 int colorNumber() { return color_number_
; }
34 // Exactly one of these should be connected.
35 void setPacketInfo(struct _packet_info
*pinfo
);
36 void setFieldFilter(const QByteArray field_filter
);
39 struct conversation_filter_s
*conv_filter_
;
40 QByteArray filter_ba_
;
44 class ColorizeAction
: public QAction
48 ColorizeAction(QObject
*parent
) : QAction(parent
),
52 const QByteArray
filter() { return filter_ba_
; }
54 void setColorNumber(int color_number
) { color_number_
= color_number
; }
55 int colorNumber() { return color_number_
; }
58 void setFieldFilter(const QByteArray field_filter
) { filter_ba_
= field_filter
; }
61 QByteArray filter_ba_
;
65 #endif // CONVERSATIONCOLORIZEACTION_H