qt/LedOK/mainwindow.h
2023-09-19 11:49:20 +08:00

57 lines
1.3 KiB
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "base/loqtitlebar.h"
#include "basewin.h"
#include "devicepanel.h"
#include "globaldefine.h"
#include "mguangyingpinwidget.h"
#include "progpanel.h"
#include <QTranslator>
#include <QActionGroup>
class MainWindow : public BaseWin {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
protected:
void changeEvent(QEvent *) override;
void transUi();
private:
QJsonObject updates;
QTranslator translator;
LoQTitleBar *m_wTitle;
QActionGroup *langGrp;
QAction *act_lang;
QAction *act_help, *actInfo;
QAction *act_update;
QAction *actFirmware;
QAction *actPreferences;
QAction *act_about;
QPushButton *bn_Setting;
QButtonGroup *mBtnGrp;
QWidget *wgts[MainPage_End]{0};
QPushButton *fdDetectCard{0};
DevicePanel *mDevicePanel{0};
ProgPanel *mProgPanel{0};
mGuangYingPinWidget *m_wGuangYingPinWidget{0};
bool hasNewVer{false};
};
struct RESTORE_IP {
char cNewIp[20];
char cMask[20];
char cGateway[20];
char cDns[20];
};
struct STREAM_PACKET {
unsigned char SyncHead[3];
unsigned char ucCommType;
char ucSerialCode[20];
unsigned int iLength;
char pDataBuffer[2049];
};
#endif // MAINWINDOW_H