| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet_diagram.h
Go to the documentation of this file.
1
10#ifndef PACKET_DIAGRAM_H
11#define PACKET_DIAGRAM_H
12
13#include <config.h>
14
15#include <epan/proto.h>
16
17#include "cfile.h"
18
19#include <ui/qt/utils/field_information.h>
20
21#include <QGraphicsView>
22
23 class DiagramLayout;
24
25 class PacketDiagram : public QGraphicsView
26{
27 Q_OBJECT
28 public:
29 PacketDiagram(QWidget *parent = nullptr);
30 ~PacketDiagram();
31 void setRootNode(proto_node *root_node);
32 void clear();
33
34signals:
35 void fieldSelected(FieldInformation *);
36
37 public slots:
38 void setCaptureFile(capture_file *cf);
39 void setFont(const QFont &font);
40 void selectedFieldChanged(FieldInformation *finfo);
41 void selectedFrameChanged(QList<int> frames);
42
43 protected:
44 virtual bool event(QEvent *event) override;
45 virtual void contextMenuEvent(QContextMenuEvent *event) override;
46
47 private slots:
48 void connectToMainWindow();
49 void sceneSelectionChanged();
50
51 private:
52 void resetScene(bool reset_root = true);
53 void addDiagram(proto_node *tl_node);
54 void setSelectedField(field_info *fi);
55 QImage exportToImage();
56#if defined(QT_SVG_LIB) && 0
57 QByteArray exportToSvg();
58#endif
59
60 void showFieldsToggled(bool checked);
61 void saveAsTriggered();
62 void copyAsRasterTriggered();
63#if defined(QT_SVG_LIB) && !defined(Q_OS_MAC) && 0
64 void copyAsSvgTriggered();
65#endif
66
67 DiagramLayout *layout_;
68 capture_file *cap_file_;
69 proto_node *root_node_;
70 field_info *selected_field_;
71 int y_pos_;
72};
73
74#endif // PACKET_DIAGRAM_H
cfile.h
DiagramLayout
Definition packet_diagram.cpp:47
FieldInformation
Definition field_information.h:23
PacketDiagram
Definition packet_diagram.h:26
field_information.h
proto.h
_capture_file
Definition cfile.h:67
_proto_node
Definition proto.h:907
field_info
Definition proto.h:816