qt/LedOK/mainwindow.h

58 lines
1.3 KiB
C
Raw Normal View History

2022-01-04 18:11:48 +08:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
2022-08-25 18:37:24 +08:00
#include "base/loqtitlebar.h"
#include "basewin.h"
#include "devicepanel.h"
2023-05-15 16:06:10 +08:00
#include "globaldefine.h"
2022-01-04 18:11:48 +08:00
#include "mguangyingpinwidget.h"
2022-08-25 18:37:24 +08:00
#include "progpanel.h"
#include <QTranslator>
2023-04-18 14:14:46 +08:00
#include <QActionGroup>
2024-02-21 18:08:50 +08:00
#include <QJsonObject>
2022-01-04 18:11:48 +08:00
2022-08-25 18:37:24 +08:00
class MainWindow : public BaseWin {
2022-01-04 18:11:48 +08:00
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
2022-08-25 18:37:24 +08:00
protected:
void changeEvent(QEvent *) override;
void transUi();
2022-01-04 18:11:48 +08:00
private:
2023-05-18 18:24:40 +08:00
QJsonObject updates;
2022-08-25 18:37:24 +08:00
QTranslator translator;
LoQTitleBar *m_wTitle;
QActionGroup *langGrp;
QAction *act_lang;
2023-04-18 14:14:46 +08:00
QAction *act_help, *actInfo;
2022-08-25 18:37:24 +08:00
QAction *act_update;
2023-08-01 11:42:41 +08:00
QAction *actFirmware;
QAction *actPreferences;
2022-08-25 18:37:24 +08:00
QAction *act_about;
QPushButton *bn_Setting;
QButtonGroup *mBtnGrp;
2023-08-01 11:42:41 +08:00
QWidget *wgts[MainPage_End]{0};
QPushButton *fdDetectCard{0};
DevicePanel *mDevicePanel{0};
ProgPanel *mProgPanel{0};
mGuangYingPinWidget *m_wGuangYingPinWidget{0};
2023-05-18 18:24:40 +08:00
bool hasNewVer{false};
2022-01-04 18:11:48 +08:00
};
2023-05-19 18:50:21 +08:00
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];
};
2022-01-04 18:11:48 +08:00
#endif // MAINWINDOW_H