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 updateLocalInterfaces();
93 void browseButtonClicked();
94 void interfaceItemChanged(QTreeWidgetItem *item, int column);
95 void itemClicked(QTreeWidgetItem *item, int column);
96 void itemDoubleClicked(QTreeWidgetItem *item, int column);
97 void changeEvent(QEvent* event) override;
98 void tempDirBrowseButtonClicked();
99 void MBComboBoxIndexChanged(int index);
100 void stopMBComboBoxIndexChanged(int index);
101
102signals:
103 void startCapture();
104 void stopCapture();
105 void setSelectedInterfaces();
106 void setFilterValid(bool valid, const QString capture_filter);
107 void interfacesChanged();
108 void ifsChanged();
109 void interfaceListChanged();
110 void captureFilterTextEdited(const QString & text);
111 void showExtcapOptions(QString &device_name, bool startCaptureOnClose);
112
113private:
114 Ui::CaptureOptionsDialog *ui;
115
116 InterfaceTreeDelegate interface_item_delegate_;
117
118 interface_t *getDeviceByName(const QString device_name);
119 bool saveOptionsToPreferences(capture_options* capture_opts);
120 void updateSelectedFilter();
121
122 void updateGlobalDeviceSelections();
123 void updateFromGlobalDeviceSelections();
124};
125
126#endif /* HAVE_LIBPCAP */
127
128#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