Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / capture_options_dialog.h
blobcc57467e94fd71e2596b4a93ff341b9432bcbc90
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 */
11 #ifndef CAPTURE_OPTIONS_DIALOG_H
12 #define CAPTURE_OPTIONS_DIALOG_H
14 #include <config.h>
16 #ifdef HAVE_LIBPCAP
18 #include <ui/qt/models/interface_tree_model.h>
20 #include "geometry_state_dialog.h"
21 #include <QPushButton>
22 #include <QTreeWidget>
24 typedef struct if_stat_cache_s if_stat_cache_t;
26 namespace Ui {
27 class CaptureOptionsDialog;
30 #include <QStyledItemDelegate>
32 class InterfaceTreeDelegate : public QStyledItemDelegate
34 Q_OBJECT
35 private:
36 QTreeWidget* tree_;
38 public:
39 InterfaceTreeDelegate(QObject *parent = 0);
40 ~InterfaceTreeDelegate();
42 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &idx) const;
43 void setTree(QTreeWidget* tree) { tree_ = tree; }
44 bool eventFilter(QObject *object, QEvent *event);
46 signals:
47 void filterChanged(const QString filter);
49 private slots:
50 void linkTypeChanged(const QString selected_link_type);
51 void snapshotLengthChanged(int value);
52 void bufferSizeChanged(int value);
55 class CaptureOptionsDialog : public GeometryStateDialog
57 Q_OBJECT
59 public:
60 explicit CaptureOptionsDialog(QWidget *parent = 0);
61 ~CaptureOptionsDialog();
63 void updateInterfaces();
65 public slots:
66 void interfaceSelected();
68 protected:
69 virtual void showEvent(QShowEvent *);
71 private slots:
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();
89 void updateStatistics(void);
90 void refreshInterfaceList();
91 void updateLocalInterfaces();
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);
97 void tempDirBrowseButtonClicked();
98 void MBComboBoxIndexChanged(int index);
99 void stopMBComboBoxIndexChanged(int index);
101 signals:
102 void startCapture();
103 void stopCapture();
104 void setSelectedInterfaces();
105 void setFilterValid(bool valid, const QString capture_filter);
106 void interfacesChanged();
107 void ifsChanged();
108 void interfaceListChanged();
109 void captureFilterTextEdited(const QString & text);
110 void showExtcapOptions(QString &device_name, bool startCaptureOnClose);
112 private:
113 Ui::CaptureOptionsDialog *ui;
115 if_stat_cache_t *stat_cache_;
116 QTimer *stat_timer_;
117 InterfaceTreeDelegate interface_item_delegate_;
119 interface_t *getDeviceByName(const QString device_name);
120 bool saveOptionsToPreferences();
121 void updateSelectedFilter();
123 void updateGlobalDeviceSelections();
124 void updateFromGlobalDeviceSelections();
127 #endif /* HAVE_LIBPCAP */
129 #endif // CAPTURE_OPTIONS_DIALOG_H