2023-04-18 14:14:46 +08:00
|
|
|
#ifndef CTRLNETWORKPANEL_H
|
|
|
|
#define CTRLNETWORKPANEL_H
|
|
|
|
|
|
|
|
#include "base/switchcontrol.h"
|
2023-04-19 14:42:06 +08:00
|
|
|
#include <QRadioButton>
|
2023-04-18 14:14:46 +08:00
|
|
|
#include <QButtonGroup>
|
|
|
|
#include <QJsonObject>
|
2023-04-19 14:42:06 +08:00
|
|
|
#include <QLineEdit>
|
2023-04-18 14:14:46 +08:00
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QCheckBox>
|
2023-04-21 11:06:47 +08:00
|
|
|
#include <QComboBox>
|
2023-05-15 16:06:10 +08:00
|
|
|
#include <QPushButton>
|
|
|
|
#include <QLabel>
|
2023-04-18 14:14:46 +08:00
|
|
|
|
|
|
|
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;
|
2023-04-19 14:42:06 +08:00
|
|
|
QLabel *labelIpAddress, *labelMaskAddress, *labelGateway, *labelDnsAddress;
|
|
|
|
QLineEdit *fdIP, *fdMask, *fdGateWay, *fdDns;
|
|
|
|
QPushButton *btnLanSet, *btnLanGet;
|
2023-04-18 14:14:46 +08:00
|
|
|
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
|