qt/LedOK/device/ctrlnetworkpanel.h
2023-05-15 16:06:10 +08:00

82 lines
2.2 KiB
C++

#ifndef CTRLNETWORKPANEL_H
#define CTRLNETWORKPANEL_H
#include "base/switchcontrol.h"
#include <QRadioButton>
#include <QButtonGroup>
#include <QJsonObject>
#include <QLineEdit>
#include <QGroupBox>
#include <QCheckBox>
#include <QComboBox>
#include <QPushButton>
#include <QLabel>
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, *labelMaskAddress, *labelGateway, *labelDnsAddress;
QLineEdit *fdIP, *fdMask, *fdGateWay, *fdDns;
QPushButton *btnLanSet, *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