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
34{
35 Q_OBJECT
36
37public:
45 static DisStreamDialog *openDisStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
46
52
57 void operator=(const DisStreamDialog &) = delete;
58
59signals:
65 void updateFilter(QString filter, bool force = false);
66
71 void goToPacket(int packet_num);
72
73protected:
80 explicit DisStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
81
86
90 void captureFileClosing() override;
91
95 void captureFileClosed() override;
96
97private:
101 class DisStreamTreeWidgetItem : public QTreeWidgetItem {
102 public:
103 using QTreeWidgetItem::QTreeWidgetItem;
109 bool operator<(const QTreeWidgetItem &other) const override;
110 };
111
113 static DisStreamDialog *pinstance_;
114
116 static std::mutex mutex_;
117
119 QTreeWidget *stream_tree_;
120
122 QDialogButtonBox *button_box_;
123
125 QPushButton *filter_button_;
126
128 QPushButton *play_button_;
129
131 QPushButton *stop_button_;
132
134 QPushButton *analyze_button_;
135
137 bool need_redraw_;
138
140 QObject *packet_list_;
141
142#ifdef QT_MULTIMEDIA_LIB
144 class DisAudioStream *audio_stream_;
145#endif
146
148 disstream_tapinfo_t tapinfo_;
149
154 static void tapReset(disstream_tapinfo_t *tapinfo);
155
160 static void tapDraw(disstream_tapinfo_t *tapinfo);
161
166 disstream_info_t *selectedStream() const;
167
171 void updateStreams();
172
176 void updateWidgets() override;
177
178private slots:
182 void onStreamSelectionChanged();
183
189 void onStreamItemDoubleClicked(QTreeWidgetItem *item, int column);
190
194 void onPrepareFilter();
195
199 void onAnalyzeStream();
200
201#ifdef QT_MULTIMEDIA_LIB
205 void onPlayStream();
206
210 void onStopStream();
211
216 void onPlaybackStateChanged(QAudio::State state _U_);
217#endif
218
223 void onCaptureEvent(CaptureEvent e);
224};
225
226#endif /* DIS_STREAM_DIALOG_H */
Represents an event occurring during a capture or file operation.
Definition capture_event.h:24
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
A dialog for viewing and managing DIS (Distributed Interactive Simulation) streams from a capture fil...
Definition dis_stream_dialog.h:34
void goToPacket(int packet_num)
Signal emitted to navigate the main UI to a specific packet number.
void captureFileClosing() override
Slot triggered when the capture file begins closing.
Definition dis_stream_dialog.cpp:189
void captureFileClosed() override
Slot triggered when the capture file is fully closed.
Definition dis_stream_dialog.cpp:199
void operator=(const DisStreamDialog &)=delete
Deleted assignment operator to enforce singleton pattern.
DisStreamDialog(DisStreamDialog &other)=delete
Deleted copy constructor to enforce singleton pattern.
void updateFilter(QString filter, bool force=false)
Signal emitted to update the application's display filter.
~DisStreamDialog()
Destroys the DisStreamDialog.
Definition dis_stream_dialog.cpp:175
static DisStreamDialog * openDisStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list)
Opens or retrieves the singleton instance of the DisStreamDialog.
Definition dis_stream_dialog.cpp:76
Base class for Wireshark specific dialogs that require interaction with a CaptureFile.
Definition wireshark_dialog.h:38
Aggregated analysis state and statistics for a single DIS stream.
Definition tap-dis-common.h:57
Top-level tap context for DIS stream analysis, holding all discovered streams and tap configuration.
Definition tap-dis-common.h:124