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"
|
2023-01-06 07:17:48 +00:00
|
|
|
#include "hgscanner.h"
|
2023-09-07 08:45:32 +00:00
|
|
|
#include "mainwindow.h"
|
2022-12-16 11:01:30 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class Dialog_InputSerialNum;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Dialog_InputSerialNum : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-09-07 08:45:32 +00:00
|
|
|
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);
|
2023-09-07 08:45:32 +00:00
|
|
|
|
|
|
|
void setSpeedMode();
|
|
|
|
void setSleepTime();
|
|
|
|
void setVidPid();
|
2023-11-02 06:48:51 +00:00
|
|
|
void setDevceModel();
|
2023-09-07 08:45:32 +00:00
|
|
|
void rebootDevice();
|
|
|
|
|
|
|
|
int getSpeedMode();
|
|
|
|
int getSleepTime();
|
|
|
|
int getDevVid();
|
|
|
|
int getDevPid();
|
2023-11-02 06:48:51 +00:00
|
|
|
QString getDeviceModel();
|
2023-09-07 08:45:32 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void updateTargetCfg();
|
|
|
|
void updateCurDeviceCfg();
|
|
|
|
QString getLogPath();
|
|
|
|
void writeTestLog(QString logContent);
|
2023-09-11 08:00:44 +00:00
|
|
|
void addInteractInfo(QString info, bool isNormal);
|
2023-09-13 03:11:53 +00:00
|
|
|
void updatePassStatus(bool pass);
|
2023-01-06 07:17:48 +00:00
|
|
|
|
|
|
|
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();
|
|
|
|
|
2023-09-07 08:45:32 +00:00
|
|
|
void on_pbtn_checkConfig_clicked();
|
|
|
|
|
|
|
|
void on_pbtn_enterTest_clicked();
|
|
|
|
|
|
|
|
void on_pbtn_setConfig_clicked();
|
|
|
|
|
2023-09-11 08:00:44 +00:00
|
|
|
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;
|
2023-09-07 08:45:32 +00:00
|
|
|
Dialog_logIn::LogInType m_logInType;
|
2023-01-06 05:39:49 +00:00
|
|
|
SANE_Handle m_handle;
|
|
|
|
bool m_valid;
|
2023-08-31 07:15:14 +00:00
|
|
|
QString m_profileName;
|
2023-09-07 08:45:32 +00:00
|
|
|
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;
|
2023-01-06 07:17:48 +00:00
|
|
|
hgscanner *m_hg;
|
2023-09-07 08:45:32 +00:00
|
|
|
|
|
|
|
int m_curIndex;
|
2023-09-13 03:11:53 +00:00
|
|
|
int m_originVid;
|
|
|
|
int m_originPid;
|
2022-12-16 11:01:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DIALOG_INPUTSERIALNUM_H
|