Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
sequence_dialog.h
1 /* sequence_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef SEQUENCE_DIALOG_H
11 #define SEQUENCE_DIALOG_H
12 
13 #include <config.h>
14 
15 #include <glib.h>
16 
17 #include "cfile.h"
18 
19 #include "epan/packet.h"
20 #include "epan/sequence_analysis.h"
21 
23 #include "wireshark_dialog.h"
24 
25 #include <QMenu>
26 
27 namespace Ui {
28 class SequenceDialog;
29 }
30 
31 class SequenceDiagram;
32 
34 {
35 public:
36  SequenceInfo(seq_analysis_info_t *sainfo = NULL);
37  seq_analysis_info_t * sainfo() { return sainfo_;}
38  void ref() { count_++; }
39  void unref() { if (--count_ == 0) delete this; }
40 private:
41  ~SequenceInfo();
42  seq_analysis_info_t *sainfo_;
43  unsigned int count_;
44 };
45 
47 {
48  Q_OBJECT
49 
50 public:
51  explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL);
52  ~SequenceDialog();
53 
54 protected:
55  void showEvent(QShowEvent *event);
56  void resizeEvent(QResizeEvent *event);
57  void keyPressEvent(QKeyEvent *event);
58 
59 private slots:
60  void updateWidgets();
61  void hScrollBarChanged(int value);
62  void vScrollBarChanged(int value);
63  void xAxisChanged(QCPRange range);
64  void yAxisChanged(QCPRange range);
65  void diagramClicked(QMouseEvent *event);
66  void mouseMoved(QMouseEvent *event);
67  void mouseWheeled(QWheelEvent *event);
68 
69  void fillDiagram();
70 
71  void on_buttonBox_accepted();
72  void on_resetButton_clicked();
73  void on_actionGoToPacket_triggered();
74  void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
75  void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
76  void on_displayFilterCheckBox_toggled(bool checked);
77  void on_flowComboBox_activated(int index);
78  void on_addressComboBox_activated(int index);
79  void on_actionReset_triggered();
80  void on_actionMoveRight10_triggered();
81  void on_actionMoveLeft10_triggered();
82  void on_actionMoveUp10_triggered();
83  void on_actionMoveDown10_triggered();
84  void on_actionMoveRight1_triggered();
85  void on_actionMoveLeft1_triggered();
86  void on_actionMoveUp1_triggered();
87  void on_actionMoveDown1_triggered();
88  void on_actionZoomIn_triggered();
89  void on_actionZoomOut_triggered();
90 
91 private:
93  SequenceDiagram *seq_diagram_;
94  SequenceInfo *info_;
95  int num_items_;
96  guint32 packet_num_;
97  double one_em_;
98  int sequence_w_;
99  QMenu ctx_menu_;
100  QCPItemText *key_text_;
101  QCPItemText *comment_text_;
102 
103  void zoomXAxis(bool in);
104  void panAxes(int x_pixels, int y_pixels);
105  void resetAxes(bool keep_lower = false);
106  void goToAdjacentPacket(bool next);
107 
108  static gboolean addFlowSequenceItem(const void *key, void *value, void *userdata);
109 };
110 
111 #endif // SEQUENCE_DIALOG_H
112 
113 /*
114  * Editor modelines
115  *
116  * Local Variables:
117  * c-basic-offset: 4
118  * tab-width: 8
119  * indent-tabs-mode: nil
120  * End:
121  *
122  * ex: set shiftwidth=4 tabstop=8 expandtab:
123  * :indentSize=4:tabSize=8:noTabs=true:
124  */
Definition: sequence_dialog.h:46
Definition: ui_about_dialog.h:291
Definition: file-pcapng.c:177
Definition: sequence_analysis.h:58
Definition: ui_sequence_dialog.h:358
Definition: sequence_diagram.h:38
A text label.
Definition: qcustomplot.h:3423
Definition: wireshark_dialog.h:32
Represents the range an axis is encompassing.
Definition: qcustomplot.h:478
Definition: capture_file.h:22
Definition: sequence_dialog.h:33