update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / qt / conversation_colorize_action.h
blob47f9ea508f5d91b3dedeec70b63258679a53f4b5
1 /** @file
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
8 */
10 #ifndef CONVERSATIONCOLORIZEACTION_H
11 #define CONVERSATIONCOLORIZEACTION_H
13 #include <QAction>
15 struct conversation_filter_s;
16 struct _packet_info;
18 // Actions for "Conversation Filter" and "Colorize with Filter" menu items.
20 class ConversationAction : public QAction
22 Q_OBJECT
23 public:
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_; }
33 public slots:
34 // Exactly one of these should be connected.
35 void setPacketInfo(struct _packet_info *pinfo);
36 void setFieldFilter(const QByteArray field_filter);
38 private:
39 struct conversation_filter_s *conv_filter_;
40 QByteArray filter_ba_;
41 int color_number_;
44 class ColorizeAction : public QAction
46 Q_OBJECT
47 public:
48 ColorizeAction(QObject *parent) : QAction(parent),
49 color_number_(-1)
52 const QByteArray filter() { return filter_ba_; }
54 void setColorNumber(int color_number) { color_number_ = color_number; }
55 int colorNumber() { return color_number_; }
57 public slots:
58 void setFieldFilter(const QByteArray field_filter) { filter_ba_ = field_filter; }
60 private:
61 QByteArray filter_ba_;
62 int color_number_;
65 #endif // CONVERSATIONCOLORIZEACTION_H