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 IO_GRAPH_ACTION_H
11 #define IO_GRAPH_ACTION_H
13 #include <ui/qt/utils/field_information.h>
14 #include <ui/io_graph_item.h>
18 class IOGraphAction
: public QAction
22 explicit IOGraphAction(QObject
*parent
, io_graph_item_unit_t unit
= IOG_ITEM_UNIT_PACKETS
, QString field
= QString());
23 explicit IOGraphAction(QObject
*parent
);
25 io_graph_item_unit_t
unit() const { return unit_
; }
27 QString
valueField() const { return field_
; }
29 static const QString
unitName(io_graph_item_unit_t unit
);
31 static QList
<io_graph_item_unit_t
> unitTypes(const FieldInformation::HeaderInfo
& headerinfo
);
32 static QMenu
* createMenu(const FieldInformation::HeaderInfo
& headerinfo
, QWidget
* parent
);
35 void openIOGraphDialog(io_graph_item_unit_t
, QString
);
40 io_graph_item_unit_t unit_
;
47 #endif // IO_GRAPH_ACTION_H