#ifndef CTRLNETWORKPANEL_H #define CTRLNETWORKPANEL_H #include #include #include #include "base/qiplineedit.h" #include "base/switchcontrol.h" #include #include #include #include #include struct ApnInfo { QString apn; QString carrier; QString mcc; QString mmsc; QString mmsport; QString mmsproxy; QString mnc; QString password; QString port; QString proxy; QString server; QString type; QString user; }; class CtrlNetworkPanel : public QWidget { Q_OBJECT public: explicit CtrlNetworkPanel(QWidget *parent = nullptr); void getCurrentAPN(QString &); protected: void showEvent(QShowEvent *event) override; void init(); void changeEvent(QEvent *) override; void transUi(); private: QLabel *lbLanCfg; QRadioButton *fdDhcp, *fdSpecifyIp; QGroupBox *gBoxSpecifyIp; QLabel *labelIpAddress; QIPLineEdit *fdIP; QLabel *labelMaskAddress; QIPLineEdit *fdGateWay; QLabel *labelGateway; QIPLineEdit *fdMask; QLabel *labelDnsAddress; QIPLineEdit *fdDns; QPushButton *btnLanSet; QPushButton *btnLanGet; QLabel *label_5; QLabel *lbWifiName; QLabel *lbWifiPassword; QRadioButton *fdIsWifi, *fdIsHotspot; QComboBox *fdWifiName; QLineEdit *fdWifiPassword; QPushButton *btnScan; QPushButton *btnWiFiSet; QPushButton *btnWiFiGet; QLabel *lbHotspotName; QLabel *lbHotspotPassword; QLineEdit *fdHotspotName; QLineEdit *fdHotspotPassword; QFrame *line_3; QLabel *lbCellularConfig; QCheckBox *fdEnableCellular; QPushButton *btnSIMStatusGet; QGroupBox *groupApn; QLabel *lbCheckStatusTip; QLabel *label_2; QComboBox *fdMcc; QLabel *label_3; QComboBox *fdCarrierName; QPushButton *btnAPNCusSet, *btnAPNCusGet; QLabel *label_10; SwitchControl *fdFightModel; QPushButton *btnFlightModelGet; QLabel *lbCus_Name, *lbCus_User, *lbCus_pwd, *lbCus_mmsPort, *lbCus_mmsProxy, *lbCus_port, *lbCus_proxy, *lbCus_server, *lbCus_type; QLineEdit *fdCus_apn, *fdCus_Name, *fdCus_User, *fdCus_pwd, *fdCus_type, *fdCus_server, *fdCus_port, *fdCus_proxy, *fdCus_mmsc, *fdCus_mmsPort, *fdCus_mmsProxy; }; #endif // CTRLNETWORKPANEL_H