code_production/app/HGProductionTool/form_burnmode.h

91 lines
1.8 KiB
C
Raw Normal View History

2023-01-04 06:28:44 +00:00
#ifndef FORM_BURNMODE_H
#define FORM_BURNMODE_H
#include <QWidget>
2023-01-04 09:27:24 +00:00
#include <QTableWidgetItem>
2023-01-04 06:28:44 +00:00
#include "sane/sane_ex.h"
#include "hgscanner.h"
2023-01-04 12:48:53 +00:00
#include "HGPdtToolDb.h"
2023-01-04 06:28:44 +00:00
namespace Ui {
class Form_BurnMode;
}
class DeviceManager
{
public:
2023-01-04 12:48:53 +00:00
DeviceManager(class MainWindow *mainwnd, HGPdtToolDbUserMgr pdtToolDbuserMgr, class Form_BurnMode *burnMode,
SANE_Handle handle, const QString &devName, const QString &sn, const QString &devType);
2023-01-04 06:28:44 +00:00
~DeviceManager();
QString getDevName();
QString getSn();
void setBurnMode();
void setSn(QString sn);
2023-01-04 12:48:53 +00:00
QString getUpdatedSn();
2023-01-04 06:28:44 +00:00
SANE_Handle m_handle;
2023-01-04 12:48:53 +00:00
void setGlobalCfg();
2023-01-04 06:28:44 +00:00
private:
2023-01-04 12:48:53 +00:00
union VIDPID
{
struct
{
unsigned short VID;
unsigned short PID;
};
unsigned int Value;
};
2023-01-04 06:28:44 +00:00
2023-01-04 12:48:53 +00:00
private:
2023-01-04 06:28:44 +00:00
class MainWindow *m_mainwnd;
2023-01-04 12:48:53 +00:00
HGPdtToolDbUserMgr m_pdtToolDbuserMgr;
2023-01-04 06:28:44 +00:00
class Form_BurnMode *m_burnMode;
2023-01-04 12:48:53 +00:00
QString m_devName;
QString m_sn;
QString m_devType;
2023-01-04 06:28:44 +00:00
hgscanner *m_hg;
};
class Form_BurnMode : public QWidget
{
Q_OBJECT
public:
explicit Form_BurnMode(class MainWindow *mainwnd, QWidget *parent = nullptr);
~Form_BurnMode();
void addDevice(DeviceManager *devManager);
void deleteDevice(QString devName);
signals:
2023-01-04 14:24:41 +00:00
void testResult(bool setStatus);
2023-01-04 06:28:44 +00:00
private slots:
2023-01-04 14:24:41 +00:00
void on_testResult(bool setStatus);
2023-01-04 06:28:44 +00:00
private slots:
void on_cbox_selectAll_stateChanged(int arg1);
void on_pbtn_burn_clicked();
void on_pbtn_setSn_clicked();
2023-01-04 09:27:24 +00:00
void on_tableWidget_itemDoubleClicked(QTableWidgetItem *item);
2023-01-05 07:18:55 +00:00
void on_pbtn_close_clicked();
2023-01-04 06:28:44 +00:00
private:
void initTableWidget();
2023-01-05 07:18:55 +00:00
void updatetablewidget();
2023-01-04 06:28:44 +00:00
private:
Ui::Form_BurnMode *ui;
class MainWindow *m_mainwnd;
int m_curIndex;
};
#endif // FORM_BURNMODE_H