Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / sequence_dialog.h
blob6bbc3d00eba9800ba8de2a6d28257badf11854d5
1 /** @file
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
8 */
10 #ifndef SEQUENCE_DIALOG_H
11 #define SEQUENCE_DIALOG_H
13 #include <config.h>
15 #include "cfile.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"
24 #include <QMenu>
26 namespace Ui {
27 class SequenceDialog;
30 class SequenceDiagram;
32 class SequenceInfo
34 public:
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; }
39 private:
40 ~SequenceInfo();
41 seq_analysis_info_t *sainfo_;
42 unsigned int count_;
45 class SequenceDialog : public WiresharkDialog
47 Q_OBJECT
49 public:
50 explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL, bool voipFeatures = false);
51 ~SequenceDialog();
53 protected:
54 bool event(QEvent *event);
55 void showEvent(QShowEvent *event);
56 void resizeEvent(QResizeEvent *event);
57 void keyPressEvent(QKeyEvent *event);
59 signals:
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);
66 private slots:
67 void updateWidgets();
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);
79 void fillDiagram();
80 void resetView();
81 void exportDiagram();
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();
107 void rtpPlayerAdd();
108 void rtpPlayerRemove();
110 private:
111 Ui::SequenceDialog *ui;
112 SequenceDiagram *seq_diagram_;
113 SequenceInfo *info_;
114 int num_items_;
115 uint32_t packet_num_;
116 double one_em_;
117 int sequence_w_;
118 bool axis_pressed_;
119 QPushButton *reset_button_;
120 QToolButton *player_button_;
121 QPushButton *export_button_;
122 QMenu ctx_menu_;
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