You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
#ifndef WIDGET_H
|
|
#define WIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QSqlDatabase>
|
|
|
|
#include "settingwgt.h"
|
|
#include "udpdatahandler.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class Widget; }
|
|
QT_END_NAMESPACE
|
|
|
|
class Widget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Widget(QWidget *parent = nullptr);
|
|
~Widget();
|
|
private:
|
|
void initUI();
|
|
void setSNLineEditFocus();
|
|
int checkSNId(const QString& snId);
|
|
int startIECSProgram(const QString& workPath, const QString& snId);
|
|
int checkForRepairProgram(const int mode, const QString& sn, bool& isFind);
|
|
|
|
int databaseQuery(const QString& databasePath, const QString& deviceSn, bool& isFind);
|
|
|
|
bool identifyProduct(const QString& sn, int& mode);
|
|
|
|
private slots:
|
|
void RegisterDoneSlot(bool ret);
|
|
void GetConnStatusSlot(bool ret);
|
|
bool ProcessJudgment();
|
|
bool isProcessRunningWithName(const QString& processNamePart);
|
|
|
|
void addLogItem(const QString& text);
|
|
int switchProgram(const QString snId, const int mode, const bool isRepair);
|
|
void on_pushButton_setting_clicked();
|
|
void on_lineEdit_snId_returnPressed();
|
|
void on_pushButton_sendSnId_clicked();
|
|
|
|
|
|
private:
|
|
Ui::Widget *ui;
|
|
SettingWgt *m_settingDlg;
|
|
UdpDataHandler *m_udpDataThread;
|
|
bool m_showSetting;
|
|
QSqlDatabase m_db;
|
|
};
|
|
#endif // WIDGET_H
|