Wireshark  4.3.0
The Wireshark network protocol analyzer
extcap_options_dialog.h
Go to the documentation of this file.
1 
11 #ifndef EXTCAP_OPTIONS_DIALOG_H
12 #define EXTCAP_OPTIONS_DIALOG_H
13 
14 #include <config.h>
15 
16 #include <QWidget>
17 #include <QDialog>
18 #include <QPushButton>
19 #include <QList>
20 
21 #include "ui/qt/extcap_argument.h"
22 
23 #include <extcap.h>
24 #include <extcap_parser.h>
25 
26 namespace Ui {
28 }
29 
30 typedef QList<ExtcapArgument *> ExtcapArgumentList;
31 
32 class ExtcapOptionsDialog : public QDialog
33 {
34  Q_OBJECT
35 
36 public:
38  static ExtcapOptionsDialog * createForDevice(QString &device_name, bool startCaptureOnClose, QWidget *parent = 0);
39 
40  ExtcapValueList loadValuesFor(int argNum, QString call, QString parent = "");
41 
42 private Q_SLOTS:
43  void on_buttonBox_accepted();
44  void on_buttonBox_rejected();
45  void on_buttonBox_clicked(QAbstractButton *button);
46  void on_buttonBox_helpRequested();
47  void updateWidgets();
48  void anyValueChanged();
49 
50 private:
51  explicit ExtcapOptionsDialog(bool startCaptureOnClose, QWidget *parent = 0);
52 
53  Ui::ExtcapOptionsDialog *ui;
54  QString device_name;
55  guint device_idx;
56  QIcon defaultValueIcon_;
57 
58  ExtcapArgumentList extcapArguments;
59 
60  void loadArguments();
61 
62  bool saveOptionToCaptureInfo();
63  GHashTable * getArgumentSettings(bool useCallsAsKey = false, bool includeEmptyValues = true);
64  void storeValues();
65  void resetValues();
66 
67 };
68 
69 #endif // EXTCAP_OPTIONS_DIALOG_H
Definition: extcap_options_dialog.h:33