Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
sequence_dialog.h
Go to the documentation of this file.
1
10#ifndef SEQUENCE_DIALOG_H
11#define SEQUENCE_DIALOG_H
12
13#include <config.h>
14
15#include <epan/cfile.h>
16
17#include "epan/packet.h"
19
20#include <ui/qt/widgets/qcustomplot.h>
21#include "wireshark_dialog.h"
22#include "rtp_stream_dialog.h"
23
24#include <QMenu>
25
26namespace Ui {
27class SequenceDialog;
28}
29
30class SequenceDiagram;
31
36{
37public:
43
48 seq_analysis_info_t * sainfo() { return sainfo_;}
49
53 void ref() { count_++; }
54
58 void unref() { if (--count_ == 0) delete this; }
59private:
64
66 seq_analysis_info_t *sainfo_;
67
69 unsigned int count_;
70};
71
76{
77 Q_OBJECT
78
79public:
87 explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL, bool voipFeatures = false);
88
93
94protected:
100 bool event(QEvent *event);
101
106 void showEvent(QShowEvent *event);
107
112 void resizeEvent(QResizeEvent *event);
113
118 void keyPressEvent(QKeyEvent *event);
119
120signals:
125 void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_infos);
126
131 void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_infos);
132
137 void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
138
143 void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
144
149 void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
150
151private slots:
155 void updateWidgets();
156
161 void hScrollBarChanged(int value);
162
167 void vScrollBarChanged(int value);
168
173 void xAxisChanged(QCPRange range);
174
179 void yAxisChanged(QCPRange range);
180
185 void showContextMenu(const QPoint &pos);
186
191 void diagramClicked(QMouseEvent *event);
192
199 void axisDoubleClicked(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event);
200
205 void mouseReleased(QMouseEvent *event);
206
211 void mouseMoved(QMouseEvent *event);
212
217 void mouseWheeled(QWheelEvent *event);
218
222 void fillDiagram();
223
227 void resetView();
228
232 void exportDiagram();
233
237 void layoutAxisLabels();
238
243 void addressChanged(int index);
244
249 void displayFilterCheckBoxToggled(bool checked);
250
255 void on_buttonBox_clicked(QAbstractButton *button);
256
260 void on_actionGoToPacket_triggered();
261
265 void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
266
270 void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
271
276 void on_flowComboBox_activated(int index);
277
281 void on_actionMoveRight10_triggered();
282
286 void on_actionMoveLeft10_triggered();
287
291 void on_actionMoveUp10_triggered();
292
296 void on_actionMoveDown10_triggered();
297
301 void on_actionMoveRight1_triggered();
302
306 void on_actionMoveLeft1_triggered();
307
311 void on_actionMoveUp1_triggered();
312
316 void on_actionMoveDown1_triggered();
317
321 void on_actionZoomIn_triggered();
322
326 void on_actionZoomOut_triggered();
327
331 void on_actionSelectRtpStreams_triggered();
332
336 void on_actionDeselectRtpStreams_triggered();
337
341 void on_buttonBox_helpRequested();
342
346 void rtpPlayerReplace();
347
351 void rtpPlayerAdd();
352
356 void rtpPlayerRemove();
357
358private:
360 Ui::SequenceDialog *ui;
361
363 SequenceDiagram *seq_diagram_;
364
366 SequenceInfo *info_;
367
369 int num_items_;
370
372 uint32_t packet_num_;
373
375 double one_em_;
376
378 int sequence_w_;
379
381 bool axis_pressed_;
382
384 QPushButton *reset_button_;
385
387 QToolButton *player_button_;
388
390 QPushButton *export_button_;
391
393 QMenu ctx_menu_;
394
396 QCPItemText *key_text_;
397
399 QCPItemText *comment_text_;
400
402 seq_analysis_item_t *current_rtp_sai_selected_; // Used for passing current sai to rtp processing
403
405 seq_analysis_item_t *current_rtp_sai_hovered_; // Used for passing current sai to rtp processing
406
408 QPointer<RtpStreamDialog> rtp_stream_dialog_; // Singleton pattern used
409
411 bool voipFeaturesEnabled;
412
416 void enableVoIPFeatures();
417
422 void zoomXAxis(bool in);
423
429 void panAxes(int x_pixels, int y_pixels);
430
435 void resetAxes(bool keep_lower = false);
436
441 void goToAdjacentPacket(bool next);
442
450 static bool addFlowSequenceItem(const void *key, void *value, void *userdata);
451
456 void processRtpStream(bool select);
457
462 QVector<rtpstream_id_t *>getSelectedRtpIds();
463};
464
465#endif // SEQUENCE_DIALOG_H
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
QCustomPlot plottable that renders a Wireshark sequence diagram, drawing arrows and comments between ...
Definition sequence_diagram.h:57
Dialog for displaying and interacting with a sequence diagram (e.g., VoIP call flows).
Definition sequence_dialog.h:76
~SequenceDialog()
Destroys the SequenceDialog object.
Definition sequence_dialog.cpp:241
void showEvent(QShowEvent *event)
Handles the show event for the dialog.
Definition sequence_dialog.cpp:277
void rtpPlayerDialogAddRtpStreams(QVector< rtpstream_id_t * > stream_ids)
Signal emitted to request adding RTP streams to the player dialog.
void rtpStreamsDialogDeselectRtpStreams(QVector< rtpstream_id_t * > stream_infos)
Signal emitted to request deselecting specific RTP streams in the stream dialog.
bool event(QEvent *event)
Handles generic events for the dialog.
Definition sequence_dialog.cpp:260
void keyPressEvent(QKeyEvent *event)
Handles key press events for navigation and zooming.
Definition sequence_dialog.cpp:289
void rtpPlayerDialogRemoveRtpStreams(QVector< rtpstream_id_t * > stream_ids)
Signal emitted to request removing RTP streams from the player dialog.
void rtpPlayerDialogReplaceRtpStreams(QVector< rtpstream_id_t * > stream_ids)
Signal emitted to request replacing RTP streams in the player dialog.
void rtpStreamsDialogSelectRtpStreams(QVector< rtpstream_id_t * > stream_infos)
Signal emitted to request selecting specific RTP streams in the stream dialog.
void resizeEvent(QResizeEvent *event)
Handles resize events to adjust diagram layout.
Definition sequence_dialog.cpp:282
Reference-counted wrapper for sequence analysis information.
Definition sequence_dialog.h:36
seq_analysis_info_t * sainfo()
Retrieves the sequence analysis info structure.
Definition sequence_dialog.h:48
void ref()
Increments the reference count.
Definition sequence_dialog.h:53
void unref()
Decrements the reference count and deletes the object if it reaches zero.
Definition sequence_dialog.h:58
Base class for Wireshark specific dialogs that require interaction with a CaptureFile.
Definition wireshark_dialog.h:38
Definition sequence_analysis.h:79
Represents a single event or message arrow in a sequence / flow graph analysis.
Definition sequence_analysis.h:52
Definition file-pcapng.h:57