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 PROTOCOL_HIERARCHY_DIALOG_H
11 #define PROTOCOL_HIERARCHY_DIALOG_H
16 #include "filter_action.h"
17 #include <ui/qt/models/percent_bar_delegate.h>
18 #include "wireshark_dialog.h"
21 class QTreeWidgetItem
;
24 class ProtocolHierarchyDialog
;
27 class ProtocolHierarchyDialog
: public WiresharkDialog
32 explicit ProtocolHierarchyDialog(QWidget
&parent
, CaptureFile
&cf
);
33 ~ProtocolHierarchyDialog();
36 void filterAction(QString filter
, FilterAction::Action action
, FilterAction::ActionType type
);
39 void showProtoHierMenu(QPoint pos
);
40 void filterActionTriggered();
41 void on_actionCopyAsCsv_triggered();
42 void on_actionCopyAsYaml_triggered();
43 void on_actionCopyProtoList_triggered();
44 void on_actionDisableProtos_triggered();
45 void on_actionRevertProtos_triggered();
46 void on_buttonBox_helpRequested();
49 Ui::ProtocolHierarchyDialog
*ui
;
50 QAction
*proto_disable_
;
51 QAction
*proto_revert_
;
53 PercentBarDelegate percent_bar_delegate_
;
54 QString display_filter_
;
55 QSet
<QString
> used_protos_
;
57 // Callback for g_node_children_foreach
58 static void addTreeNode(GNode
*node
, void *data
);
60 QList
<QVariant
> protoHierRowData(QTreeWidgetItem
*item
) const;
63 #endif // PROTOCOL_HIERARCHY_DIALOG_H