Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
dis_stream_dialog.h
Go to the documentation of this file.
1
10#ifndef DIS_STREAM_DIALOG_H
11#define DIS_STREAM_DIALOG_H
12
13#include <mutex>
14
15#include <QDialogButtonBox>
16#include <QLabel>
17#include <QPushButton>
18#include <QTreeWidget>
19#ifdef QT_MULTIMEDIA_LIB
20#include <QAudio>
21#endif
22
23#include "capture_file.h"
24#include "wireshark_dialog.h"
25
26#include "ui/tap-dis-common.h"
27
29
31{
32 Q_OBJECT
33
34public:
35 static DisStreamDialog *openDisStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
36
37 DisStreamDialog(DisStreamDialog &other) = delete;
38 void operator=(const DisStreamDialog &) = delete;
39
40signals:
41 void updateFilter(QString filter, bool force = false);
42 void goToPacket(int packet_num);
43
44protected:
45 explicit DisStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
47
48 void captureFileClosing() override;
49 void captureFileClosed() override;
50
51private:
52 class DisStreamTreeWidgetItem : public QTreeWidgetItem {
53 public:
54 using QTreeWidgetItem::QTreeWidgetItem;
55 bool operator<(const QTreeWidgetItem &other) const override;
56 };
57
58 static DisStreamDialog *pinstance_;
59 static std::mutex mutex_;
60
61 QTreeWidget *stream_tree_;
62 QDialogButtonBox *button_box_;
63 QPushButton *filter_button_;
64 QPushButton *play_button_;
65 QPushButton *stop_button_;
66 QPushButton *analyze_button_;
67 bool need_redraw_;
68 QObject *packet_list_;
69
70#ifdef QT_MULTIMEDIA_LIB
71 class DisAudioStream *audio_stream_;
72#endif
73
74 disstream_tapinfo_t tapinfo_;
75
76 static void tapReset(disstream_tapinfo_t *tapinfo);
77 static void tapDraw(disstream_tapinfo_t *tapinfo);
78
79 disstream_info_t *selectedStream() const;
80 void updateStreams();
81 void updateWidgets() override;
82
83private slots:
84 void onStreamSelectionChanged();
85 void onStreamItemDoubleClicked(QTreeWidgetItem *item, int column);
86 void onPrepareFilter();
87 void onAnalyzeStream();
88#ifdef QT_MULTIMEDIA_LIB
89 void onPlayStream();
90 void onStopStream();
91 void onPlaybackStateChanged(QAudio::State state _U_);
92#endif
93 void onCaptureEvent(CaptureEvent e);
94};
95
96#endif /* DIS_STREAM_DIALOG_H */
Definition capture_event.h:21
Definition capture_file.h:21
Definition dis_stream_dialog.h:31
void captureFileClosing() override
Called when the capture file is about to close. This can be used to disconnect taps and similar actio...
Definition dis_stream_dialog.cpp:189
void captureFileClosed() override
Called when the capture file was closed. This can be used to enable or disable widgets according to t...
Definition dis_stream_dialog.cpp:199
Definition wireshark_dialog.h:35
Definition tap-dis-common.h:46
Definition tap-dis-common.h:100