qt/LedOK/wDevicesManager/controlnetconfigwidget.h

106 lines
2.7 KiB
C
Raw Normal View History

2022-01-04 18:11:48 +08:00
#ifndef CONTROLNETCONFIGWIDGET_H
#define CONTROLNETCONFIGWIDGET_H
#include <QWidget>
#include <wDevicesManager/ledcard.h>
#include <communication/hpptclient.h>
#include <LoUIClass/loemptydialog.h>
#include <QButtonGroup>
#include <QJsonObject>
namespace Ui {
class ControlNetConfigWidget;
}
typedef struct wifiInfo{
QString ssid;
int signal;
QString encryptionMethod;
}ST_WIFiINFO;
typedef 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;
}ST_APNINFO;
class ControlNetConfigWidget : public QWidget
{
Q_OBJECT
public:
explicit ControlNetConfigWidget(QWidget *parent = nullptr,QList<LedCard *> *m_pLedlist=nullptr);
~ControlNetConfigWidget();
protected slots:
void onSetWireNetwork();
void onReadbackWireNetwork();
void onSetWiFiModel();
void onReadbackWiFiModel();
void onSetAp();
void OnDhcpOrSpecifyIp(int iIndex);
void OnWiFiOpenChanged(bool b);
void OnScanWifi();
void refreshLable();
void onSet4GInfo();
void OnSetYuanHengApn();
void onReadback4G();
void onReadbackFlightModel();
void onGetMcc();
void onGet4GStatus();
void SetMcc(QString strMcc);
void onFightModelChecked(bool b);
private:
Ui::ControlNetConfigWidget *ui;
QButtonGroup *m_buttonGroup;
//类似的控制操作信号和槽函数和变量定义
signals:
void sigSend(QJsonObject &,QString);
void sigGetDhcpOrSpecifyIp(int);
protected slots:
void DeletePostingDlg();
void OnProHttpResponse(QString url, QString postMD5, QByteArray data);
void OnProHttpResponseAll(QString url, QString postMD5, QByteArray data);
void onSelectedDeviceList(QList<LedCard*> *);
void onReadbackAllThisPage();
void OnControlTypeSwitchIndexChanged(int index);
void OnComboMccChanged(int);
void OnComboCarrierChanged(int index);
void OnCustom4G(bool b);
void OnOpne4G(bool b);
private slots:
void on_groupBox_3_clicked(bool checked);
void on_groupBox_4_clicked(bool checked);
private:
QList<LedCard *> *m_pLedlist=nullptr;
LedCard *m_pLedCard = nullptr;
LedCard *m_oldLedlist = nullptr;
HpptClient *pHpptClient = nullptr;
HpptClient *pHpptClientAll = nullptr;
QString m_strUrl="";
LoEmptyDialog * m_PostingDlg=nullptr;
QTimer *m_pGetAskTimer=nullptr;
bool m_bSelected=false;
QList<QJsonObject> m_ApnInfoiList;
QList<QJsonObject> m_MccCarrierInfoiList;
QJsonObject m_4gObj;
QString m_mcc="";
bool iEnableFlag=true;
int m_buttonFlagClick=0;
// void initTimezone();
};
#endif // CONTROLNETCONFIGWIDGET_H