Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
capture_options_dialog.h
Go to the documentation of this file.
1
9
10
11#ifndef CAPTURE_OPTIONS_DIALOG_H
12#define CAPTURE_OPTIONS_DIALOG_H
13
14#include <config.h>
15
16#ifdef HAVE_LIBPCAP
17
19
21#include <QPushButton>
22#include <QTreeWidget>
23
24namespace Ui {
25class CaptureOptionsDialog;
26}
27
28#include <QStyledItemDelegate>
29
30class InterfaceTreeDelegate : public QStyledItemDelegate
31{
32 Q_OBJECT
33private:
34 QTreeWidget* tree_;
35
36public:
37 InterfaceTreeDelegate(QObject *parent = 0);
38 ~InterfaceTreeDelegate();
39
40 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &idx) const override;
41 void setTree(QTreeWidget* tree) { tree_ = tree; }
42 bool eventFilter(QObject *object, QEvent *event) override;
43
44signals:
45 void filterChanged(const QString filter);
46
47private slots:
48 void linkTypeChanged(const QString selected_link_type);
49 void snapshotLengthChanged(int value);
50 void bufferSizeChanged(int value);
51};
52
53class CaptureOptionsDialog : public GeometryStateDialog
54{
55 Q_OBJECT
56
57public:
58 explicit CaptureOptionsDialog(QWidget *parent = 0);
59 ~CaptureOptionsDialog();
60
61 void updateInterfaces(capture_options* capture_opts);
62
63public slots:
64 void interfaceSelected();
65
66protected:
67 virtual void showEvent(QShowEvent *) override;
68
69private slots:
71 void connectInterfaceListManager();
72 void on_capturePromModeCheckBox_toggled(bool checked);
73 void on_captureMonitorModeCheckBox_toggled(bool checked);
74 void on_gbStopCaptureAuto_toggled(bool checked);
75 void on_cbUpdatePacketsRT_toggled(bool checked);
76 void on_cbAutoScroll_toggled(bool checked);
77 void on_gbNewFileAuto_toggled(bool checked);
78 void on_cbExtraCaptureInfo_toggled(bool checked);
79 void on_cbResolveMacAddresses_toggled(bool checked);
80 void on_compileBPF_clicked();
81 void on_manageButton_clicked();
82 void on_cbResolveNetworkNames_toggled(bool checked);
83 void on_cbResolveTransportNames_toggled(bool checked);
84 void on_buttonBox_accepted();
85 void on_buttonBox_rejected();
86 void on_buttonBox_helpRequested();
87 void filterEdited();
88 void updateWidgets();
90 void redrawStatistics();
91 void refreshInterfaceList();
92 void browseButtonClicked();
93 void interfaceItemChanged(QTreeWidgetItem *item, int column);
94 void itemClicked(QTreeWidgetItem *item, int column);
95 void itemDoubleClicked(QTreeWidgetItem *item, int column);
96 void changeEvent(QEvent* event) override;
97 void tempDirBrowseButtonClicked();
98 void MBComboBoxIndexChanged(int index);
99 void stopMBComboBoxIndexChanged(int index);
100
101signals:
102 void startCapture();
103 void stopCapture();
104 void setSelectedInterfaces();
105 void setFilterValid(bool valid, const QString capture_filter);
106 void interfacesChanged();
107 void captureFilterTextEdited(const QString & text);
108 void showExtcapOptions(QString &device_name, bool startCaptureOnClose);
109
110private:
111 Ui::CaptureOptionsDialog *ui;
112
113 InterfaceTreeDelegate interface_item_delegate_;
114
115 interface_t *getDeviceByName(const QString device_name);
116 bool saveOptionsToPreferences(capture_options* capture_opts);
117 void updateSelectedFilter();
118
119 void updateGlobalDeviceSelections();
120 void updateFromGlobalDeviceSelections();
121};
122
123#endif /* HAVE_LIBPCAP */
124
125#endif // CAPTURE_OPTIONS_DIALOG_H
struct capture_options_tag capture_options
struct interface_tag interface_t
Represents a network interface and its full capture configuration as shown in the UI.
A dialog that remembers its geometry and splitter state.
Definition geometry_state_dialog.h:20