1 /* wireless_frame.h 2 * 3 * Wireshark - Network traffic analyzer 4 * By Gerald Combs <gerald@wireshark.org> 5 * Copyright 1998 Gerald Combs 6 * 7 * SPDX-License-Identifier: GPL-2.0-or-later 8 */ 9 10 #ifndef WIRELESS_FRAME_H 11 #define WIRELESS_FRAME_H 12 13 #include <glib.h> 14 15 #include <QFrame> 16 17 namespace Ui { 18 class WirelessFrame; 19 } 20 21 class WirelessFrame : public QFrame 22 { 23 Q_OBJECT 24 25 public: 26 explicit WirelessFrame(QWidget *parent = 0); 27 ~WirelessFrame(); 28 29 void setCaptureInProgress(bool capture_in_progress); 30 31 signals: 32 void showWirelessPreferences(const QString wlan_module_name); 33 34 protected: 35 void timerEvent(QTimerEvent *event); 36 37 public slots: 38 void handleInterfaceEvent(const char *ifname, int added, int up); 39 40 private: 41 int startTimer(int interval); 42 void getInterfaceInfo(); 43 void setInterfaceInfo(); 44 int getCenterFrequency(int control_frequency, int bandwidth); 45 int getBandwidthFromChanType(int chan_type); 46 void updateInterfaceList(); 47 48 private slots: 49 void updateWidgets(); 50 51 void on_helperToolButton_clicked(); 52 void on_prefsToolButton_clicked(); 53 void on_interfaceComboBox_activated(int); 54 void on_channelComboBox_activated(int); 55 void on_channelTypeComboBox_activated(int); 56 void on_fcsComboBox_activated(int); 57 58 private: 59 Ui::WirelessFrame *ui; 60 GArray *interfaces_; 61 bool capture_in_progress_; 62 int iface_timer_id_; 63 }; 64 65 #endif // WIRELESS_FRAME_H 66