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 SEQUENCE_DIALOG_H
11 #define SEQUENCE_DIALOG_H
17 #include "epan/packet.h"
18 #include "epan/sequence_analysis.h"
20 #include <ui/qt/widgets/qcustomplot.h>
21 #include "wireshark_dialog.h"
22 #include "rtp_stream_dialog.h"
30 class SequenceDiagram
;
35 SequenceInfo(seq_analysis_info_t
*sainfo
= NULL
);
36 seq_analysis_info_t
* sainfo() { return sainfo_
;}
37 void ref() { count_
++; }
38 void unref() { if (--count_
== 0) delete this; }
41 seq_analysis_info_t
*sainfo_
;
45 class SequenceDialog
: public WiresharkDialog
50 explicit SequenceDialog(QWidget
&parent
, CaptureFile
&cf
, SequenceInfo
*info
= NULL
, bool voipFeatures
= false);
54 bool event(QEvent
*event
);
55 void showEvent(QShowEvent
*event
);
56 void resizeEvent(QResizeEvent
*event
);
57 void keyPressEvent(QKeyEvent
*event
);
60 void rtpStreamsDialogSelectRtpStreams(QVector
<rtpstream_id_t
*> stream_infos
);
61 void rtpStreamsDialogDeselectRtpStreams(QVector
<rtpstream_id_t
*> stream_infos
);
62 void rtpPlayerDialogReplaceRtpStreams(QVector
<rtpstream_id_t
*> stream_ids
);
63 void rtpPlayerDialogAddRtpStreams(QVector
<rtpstream_id_t
*> stream_ids
);
64 void rtpPlayerDialogRemoveRtpStreams(QVector
<rtpstream_id_t
*> stream_ids
);
68 void hScrollBarChanged(int value
);
69 void vScrollBarChanged(int value
);
70 void xAxisChanged(QCPRange range
);
71 void yAxisChanged(QCPRange range
);
72 void showContextMenu(const QPoint
&pos
);
73 void diagramClicked(QMouseEvent
*event
);
74 void axisDoubleClicked(QCPAxis
*axis
, QCPAxis::SelectablePart part
, QMouseEvent
*event
);
75 void mouseReleased(QMouseEvent
*event
);
76 void mouseMoved(QMouseEvent
*event
);
77 void mouseWheeled(QWheelEvent
*event
);
82 void layoutAxisLabels();
84 void addressChanged(int index
);
85 void displayFilterCheckBoxToggled(bool checked
);
87 void on_buttonBox_clicked(QAbstractButton
*button
);
88 void on_actionGoToPacket_triggered();
89 void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
90 void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
91 void on_flowComboBox_activated(int index
);
92 void on_actionMoveRight10_triggered();
93 void on_actionMoveLeft10_triggered();
94 void on_actionMoveUp10_triggered();
95 void on_actionMoveDown10_triggered();
96 void on_actionMoveRight1_triggered();
97 void on_actionMoveLeft1_triggered();
98 void on_actionMoveUp1_triggered();
99 void on_actionMoveDown1_triggered();
100 void on_actionZoomIn_triggered();
101 void on_actionZoomOut_triggered();
102 void on_actionSelectRtpStreams_triggered();
103 void on_actionDeselectRtpStreams_triggered();
104 void on_buttonBox_helpRequested();
106 void rtpPlayerReplace();
108 void rtpPlayerRemove();
111 Ui::SequenceDialog
*ui
;
112 SequenceDiagram
*seq_diagram_
;
115 uint32_t packet_num_
;
119 QPushButton
*reset_button_
;
120 QToolButton
*player_button_
;
121 QPushButton
*export_button_
;
123 QCPItemText
*key_text_
;
124 QCPItemText
*comment_text_
;
125 seq_analysis_item_t
*current_rtp_sai_selected_
; // Used for passing current sai to rtp processing
126 seq_analysis_item_t
*current_rtp_sai_hovered_
; // Used for passing current sai to rtp processing
127 QPointer
<RtpStreamDialog
> rtp_stream_dialog_
; // Singleton pattern used
128 bool voipFeaturesEnabled
;
130 void enableVoIPFeatures();
131 void zoomXAxis(bool in
);
132 void panAxes(int x_pixels
, int y_pixels
);
133 void resetAxes(bool keep_lower
= false);
134 void goToAdjacentPacket(bool next
);
136 static bool addFlowSequenceItem(const void *key
, void *value
, void *userdata
);
138 void processRtpStream(bool select
);
139 QVector
<rtpstream_id_t
*>getSelectedRtpIds();
142 #endif // SEQUENCE_DIALOG_H