code_production/app/HGProductionTool/dialog_inputserialnum.h

99 lines
2.1 KiB
C
Raw Normal View History

2022-12-16 11:01:30 +00:00
#ifndef DIALOG_INPUTSERIALNUM_H
#define DIALOG_INPUTSERIALNUM_H
#include <QDialog>
2023-01-04 12:48:53 +00:00
#include "sane/sane_ex.h"
2023-08-31 02:50:43 +00:00
//#include "HGPdtToolDb.h"
#include "hgscanner.h"
#include "mainwindow.h"
2022-12-16 11:01:30 +00:00
namespace Ui {
class Dialog_InputSerialNum;
}
class Dialog_InputSerialNum : public QDialog
{
Q_OBJECT
public:
explicit Dialog_InputSerialNum(class MainWindow *mainWnd, Dialog_logIn::LogInType logInType, const QString &devName, const QString &profileName,
const QString &accountName, SANE_Handle handle, const QString &serialNum, const QString &devType);
2022-12-16 11:01:30 +00:00
~Dialog_InputSerialNum();
QString GetSn();
QString GetDevType();
2023-01-06 05:39:49 +00:00
void Invalid(const QString &devName);
void setSpeedMode();
void setSleepTime();
void setVidPid();
2023-11-02 06:48:51 +00:00
void setDevceModel();
void rebootDevice();
int getSpeedMode();
int getSleepTime();
int getDevVid();
int getDevPid();
2023-11-02 06:48:51 +00:00
QString getDeviceModel();
private:
void updateTargetCfg();
void updateCurDeviceCfg();
QString getLogPath();
void writeTestLog(QString logContent);
void addInteractInfo(QString info, bool isNormal);
void updatePassStatus(bool pass);
signals:
void testResult();
private slots:
void on_testResult();
private:
union VIDPID
{
struct
{
unsigned short VID;
unsigned short PID;
};
unsigned int Value;
};
2022-12-16 11:01:30 +00:00
private slots:
2023-01-06 05:39:49 +00:00
void on_pbtn_setSn_clicked();
void on_pbtn_checkConfig_clicked();
void on_pbtn_enterTest_clicked();
void on_pbtn_setConfig_clicked();
void on_pbtn_reboot_clicked();
2023-09-12 03:02:45 +00:00
void on_pbtn_slectLogPath_clicked();
2022-12-16 11:01:30 +00:00
private:
Ui::Dialog_InputSerialNum *ui;
class MainWindow *m_mainWnd;
Dialog_logIn::LogInType m_logInType;
2023-01-06 05:39:49 +00:00
SANE_Handle m_handle;
bool m_valid;
QString m_profileName;
QString m_accountName;
2022-12-16 11:01:30 +00:00
QString m_serialNum;
QString m_devType;
2023-01-06 05:39:49 +00:00
QString m_devName;
2023-08-31 02:50:43 +00:00
//HGPdtToolDbUserMgr m_pdtToolDbuserMgr;
hgscanner *m_hg;
int m_curIndex;
int m_originVid;
int m_originPid;
2022-12-16 11:01:30 +00:00
};
#endif // DIALOG_INPUTSERIALNUM_H