Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
interface_toolbar.h
Go to the documentation of this file.
1
10#ifndef INTERFACE_TOOLBAR_H
11#define INTERFACE_TOOLBAR_H
12
13#include "ui/iface_toolbar.h"
14#include "funnel_text_dialog.h"
16
17#include <QFrame>
18#include <QList>
19#include <QMap>
20#include <QString>
21
22
23namespace Ui {
25}
26
28{
29 QThread *reader_thread;
30 int out_fd;
31 QMap<int, QByteArray> value;
32 QMap<int, bool> value_changed;
33 QMap<int, QList<QByteArray> > list;
34 QMap<int, FunnelTextDialog *> log_dialog;
35 QMap<int, QString> log_text;
36 QMap<int, bool> widget_disabled;
37};
38
39class InterfaceToolbar : public QFrame
40{
41 Q_OBJECT
42
43public:
44 explicit InterfaceToolbar(QWidget *parent = 0, const iface_toolbar *toolbar = NULL);
46
47 void startCapture(GArray *ifaces);
48 void stopCapture();
49 bool hasInterface(QString ifname);
50
51public slots:
52 void interfaceListChanged();
53 void controlReceived(QString ifname, int num, int command, QByteArray message);
54
55signals:
56 void closeReader();
57
58private slots:
59 void startReaderThread(QString ifname, void *control_in);
60 void updateWidgets();
61
62 void onControlButtonClicked();
63 void onLogButtonClicked();
64 void onHelpButtonClicked();
65 void onRestoreButtonClicked();
66 void onCheckBoxChanged(int state);
67 void onComboBoxChanged(int idx);
68 void onLineEditChanged();
69
70 void closeLog();
71
72 void on_interfacesComboBox_currentTextChanged(const QString &ifname);
73
74private:
75 void initializeControls(const iface_toolbar *toolbar);
76 void setDefaultValue(int num, const QByteArray &value);
77 void sendChangedValues(QString ifname);
78 QWidget *createCheckbox(iface_toolbar_control *control);
79 QWidget *createButton(iface_toolbar_control *control);
80 QWidget *createSelector(iface_toolbar_control *control);
81 QWidget *createString(iface_toolbar_control *control);
82 void controlSend(QString ifname, int num, int type, const QByteArray &payload);
83 void setWidgetValue(QWidget *widget, int type, QByteArray payload);
84 void setInterfaceValue(QString ifname, QWidget *widget, int num, int type, QByteArray payload);
85
86 Ui::InterfaceToolbar *ui;
87 QMap<QString, struct interface_values> interface_;
88 QMap<int, QByteArray> default_value_;
89 QMap<int, QList<QByteArray> > default_list_;
90 QMap<int, QWidget *> control_widget_;
91 QMap<int, QWidget *> label_widget_;
92 QString help_link_;
93 bool use_spacer_;
94};
95
96#endif // INTERFACE_TOOLBAR_H
Definition interface_toolbar.h:40
Definition iface_toolbar.h:44
Definition iface_toolbar.h:60
Definition interface_toolbar.h:28