Wireshark 4.5.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
20
21#include <QGraphicsView>
22
23class DiagramLayout;
24
25class PacketDiagram : public QGraphicsView
26{
27 Q_OBJECT
28public:
29 PacketDiagram(QWidget *parent = nullptr);
31 void setRootNode(proto_node *root_node);
32 void clear();
33
34signals:
35 void fieldSelected(FieldInformation *);
36
37public 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
43protected:
44 virtual bool event(QEvent *event) override;
45 virtual void contextMenuEvent(QContextMenuEvent *event) override;
46
47private slots:
48 void connectToMainWindow();
49 void sceneSelectionChanged();
50
51private:
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
Definition packet_diagram.cpp:47
Definition field_information.h:23
Definition packet_diagram.h:26
Definition cfile.h:67
Definition proto.h:901
Definition proto.h:813