diff --git a/src/tpMain/IWheelCtrl.h b/src/tpMain/IWheelCtrl.h index 8e72a81..9b449f4 100644 --- a/src/tpMain/IWheelCtrl.h +++ b/src/tpMain/IWheelCtrl.h @@ -14,7 +14,7 @@ #include class ModelManager; class CChannelInfo; -class DetectState; +class lpGlobalConfig; class Result2Ui; class QSqliteGeneral; class TimeMgrCtrl; diff --git a/src/tpMain/WheelCtrl.cpp b/src/tpMain/WheelCtrl.cpp index 9859072..18fca36 100644 --- a/src/tpMain/WheelCtrl.cpp +++ b/src/tpMain/WheelCtrl.cpp @@ -1,7 +1,7 @@ #include "WheelCtrl.h" #include "ChannelInfo.h" #include "ModelManager.h" -#include "DetectState.h" +#include "lpGlobalConfig.h" #include "Result2Ui.h" #include "InfoFile.h" #include @@ -32,7 +32,7 @@ WheelCtrl::WheelCtrl(QString strPath, QMySplashScreen* pScreen) m_pModelMgr->init(); ShowInitMsg(pScreen, tr("加载检测设置模块 ....")); - DetectState::instance()->init(strPath); + lpGlobalConfig::instance()->init(strPath); QString strDbPath = strPath + "\\" + _QSQLITE_WHEELHUBWF_NAME; ShowInitMsg(pScreen, tr("加载数据库 ....")); m_db = new DetectDataDB(strDbPath); @@ -199,8 +199,8 @@ bool WheelCtrl::onFinish() /*统计清零*/ bool WheelCtrl::onClear() { - DetectState::instance()->totalDetectNum = 0; - DetectState::instance()->totalUnDetectNum = 0; + lpGlobalConfig::instance()->totalDetectNum = 0; + lpGlobalConfig::instance()->totalUnDetectNum = 0; getModelMgr()->ClearAllCount(); return true; } @@ -309,12 +309,12 @@ void WheelCtrl::ShowInitMsg(QMySplashScreen* p, QString str){ void WheelCtrl::setDiaParam(Dia2ThPara st) { - DetectState::instance()->setDia2ThPara(st.mk_, st.mb_); - DetectState::instance()->save(); + lpGlobalConfig::instance()->setDia2ThPara(st.mk_, st.mb_); + lpGlobalConfig::instance()->save(); } Dia2ThPara WheelCtrl::getDiaParam() { Dia2ThPara st; - DetectState::instance()->getDia2ThPara(st.mk_, st.mb_); + lpGlobalConfig::instance()->getDia2ThPara(st.mk_, st.mb_); return st; } diff --git a/src/tpMain/DetectState.cpp b/src/tpMain/lpGlobalConfig.cpp similarity index 86% rename from src/tpMain/DetectState.cpp rename to src/tpMain/lpGlobalConfig.cpp index c3b7218..4382e4b 100644 --- a/src/tpMain/DetectState.cpp +++ b/src/tpMain/lpGlobalConfig.cpp @@ -1,4 +1,4 @@ -#include "DetectState.h" +#include "lpGlobalConfig.h" #include "QZkJsonParser.h" #define WHEEL_SELFDEFINE_FILE "\\user\\selfdefine.json" @@ -11,17 +11,17 @@ #define WHEEL_D2H_B "b" -DetectState::DetectState() +lpGlobalConfig::lpGlobalConfig() : IsOnline(0), IsDetect(0), IsCheck(false) { totalDetectNum = 0; totalUnDetectNum = 0; - m_bObjAll2A = false; + //m_bObjAll2A = false; m_startDetectFlags = false; - saveGood = 0; - saveBad = 0; + //saveGood = 0; + //saveBad = 0; m_Debug = 0; m_k = -0.00077528844; m_b = 0.786244571; @@ -29,12 +29,12 @@ DetectState::DetectState() } -DetectState::~DetectState() +lpGlobalConfig::~lpGlobalConfig() { //save(); } -void DetectState::init(QString strPath) +void lpGlobalConfig::init(QString strPath) { m_applicationDirPath = strPath; QString fileMyself = m_applicationDirPath + WHEEL_SELFDEFINE_FILE; @@ -51,11 +51,18 @@ void DetectState::init(QString strPath) if (!detectImage.isEmpty()) { m_Debug = detectImage.value("Debug").toInt(1001); - saveGood = detectImage.value("Save_Good").toInt(0); - saveBad = detectImage.value("Save_Bad").toInt(0); + //saveGood = detectImage.value("Save_Good").toInt(0); + //saveBad = detectImage.value("Save_Bad").toInt(0); m_UseBackground = detectImage.value("UseBackground").toInt(0); - saveCutGood = detectImage.value("SaveCut_Good").toInt(0); - saveCutBad = detectImage.value("SaveCut_Bad").toInt(0); + //saveCutGood = detectImage.value("SaveCut_Good").toInt(0); + //saveCutBad = detectImage.value("SaveCut_Bad").toInt(0); + bSaveCutOKImg = detectImage.value("saveCutOKImg").toBool(); + bSaveCutNGImg = detectImage.value("saveCutNGImg").toBool(); + bSaveSrcNGImg = detectImage.value("saveSrcNGImg").toBool(); + bSaveSrcOKImg = detectImage.value("saveSrcOKImg").toBool(); + bSaveSrcNGImg_value = detectImage.value("saveSrcNGImg_value").toBool(); + bSaveSrcOKImg_value = detectImage.value("saveSrcOKImg_value").toBool(); + m_SaveImgDirPath = detectImage.value("SaveImgPath").toString(); if (m_SaveImgDirPath.isEmpty()) m_SaveImgDirPath = m_applicationDirPath; @@ -174,7 +181,7 @@ void DetectState::init(QString strPath) } } -void DetectState::savePLCPara() +void lpGlobalConfig::savePLCPara() { QString fileMyself = m_applicationDirPath + WHEEL_SELFDEFINE_FILE; QJsonObject jsMyself = QZkJsonParser::ReadJsonAuto(fileMyself); @@ -196,7 +203,7 @@ void DetectState::savePLCPara() QZkJsonParser::WriteJsonObject(fileMyself, jsMyself); } -void DetectState::saveDeteImage() +void lpGlobalConfig::saveDeteImage() { QString fileMyself = m_applicationDirPath + WHEEL_SELFDEFINE_FILE; QJsonObject jsMyself = QZkJsonParser::ReadJsonAuto(fileMyself); @@ -209,10 +216,18 @@ void DetectState::saveDeteImage() QJsonObject DetectImage; DetectImage.insert("Debug", m_Debug); - DetectImage.insert("SaveCut_Bad", saveCutBad); - DetectImage.insert("SaveCut_Good", saveCutGood); - DetectImage.insert("Save_Bad", saveBad); - DetectImage.insert("Save_Good", saveGood); +// DetectImage.insert("SaveCut_Bad", saveCutBad); +// DetectImage.insert("SaveCut_Good", saveCutGood); +// DetectImage.insert("Save_Bad", saveBad); +// DetectImage.insert("Save_Good", saveGood); + + DetectImage.insert("saveCutOKImg",bSaveCutOKImg); + DetectImage.insert("saveCutNGImg",bSaveCutNGImg); + DetectImage.insert("saveSrcNGImg",bSaveSrcNGImg); + DetectImage.insert("saveSrcOKImg",bSaveSrcOKImg); + DetectImage.insert("saveSrcNGImg_value",bSaveSrcNGImg_value); + DetectImage.insert("saveSrcOKImg_value",bSaveSrcOKImg_value); + DetectImage.insert("SaveImgPath",m_SaveImgDirPath); DetectImage.insert("UseBackground", m_UseBackground); jsMyself.insert("DetectImage", DetectImage); @@ -238,7 +253,7 @@ void DetectState::saveDeteImage() QZkJsonParser::WriteJsonObject(fileMyself, jsMyself); } -void DetectState::save() +void lpGlobalConfig::save() { QString fileMyself = m_applicationDirPath + WHEEL_SELFDEFINE_FILE; QJsonObject jsMyself = QZkJsonParser::ReadJsonAuto(fileMyself); diff --git a/src/tpMain/DetectState.h b/src/tpMain/lpGlobalConfig.h similarity index 77% rename from src/tpMain/DetectState.h rename to src/tpMain/lpGlobalConfig.h index 0334254..efee0c0 100644 --- a/src/tpMain/DetectState.h +++ b/src/tpMain/lpGlobalConfig.h @@ -1,15 +1,15 @@ -#ifndef _H_DETECTSTATE_H_ -#define _H_DETECTSTATE_H_ +#ifndef _H_LPGLOBALCONFIG_H_ +#define _H_LPGLOBALCONFIG_H_ #include "lpsingleton.h" #include #include /*系统参数管理类 全局调用*/ -class DetectState :public lpsingleton +class lpGlobalConfig :public lpsingleton { public: - DetectState(); - ~DetectState(); + lpGlobalConfig(); + ~lpGlobalConfig(); void init(QString strPath); void save(); @@ -27,11 +27,6 @@ public: int m_StartAndDetect; int m_CameraTrigeType;//0 表示使用相机内触发模式 1表示使用传感器触发相机模式 - int saveGood; //保存 - int saveBad; - int saveCutGood; - int saveCutBad; - bool m_bObjAll2A; // 全部去A int m_Virtual_Camera; //虚拟相机 int m_Visural_Time; //模拟触发 @@ -78,6 +73,13 @@ public: int m_UseCutImg; int m_UseBackground{0}; bool bLockDetect{ false }; + + bool bSaveCutNGImg{ false };//是否保存识别NG抠图图像 + bool bSaveCutOKImg{ false };//是否保存识别OK抠图图像 + bool bSaveSrcNGImg{ false };//是否保存识别NG原始图像 + bool bSaveSrcOKImg{ false };//是否保存识别NG原始图像 + bool bSaveSrcNGImg_value{ false };//是否保存定位NG原始图像 + bool bSaveSrcOKImg_value{ false };//是否保存定位NG原始图像 }; #endif diff --git a/src/tpMain/qsaveimg.cpp b/src/tpMain/qsaveimg.cpp index 62bccfd..0f45e67 100644 --- a/src/tpMain/qsaveimg.cpp +++ b/src/tpMain/qsaveimg.cpp @@ -1,6 +1,6 @@ #include "qsaveimg.h" #include "Result2Ui.h" -#include "DetectState.h" +#include "lpGlobalConfig.h" #include "QString" #include "QDir" #include "QDateTime" @@ -43,7 +43,7 @@ void QSaveImg::doWork(Result2Ui* m_Res) if (!IsSave) m_test.mkdir(goodsourceDir); filename += QDateTime::currentDateTime().toString("hhmmsszzz"); - if (pState->saveGood == 1){ + if (pState->bSaveCutNGImg == true){ goodsourceDir += "\\Source"; IsSave = m_test.exists(goodsourceDir); if (!IsSave) @@ -57,7 +57,7 @@ void QSaveImg::doWork(Result2Ui* m_Res) m_Res->m_pixSrc.save(resultpath); } QString goodtargetDir = fileSavePath + "\\Good"; - if (pState->saveCutGood == 1){ + if (pState->bSaveCutOKImg == true){ goodtargetDir += "\\Target"; IsSave = m_test.exists(goodtargetDir); if (!IsSave) @@ -78,7 +78,7 @@ void QSaveImg::doWork(Result2Ui* m_Res) IsSave = m_test.exists(errorSourceDir); if (!IsSave) m_test.mkdir(errorSourceDir); - if (pState->saveBad == 1){ + if (pState->bSaveSrcOKImg == true){ errorSourceDir += "\\Source"; IsSave = m_test.exists(errorSourceDir); if (!IsSave) @@ -87,7 +87,7 @@ void QSaveImg::doWork(Result2Ui* m_Res) m_Res->m_pixSrc.save(resultpath); } QString errortargetDir = fileSavePath + "\\Error"; - if (pState->saveCutBad == 1){ + if (pState->bSaveSrcNGImg == true){ errortargetDir += "\\Target"; IsSave = m_test.exists(errortargetDir); if (!IsSave) diff --git a/src/tpMain/qsaveimg.h b/src/tpMain/qsaveimg.h index db314bb..a17531f 100644 --- a/src/tpMain/qsaveimg.h +++ b/src/tpMain/qsaveimg.h @@ -3,7 +3,7 @@ #include class Result2Ui; -class DetectState; +class lpGlobalConfig; class QSaveImg : public QObject { Q_OBJECT @@ -11,13 +11,13 @@ class QSaveImg : public QObject public: QSaveImg(QObject *parent = 0); ~QSaveImg(); - void setDetectPtr(DetectState* ptr){ pState = ptr; }; + void setDetectPtr(lpGlobalConfig* ptr){ pState = ptr; }; public slots: void doWork(Result2Ui* pResult); signals: void resultReady(Result2Ui*); private: - DetectState* pState; + lpGlobalConfig* pState; }; #endif // QSAVEIMG_H diff --git a/src/tpMain/qworkmgrui.cpp b/src/tpMain/qworkmgrui.cpp index 3e5b30a..f3aac60 100644 --- a/src/tpMain/qworkmgrui.cpp +++ b/src/tpMain/qworkmgrui.cpp @@ -1,5 +1,5 @@ #include "qworkmgrui.h" -#include "DetectState.h" +#include "lpGlobalConfig.h" #include "IWheelCtrl.h" #include "qpushbutton.h" #include "qlabel.h" @@ -67,10 +67,10 @@ void QWorkMgrUI::InitUI() { //connect(ui.work_SaveAll_pb, SIGNAL(clicked()), this, SLOT(onClickButton())); m_UseDiameter = ui.work_mode_UseDiameter; - m_UseDiameter->setChecked(DetectState::instance()->bUseDiameter == 1); + m_UseDiameter->setChecked(lpGlobalConfig::instance()->bUseDiameter == 1); m_UseThickness = ui.work_mode_UseThickness; - m_UseThickness->setChecked(DetectState::instance()->bUseThickness == 1); + m_UseThickness->setChecked(lpGlobalConfig::instance()->bUseThickness == 1); m_pEditFilter = ui.work_mode_edit_models_filter; connect(m_pEditFilter, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged(const QString&))); @@ -247,12 +247,12 @@ bool QWorkMgrUI::onClose() bool QWorkMgrUI::onStateChanged(QObject* watched, int state) { if ("work_mode_UseDiameter" == watched->objectName()) { - DetectState::instance()->bUseDiameter = state == 2; - DetectState::instance()->save(); + lpGlobalConfig::instance()->bUseDiameter = state == 2; + lpGlobalConfig::instance()->save(); } else if ("work_mode_UseThickness" == watched->objectName()) { - DetectState::instance()->bUseThickness = state == 2; - DetectState::instance()->save(); + lpGlobalConfig::instance()->bUseThickness = state == 2; + lpGlobalConfig::instance()->save(); } else { return false; diff --git a/tpvs17/tpMain/QSystemSettingDlg.cpp b/tpvs17/tpMain/QSystemSettingDlg.cpp index 252b606..ce0c024 100644 --- a/tpvs17/tpMain/QSystemSettingDlg.cpp +++ b/tpvs17/tpMain/QSystemSettingDlg.cpp @@ -4,7 +4,7 @@ #include "QCheckBox" #include "QLabel" #include "QSpinBox" -#include "DetectState.h" +#include "lpGlobalConfig.h" #include "QFileDialog" #include "QMessageBox" #include "qshowimg.h" @@ -119,7 +119,7 @@ QSystemSettingDlg::~QSystemSettingDlg() void QSystemSettingDlg::onShowWidget(int nLevel) { - if (nLevel == 9 || DetectState::instance()->m_Debug == 100) { + if (nLevel == 9 || lpGlobalConfig::instance()->m_Debug == 100) { //HidPLCUI(false); HidDevelopUI(false); @@ -240,43 +240,43 @@ void QSystemSettingDlg::addPicRoot(QTreeWidget *pTreewidget, QString strName) m_saveImgRes_good->setText(tr("保存已匹配图")); m_saveImgRes_good->setObjectName("m_saveImgRes_good"); connect(m_saveImgRes_good, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_saveImgRes_good->setChecked(DetectState::instance()->saveCutGood == (int)true); + m_saveImgRes_good->setChecked(lpGlobalConfig::instance()->saveCutGood == (int)true); QCheckBox *m_saveImgRes_bad = new QCheckBox; m_saveImgRes_bad->setText(tr("保存无匹配图")); m_saveImgRes_bad->setObjectName("m_saveImgRes_bad"); connect(m_saveImgRes_bad, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_saveImgRes_bad->setChecked(DetectState::instance()->saveCutBad == (int)true); + m_saveImgRes_bad->setChecked(lpGlobalConfig::instance()->saveCutBad == (int)true); QCheckBox *m_saveImgSrc_good = new QCheckBox; m_saveImgSrc_good->setText(tr("保存已匹配图")); m_saveImgSrc_good->setObjectName("m_saveImgSrc_good"); connect(m_saveImgSrc_good, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_saveImgSrc_good->setChecked(DetectState::instance()->saveGood == (int)true); + m_saveImgSrc_good->setChecked(lpGlobalConfig::instance()->saveGood == (int)true); QCheckBox *m_saveImgSrc_bad = new QCheckBox; m_saveImgSrc_bad->setText(tr("保存无匹配图")); m_saveImgSrc_bad->setObjectName("m_saveImgSrc_bad"); connect(m_saveImgSrc_bad, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_saveImgSrc_bad->setChecked(DetectState::instance()->saveBad == (int)true); + m_saveImgSrc_bad->setChecked(lpGlobalConfig::instance()->saveBad == (int)true); QCheckBox *m_useBackground = new QCheckBox; m_useBackground->setText(tr("使用背景图")); m_useBackground->setObjectName("m_useBackground"); connect(m_useBackground, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_useBackground->setChecked(DetectState::instance()->m_UseBackground == (int)true); + m_useBackground->setChecked(lpGlobalConfig::instance()->m_UseBackground == (int)true); QCheckBox *m_ResAll2A = new QCheckBox; m_ResAll2A->setText(tr("轮毂全去A通道")); m_ResAll2A->setObjectName("m_ResAll2A"); connect(m_ResAll2A, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_ResAll2A->setChecked(DetectState::instance()->m_bObjAll2A == (int)true); + m_ResAll2A->setChecked(lpGlobalConfig::instance()->m_bObjAll2A == (int)true); QPushButton* pChangeBGbp = new QPushButton(tr("查看检测背景")); connect(pChangeBGbp, SIGNAL(clicked()), this, SLOT(onChangeBackground())); m_pLbShowPath = new QLabel; - m_pLbShowPath->setText(DetectState::instance()->m_SaveImgDirPath); + m_pLbShowPath->setText(lpGlobalConfig::instance()->m_SaveImgDirPath); QPushButton *pbSetSavePath = new QPushButton(tr("设置保存路径")); pbSetSavePath->setObjectName("pbSetSavePath"); @@ -348,30 +348,30 @@ void QSystemSettingDlg::addPLCRoot(QTreeWidget *pTreewidget, QString strName) m_PLCTrigerFilter = new QSpinBox(); m_PLCTrigerFilter->setMinimum(1); m_PLCTrigerFilter->setMaximum(65536); - m_PLCTrigerFilter->setValue(DetectState::instance()->m_PLC_TrigerFilter); + m_PLCTrigerFilter->setValue(lpGlobalConfig::instance()->m_PLC_TrigerFilter); m_PLCCameraDelay = new QSpinBox(); m_PLCCameraDelay->setMinimum(1); m_PLCCameraDelay->setMaximum(65536); - m_PLCCameraDelay->setValue(DetectState::instance()->m_PLC_CamTrigDelay); + m_PLCCameraDelay->setValue(lpGlobalConfig::instance()->m_PLC_CamTrigDelay); m_PLCCameraPulse = new QSpinBox(); m_PLCCameraPulse->setMinimum(1); m_PLCCameraPulse->setMaximum(65536); - m_PLCCameraPulse->setValue(DetectState::instance()->m_PLC_CamTrigPulse); + m_PLCCameraPulse->setValue(lpGlobalConfig::instance()->m_PLC_CamTrigPulse); m_PLCLightDelay = new QSpinBox(); m_PLCLightDelay->setMinimum(1); m_PLCLightDelay->setMaximum(65536); - m_PLCLightDelay->setValue(DetectState::instance()->m_PLC_LightDelay); + m_PLCLightDelay->setValue(lpGlobalConfig::instance()->m_PLC_LightDelay); m_PLCResHoldTime = new QSpinBox(); m_PLCResHoldTime->setMinimum(1); m_PLCResHoldTime->setMaximum(65536); - m_PLCResHoldTime->setValue(DetectState::instance()->m_PLC_ResHoldTime); + m_PLCResHoldTime->setValue(lpGlobalConfig::instance()->m_PLC_ResHoldTime); m_PLCTrigerType = new QComboBox(); QStringList strList; strList.append(DEVELOP_PLC_TRIGER_DOWM); strList.append(DEVELOP_PLC_TRIGER_UP); m_PLCTrigerType->addItems(strList); - if (DetectState::instance()->m_PLC_TrigerType == 0) + if (lpGlobalConfig::instance()->m_PLC_TrigerType == 0) m_PLCTrigerType->setCurrentText(DEVELOP_PLC_TRIGER_DOWM); else m_PLCTrigerType->setCurrentText(DEVELOP_PLC_TRIGER_UP); @@ -383,28 +383,28 @@ void QSystemSettingDlg::addPLCRoot(QTreeWidget *pTreewidget, QString strName) m_PLC_RestartSeverCount->setMinimum(1); m_PLC_RestartSeverCount->setMaximum(65536); m_PLC_RestartSeverCount->setToolTip(tr("超时提醒n次后自动重启服务")); - m_PLC_RestartSeverCount->setValue(DetectState::instance()->m_PLC_RestartSeverCount); + m_PLC_RestartSeverCount->setValue(lpGlobalConfig::instance()->m_PLC_RestartSeverCount); QCheckBox *m_PLC_ShowTimerOutMsg = new QCheckBox; m_PLC_ShowTimerOutMsg->setText(tr("是否显示提示")); m_PLC_ShowTimerOutMsg->setText(tr("勾选后通信超时时会显示提醒信息")); m_PLC_ShowTimerOutMsg->setObjectName("m_PLC_ShowTimerOutMsg"); connect(m_PLC_ShowTimerOutMsg, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_PLC_ShowTimerOutMsg->setChecked(DetectState::instance()->m_PLC_ShowTimerOutMsg == (int)true); + m_PLC_ShowTimerOutMsg->setChecked(lpGlobalConfig::instance()->m_PLC_ShowTimerOutMsg == (int)true); QCheckBox *m_PLC_IsResServer = new QCheckBox; m_PLC_IsResServer->setText(tr("是否自动重启服务器")); m_PLC_IsResServer->setToolTip(tr("勾选后通信超时次数达到后,系统将自动重启服务,PLC会自动重新连接")); m_PLC_IsResServer->setObjectName("m_PLC_IsResServer"); connect(m_PLC_IsResServer, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_PLC_IsResServer->setChecked(DetectState::instance()->m_PLC_IsResServer == (int)true); + m_PLC_IsResServer->setChecked(lpGlobalConfig::instance()->m_PLC_IsResServer == (int)true); QCheckBox *m_PLC_SaveMsgInLog = new QCheckBox; m_PLC_SaveMsgInLog->setText(tr("保存信息到系统日志")); m_PLC_SaveMsgInLog->setToolTip(tr("勾选后表示超时信息将自动保存到系统日志中,便于查询")); m_PLC_SaveMsgInLog->setObjectName("m_PLC_SaveMsgInLog"); connect(m_PLC_SaveMsgInLog, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_PLC_SaveMsgInLog->setChecked(DetectState::instance()->m_PLC_SaveMsgInLog == (int)true); + m_PLC_SaveMsgInLog->setChecked(lpGlobalConfig::instance()->m_PLC_SaveMsgInLog == (int)true); PLCitems.at(0)->setSizeHint(1, QSize(100, 40)); PLCitems.at(1)->setSizeHint(1, QSize(100, 40)); @@ -523,67 +523,67 @@ void QSystemSettingDlg::addSuperRoot(class QTreeWidget *pTreewidget, QString str m_AutoSendTick2COM->setText(tr("串口发送心跳包")); m_AutoSendTick2COM->setObjectName("m_AutoSendTick2COM"); connect(m_AutoSendTick2COM, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_AutoSendTick2COM->setChecked(DetectState::instance()->m_AutoSendTick2COM == (int)true); + m_AutoSendTick2COM->setChecked(lpGlobalConfig::instance()->m_AutoSendTick2COM == (int)true); QCheckBox *m_AutoSendTick2Net = new QCheckBox; m_AutoSendTick2Net->setText(tr("网络发送心跳包")); m_AutoSendTick2Net->setObjectName("m_AutoSendTick2Net"); connect(m_AutoSendTick2Net, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_AutoSendTick2Net->setChecked(DetectState::instance()->m_AutoSendTick2Net == (int)true); + m_AutoSendTick2Net->setChecked(lpGlobalConfig::instance()->m_AutoSendTick2Net == (int)true); QCheckBox *m_SendChannelRes2COM = new QCheckBox; m_SendChannelRes2COM->setText(tr("串口发送通道结果")); m_SendChannelRes2COM->setObjectName("m_SendChannelRes2COM"); connect(m_SendChannelRes2COM, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_SendChannelRes2COM->setChecked(DetectState::instance()->m_SendChannelRes2COM == (int)true); + m_SendChannelRes2COM->setChecked(lpGlobalConfig::instance()->m_SendChannelRes2COM == (int)true); QCheckBox *m_SendDetectStr2Net = new QCheckBox; m_SendDetectStr2Net->setText(tr("网络发送检测结果")); m_SendDetectStr2Net->setObjectName("m_SendDetectStr2Net"); connect(m_SendDetectStr2Net, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_SendDetectStr2Net->setChecked(DetectState::instance()->m_SendDetectStr2Net == (int)true); + m_SendDetectStr2Net->setChecked(lpGlobalConfig::instance()->m_SendDetectStr2Net == (int)true); QCheckBox *m_SendChannelRes2Net = new QCheckBox; m_SendChannelRes2Net->setText(tr("网络发送通道结果")); m_SendChannelRes2Net->setObjectName("m_SendChannelRes2Net"); connect(m_SendChannelRes2Net, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_SendChannelRes2Net->setChecked(DetectState::instance()->m_SendChannelRes2Net == (int)true); + m_SendChannelRes2Net->setChecked(lpGlobalConfig::instance()->m_SendChannelRes2Net == (int)true); QCheckBox *m_UseRaster = new QCheckBox; m_UseRaster->setText(tr("使用光栅获取厚度")); m_UseRaster->setObjectName("m_UseRaster"); connect(m_UseRaster, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_UseRaster->setChecked(DetectState::instance()->m_IsUseRaster == 1); + m_UseRaster->setChecked(lpGlobalConfig::instance()->m_IsUseRaster == 1); QCheckBox *m_SaveD2HCsv = new QCheckBox; m_SaveD2HCsv->setText(tr("保存数据用于测试")); m_SaveD2HCsv->setObjectName("m_SaveD2HCsv"); connect(m_SaveD2HCsv, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_SaveD2HCsv->setChecked(DetectState::instance()->m_SaveD2HCsv == 1); + m_SaveD2HCsv->setChecked(lpGlobalConfig::instance()->m_SaveD2HCsv == 1); QCheckBox *m_IsUseChannel = new QCheckBox; m_IsUseChannel->setText(tr("是否使用通道分配")); m_IsUseChannel->setObjectName("m_IsUseChannel"); connect(m_IsUseChannel, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_IsUseChannel->setChecked(DetectState::instance()->m_IsUseChannel == 1); + m_IsUseChannel->setChecked(lpGlobalConfig::instance()->m_IsUseChannel == 1); QCheckBox *m_StartAndDetect = new QCheckBox; m_StartAndDetect->setText(tr("是否启动就开始检测")); m_StartAndDetect->setObjectName("m_StartAndDetect"); connect(m_StartAndDetect, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_StartAndDetect->setChecked(DetectState::instance()->m_StartAndDetect == 1); + m_StartAndDetect->setChecked(lpGlobalConfig::instance()->m_StartAndDetect == 1); QCheckBox *m_showThressValue = new QCheckBox; m_showThressValue->setText(tr("是否显示")); m_showThressValue->setObjectName("m_showThressValue"); connect(m_showThressValue, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_showThressValue->setChecked(DetectState::instance()->m_showThressValue == 1); + m_showThressValue->setChecked(lpGlobalConfig::instance()->m_showThressValue == 1); QCheckBox *m_showThressList = new QCheckBox; m_showThressList->setText(tr("是否显示")); m_showThressList->setObjectName("m_showThressList"); connect(m_showThressList, SIGNAL(stateChanged(int)), this, SLOT(onCheckstateChanged(int))); - m_showThressList->setChecked(DetectState::instance()->m_showThressList == 1); + m_showThressList->setChecked(lpGlobalConfig::instance()->m_showThressList == 1); QPushButton *m_DebugSave = new QPushButton(tr("保存")); m_DebugSave->setObjectName("m_DebugSave"); @@ -674,23 +674,23 @@ void QSystemSettingDlg::InitDebugTree(void) { if (m_pCameraTrgType) { - if (DetectState::instance()->m_Virtual_Camera == 1) + if (lpGlobalConfig::instance()->m_Virtual_Camera == 1) m_pCameraTrgType->setCurrentText(DEVELOP_DETECT_CAMERE_VIRSUAL); else m_pCameraTrgType->setCurrentText(DEVELOP_DETECT_CAMERE_TRUE); } if (m_pCameraTrgTimes) - m_pCameraTrgTimes->setValue(DetectState::instance()->m_Visural_Time); + m_pCameraTrgTimes->setValue(lpGlobalConfig::instance()->m_Visural_Time); if (m_pDebugModel) { - if (DetectState::instance()->m_Debug == 100) + if (lpGlobalConfig::instance()->m_Debug == 100) m_pDebugModel->setCurrentText(DEVELOP_DETECT_DEBUG_NOUSER); else m_pDebugModel->setCurrentText(DEVELOP_DETECT_DEBUG_USER); } if (m_pSystype) { - if (DetectState::instance()->m_CameraTrigeType == 1) + if (lpGlobalConfig::instance()->m_CameraTrigeType == 1) m_pSystype->setCurrentText(DEVELOP_DETECT_CAM_OUTTRIGER); else m_pSystype->setCurrentText(DEVELOP_DETECT_CAM_SOFTER); @@ -701,80 +701,80 @@ Q_SLOT void QSystemSettingDlg::onCheckstateChanged(int state) { QString strObj = sender()->objectName(); if (strObj == "m_saveImgRes_good") { - DetectState::instance()->saveCutGood = int(state == 2); + lpGlobalConfig::instance()->saveCutGood = int(state == 2); } else if (strObj == "m_saveImgRes_bad") { - DetectState::instance()->saveCutBad = int(state == 2); + lpGlobalConfig::instance()->saveCutBad = int(state == 2); } else if (strObj == "m_saveImgSrc_good") { - DetectState::instance()->saveGood = int(state == 2); + lpGlobalConfig::instance()->saveGood = int(state == 2); } else if (strObj == "m_saveImgSrc_bad") { - DetectState::instance()->saveBad = int(state == 2); + lpGlobalConfig::instance()->saveBad = int(state == 2); } else if (strObj == "m_useBackground") { - DetectState::instance()->m_UseBackground = int(state == 2); + lpGlobalConfig::instance()->m_UseBackground = int(state == 2); } else if (strObj == "m_ResAll2A") { - DetectState::instance()->m_bObjAll2A = (state == 2 ? true : false); + lpGlobalConfig::instance()->m_bObjAll2A = (state == 2 ? true : false); } else if (strObj == "m_AutoSendTick2COM") { - DetectState::instance()->m_AutoSendTick2COM = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_AutoSendTick2COM = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_AutoSendTick2Net") { - DetectState::instance()->m_AutoSendTick2Net = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_AutoSendTick2Net = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_SendDetectStr2Net") { - DetectState::instance()->m_SendDetectStr2Net = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_SendDetectStr2Net = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_SendChannelRes2Net") { - DetectState::instance()->m_SendChannelRes2Net = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_SendChannelRes2Net = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_SendChannelRes2COM") { - DetectState::instance()->m_SendChannelRes2COM = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_SendChannelRes2COM = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_UseRaster") { - DetectState::instance()->m_IsUseRaster = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_IsUseRaster = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_SaveD2HCsv") { - DetectState::instance()->m_SaveD2HCsv = int(state == 2); + lpGlobalConfig::instance()->m_SaveD2HCsv = int(state == 2); } else if (strObj == "m_IsUseChannel") { - DetectState::instance()->m_IsUseChannel = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_IsUseChannel = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_StartAndDetect") { - DetectState::instance()->m_StartAndDetect = int(state == 2); - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->m_StartAndDetect = int(state == 2); + lpGlobalConfig::instance()->saveDeteImage(); } else if (strObj == "m_PLC_RestartSeverCount") { - DetectState::instance()->m_PLC_RestartSeverCount = int(state == 2); - DetectState::instance()->savePLCPara(); + lpGlobalConfig::instance()->m_PLC_RestartSeverCount = int(state == 2); + lpGlobalConfig::instance()->savePLCPara(); } else if (strObj == "m_PLC_ShowTimerOutMsg") { - DetectState::instance()->m_PLC_ShowTimerOutMsg = int(state == 2); - DetectState::instance()->savePLCPara(); + lpGlobalConfig::instance()->m_PLC_ShowTimerOutMsg = int(state == 2); + lpGlobalConfig::instance()->savePLCPara(); } else if (strObj == "m_PLC_IsResServer") { - DetectState::instance()->m_PLC_IsResServer = int(state == 2); - DetectState::instance()->savePLCPara(); + lpGlobalConfig::instance()->m_PLC_IsResServer = int(state == 2); + lpGlobalConfig::instance()->savePLCPara(); } else if (strObj == "m_PLC_SaveMsgInLog") { - DetectState::instance()->m_PLC_SaveMsgInLog = int(state == 2); - DetectState::instance()->savePLCPara(); + lpGlobalConfig::instance()->m_PLC_SaveMsgInLog = int(state == 2); + lpGlobalConfig::instance()->savePLCPara(); } else if (strObj == "m_showThressValue") { - DetectState::instance()->m_showThressValue = int(state == 2); + lpGlobalConfig::instance()->m_showThressValue = int(state == 2); } else if (strObj == "m_showThressList") { - DetectState::instance()->m_showThressList = int(state == 2); + lpGlobalConfig::instance()->m_showThressList = int(state == 2); } } @@ -798,18 +798,18 @@ Q_SLOT void QSystemSettingDlg::onSetCurrentIndex(int nIndex) Q_SLOT void QSystemSettingDlg::onSavePLCPara() { { - DetectState::instance()->m_PLC_TrigerFilter = m_PLCTrigerFilter->value(); - DetectState::instance()->m_PLC_CamTrigDelay = m_PLCCameraDelay->value(); - DetectState::instance()->m_PLC_CamTrigPulse = m_PLCCameraPulse->value(); - DetectState::instance()->m_PLC_LightDelay = m_PLCLightDelay->value(); - DetectState::instance()->m_PLC_RestartSeverCount = m_PLC_RestartSeverCount->value(); - DetectState::instance()->m_PLC_ResHoldTime = m_PLCResHoldTime->value(); + lpGlobalConfig::instance()->m_PLC_TrigerFilter = m_PLCTrigerFilter->value(); + lpGlobalConfig::instance()->m_PLC_CamTrigDelay = m_PLCCameraDelay->value(); + lpGlobalConfig::instance()->m_PLC_CamTrigPulse = m_PLCCameraPulse->value(); + lpGlobalConfig::instance()->m_PLC_LightDelay = m_PLCLightDelay->value(); + lpGlobalConfig::instance()->m_PLC_RestartSeverCount = m_PLC_RestartSeverCount->value(); + lpGlobalConfig::instance()->m_PLC_ResHoldTime = m_PLCResHoldTime->value(); if (m_PLCTrigerType->currentText() == DEVELOP_PLC_TRIGER_DOWM) - DetectState::instance()->m_PLC_TrigerType = 0; + lpGlobalConfig::instance()->m_PLC_TrigerType = 0; else if (m_PLCTrigerType->currentText() == DEVELOP_PLC_TRIGER_UP) - DetectState::instance()->m_PLC_TrigerType = 1; + lpGlobalConfig::instance()->m_PLC_TrigerType = 1; - DetectState::instance()->savePLCPara(); + lpGlobalConfig::instance()->savePLCPara(); // QVariant nType = QVariant(WF_PLCPARA); // emit(sgGenalData(nType, WF_PARASET)); // emit sgShowMsg(tr("数据已发送并保存")); @@ -920,26 +920,26 @@ Q_SLOT void QSystemSettingDlg::onTreeWidgetButton() { if (m_pCameraTrgType) { if (m_pCameraTrgType->currentText() == DEVELOP_DETECT_CAMERE_VIRSUAL) - DetectState::instance()->m_Virtual_Camera = 1; + lpGlobalConfig::instance()->m_Virtual_Camera = 1; else - DetectState::instance()->m_Virtual_Camera = 0; + lpGlobalConfig::instance()->m_Virtual_Camera = 0; } if (m_pCameraTrgTimes) { - DetectState::instance()->m_Visural_Time = m_pCameraTrgTimes->value(); + lpGlobalConfig::instance()->m_Visural_Time = m_pCameraTrgTimes->value(); } if (m_pDebugModel) { if (m_pDebugModel->currentText() == DEVELOP_DETECT_DEBUG_NOUSER) - DetectState::instance()->m_Debug = 100; + lpGlobalConfig::instance()->m_Debug = 100; else - DetectState::instance()->m_Debug = 1001; + lpGlobalConfig::instance()->m_Debug = 1001; } if (m_pSystype) { if (m_pSystype->currentText() == DEVELOP_DETECT_CAM_OUTTRIGER) - DetectState::instance()->m_CameraTrigeType = 1; + lpGlobalConfig::instance()->m_CameraTrigeType = 1; else - DetectState::instance()->m_CameraTrigeType = 0; + lpGlobalConfig::instance()->m_CameraTrigeType = 0; } - DetectState::instance()->saveDeteImage(); + lpGlobalConfig::instance()->saveDeteImage(); //emit sgShowMsg(tr("保存完成")); } } @@ -973,11 +973,11 @@ Q_SLOT void QSystemSettingDlg::onOpenDataPath() QString strObj = sender()->objectName(); if ("pbOpenImgPath" == strObj) { - QString strpath = DetectState::instance()->m_SaveImgDirPath + "/Data"; + QString strpath = lpGlobalConfig::instance()->m_SaveImgDirPath + "/Data"; bool bFalg = QDesktopServices::openUrl(QUrl(strpath, QUrl::TolerantMode)); if (!bFalg) { - bool bFalgs = QDesktopServices::openUrl(QUrl(DetectState::instance()->m_SaveImgDirPath, QUrl::TolerantMode)); + bool bFalgs = QDesktopServices::openUrl(QUrl(lpGlobalConfig::instance()->m_SaveImgDirPath, QUrl::TolerantMode)); if (!bFalgs) { @@ -991,7 +991,7 @@ Q_SLOT void QSystemSettingDlg::onOpenDataPath() { if (m_pLbShowPath) m_pLbShowPath->setText(dir); - DetectState::instance()->m_SaveImgDirPath = dir; + lpGlobalConfig::instance()->m_SaveImgDirPath = dir; if (pDiskCleanThread) pDiskCleanThread->SetImgStorageFolder(dir + "/Data"); } diff --git a/tpvs17/tpMain/lpMainWin.cpp b/tpvs17/tpMain/lpMainWin.cpp index 22427b6..cff90bd 100644 --- a/tpvs17/tpMain/lpMainWin.cpp +++ b/tpvs17/tpMain/lpMainWin.cpp @@ -205,11 +205,14 @@ lpMainWin::lpMainWin(QWidget *parent) m_pTimerMgrDlg = new QTimeMgrDlg();//班次管理 m_pTimerMgrDlg->onSetCtrlPtr(m_pCtrl); - m_pSystemSettingDlg = new QSystemSettingDlg();//系统设置 + //m_pSystemSettingDlg = new QSystemSettingDlg();//系统设置 + + m_pSystemConfigUI = new lpSystemConfigUI(); + m_CamSettingDlg = new QCamSettingDlg(); m_CamSettingDlg->setCoreCtrlPtr(m_pCoreCtrl); - connect(m_pSystemSettingDlg, SIGNAL(sgChangeLanguage(QString)), this, SLOT(onLanguageChange(QString))); - connect(m_pSystemSettingDlg, SIGNAL(sgChangePLCParam()), this, SLOT(onChangePLCParam())); + //connect(m_pSystemSettingDlg, SIGNAL(sgChangeLanguage(QString)), this, SLOT(onLanguageChange(QString))); + //connect(m_pSystemSettingDlg, SIGNAL(sgChangePLCParam()), this, SLOT(onChangePLCParam())); m_pixMapList = new QPixmapListBar(ui.tp_main_tabWidget); ui.tp_main_tabWidget->insertTab(0, m_pixMapList, tr("历史")); @@ -283,7 +286,7 @@ lpMainWin::lpMainWin(QWidget *parent) } { /*启动之后就一直发送心跳包和厚度查询*/ - if (DetectState::instance()->m_AutoSendTick2Net) + if (lpGlobalConfig::instance()->m_AutoSendTick2Net) { SendTiskTsk->setSleepTime(1000); SendTiskTsk->start(); @@ -293,11 +296,11 @@ lpMainWin::lpMainWin(QWidget *parent) { QTimer::singleShot(3000, [&](){ ui.btn_start_detect->setText(tr("停止检测")); - DetectState::instance()->IsDetect = true; + lpGlobalConfig::instance()->IsDetect = true; m_pCtrl->onStart(); }); } - if (DetectState::instance()->m_AutoSendTick2COM) + if (lpGlobalConfig::instance()->m_AutoSendTick2COM) m_wfPulseTimer.start(1000); @@ -424,11 +427,17 @@ lpMainWin::~lpMainWin() delete m_pTimerMgrDlg; m_pTimerMgrDlg = nullptr; } - if (m_pSystemSettingDlg) +// if (m_pSystemSettingDlg) +// { +// delete m_pSystemSettingDlg; +// m_pSystemSettingDlg = nullptr; +// } + if (m_pSystemConfigUI) { - delete m_pSystemSettingDlg; - m_pSystemSettingDlg = nullptr; + delete m_pSystemConfigUI; + m_pSystemConfigUI = nullptr; } + if (m_CamSettingDlg) { delete m_CamSettingDlg; @@ -824,25 +833,25 @@ QVariant lpMainWin::IGetVariantById(int id) emit(sgShowImgState(tr("获得图像,正在计算中..."))); emit(sgGetImg()); qDebug() << "get one Pic ,id=" << id; - if (DetectState::instance()->m_showThressList == 1) { + if (lpGlobalConfig::instance()->m_showThressList == 1) { QString str = m_pCtrl->getThicknessStr(); emit(sgShowMsg(str, true)); } QVariantMap vMap; int nThickness = 0; - if (DetectState::instance()->m_IsUseRaster == 0) + if (lpGlobalConfig::instance()->m_IsUseRaster == 0) nThickness = m_nWfThress; else nThickness = m_pCtrl->getThickness();// m_houduVec.first(); vMap.insert("thickness", QVariant(nThickness)); double dDiameter = 0;// = (-794.25 * nThickness / 1000000.0 + 0.775960); - dDiameter = (DetectState::instance()->m_k * nThickness + DetectState::instance()->m_b); + dDiameter = (lpGlobalConfig::instance()->m_k * nThickness + lpGlobalConfig::instance()->m_b); vMap.insert("d2h", dDiameter); - vMap.insert("useThickness", DetectState::instance()->bUseThickness); - vMap.insert("useDiameter", DetectState::instance()->bUseDiameter); - vMap.insert("Threshold", DetectState::instance()->m_AlgThres); - vMap.insert("IsCutImg", DetectState::instance()->m_UseCutImg); - vMap.insert("useBackground", DetectState::instance()->m_UseBackground>0?true:false);//使用背景图 + vMap.insert("useThickness", lpGlobalConfig::instance()->bUseThickness); + vMap.insert("useDiameter", lpGlobalConfig::instance()->bUseDiameter); + vMap.insert("Threshold", lpGlobalConfig::instance()->m_AlgThres); + vMap.insert("IsCutImg", lpGlobalConfig::instance()->m_UseCutImg); + vMap.insert("useBackground", lpGlobalConfig::instance()->m_UseBackground>0?true:false);//使用背景图 void* address = (void*)m_pCtrl->getAllModelMapPtr(); long long varadr = (long long)address; @@ -853,7 +862,7 @@ QVariant lpMainWin::IGetVariantById(int id) vMap.insert("defectList", val); qDebug() << "end get one pic" << id; - if (DetectState::instance()->m_showThressValue == 1) { + if (lpGlobalConfig::instance()->m_showThressValue == 1) { QString str = QString("thickness value = %1,dDiameter value = %2").arg(nThickness).arg(dDiameter); emit(sgShowMsg(str, true)); } @@ -1069,16 +1078,27 @@ Q_SLOT void lpMainWin::onActionClicked() } } else if ("actionSystemSeting" == strObj) {//系统参数设置 - if (m_pSystemSettingDlg) +// if (m_pSystemSettingDlg) +// { +// m_pSystemSettingDlg->setParent(this); +// m_pSystemSettingDlg->onShowWidget(lpGlobalData::instance()->m_level); +// m_pSystemSettingDlg->setWindowTitle(tr("系统参数设置")); +// m_pSystemSettingDlg->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint); +// m_pSystemSettingDlg->setWindowIcon(QIcon(":/image/leaper")); +// m_pSystemSettingDlg->setWindowModality(Qt::ApplicationModal); +// m_pSystemSettingDlg->setAttribute(Qt::WA_ShowModal, true); +// m_pSystemSettingDlg->show(); +// } + if (m_pSystemConfigUI) { - m_pSystemSettingDlg->setParent(this); - m_pSystemSettingDlg->onShowWidget(lpGlobalData::instance()->m_level); - m_pSystemSettingDlg->setWindowTitle(tr("系统参数设置")); - m_pSystemSettingDlg->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint); - m_pSystemSettingDlg->setWindowIcon(QIcon(":/image/leaper")); - m_pSystemSettingDlg->setWindowModality(Qt::ApplicationModal); - m_pSystemSettingDlg->setAttribute(Qt::WA_ShowModal, true); - m_pSystemSettingDlg->show(); + m_pSystemConfigUI->setParent(this); + //m_pSystemConfigUI->onShowWidget(lpGlobalData::instance()->m_level); + m_pSystemConfigUI->setWindowTitle(tr("系统参数设置")); + m_pSystemConfigUI->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint); + m_pSystemConfigUI->setWindowIcon(QIcon(":/image/leaper")); + m_pSystemConfigUI->setWindowModality(Qt::ApplicationModal); + m_pSystemConfigUI->setAttribute(Qt::WA_ShowModal, true); + m_pSystemConfigUI->show(); } } else if ("actioncamSetting" == strObj) { @@ -1119,22 +1139,22 @@ Q_SLOT void lpMainWin::onButtonClicked() if ("btn_start_detect" == strObj)//开始 { //开始检测按钮 - if (DetectState::instance()->IsDetect == false) { + if (lpGlobalConfig::instance()->IsDetect == false) { ui.btn_start_detect->setText(tr("停止检测")); m_pCtrl->onStart(); QString str = tr("按下了开始检测按钮,检测功能开启"); m_pCtrl->addLog(str, emTypeRunState); - DetectState::instance()->bLockDetect = true; + lpGlobalConfig::instance()->bLockDetect = true; } else { m_pCtrl->onFinish(); ui.btn_start_detect->setText(tr("开始检测")); QString str = tr("按下了停止检测按钮,检测功能关闭"); m_pCtrl->addLog(str, emTypeRunState); - DetectState::instance()->bLockDetect = false; + lpGlobalConfig::instance()->bLockDetect = false; } - DetectState::instance()->IsDetect = !DetectState::instance()->IsDetect; + lpGlobalConfig::instance()->IsDetect = !lpGlobalConfig::instance()->IsDetect; } else if ("btn_clear_data" == strObj) {//交班清零 QMessageBox infobox(QMessageBox::Warning, tr("提示"), tr("将清空所有数据"), QMessageBox::Yes | QMessageBox::Cancel, this); @@ -1190,9 +1210,9 @@ void lpMainWin::timerEvent(QTimerEvent *event) } // state if (m_pLbDetectState) { - QString strDetectState = tr("检测状态:") + (DetectState::instance()->IsDetect == true ? tr("检测中...") : tr("未检测...")); + QString strDetectState = tr("检测状态:") + (lpGlobalConfig::instance()->IsDetect == true ? tr("检测中...") : tr("未检测...")); m_pLbDetectState->setText(strDetectState); - if (DetectState::instance()->IsDetect) { + if (lpGlobalConfig::instance()->IsDetect) { m_pLbDetectState->setStyleSheet("font: bold 14px;background-color: green;"); } else { @@ -1229,7 +1249,7 @@ void lpMainWin::SendModelKuTskFun() 发送模板库线程 把已有的所有模板库全部发送至PLC中 */ - DetectState::instance()->m_ThreadWaitTime = 100; + lpGlobalConfig::instance()->m_ThreadWaitTime = 100; const int c_nErrorTime = 3; int nError = 0; QMap*ptr = m_pCtrl->getAllModelMapPtr(); @@ -1241,10 +1261,10 @@ void lpMainWin::SendModelKuTskFun() { IWheelModel *p = ptr->value(lst.at(nIndex)); emit sgTaskSendModels(nIndex + 1, lst.at(nIndex), p->getDiameter(), p->getThickness()); - bool b = this->SendModelLibTask->WaitForSingle(DetectState::instance()->m_ThreadWaitTime); + bool b = this->SendModelLibTask->WaitForSingle(lpGlobalConfig::instance()->m_ThreadWaitTime); if (!b) { nError++; - if (DetectState::instance()->m_PLC_ASK == 1) { + if (lpGlobalConfig::instance()->m_PLC_ASK == 1) { if (nError > c_nErrorTime) { ++nIndex; nError = 0; @@ -1272,7 +1292,7 @@ void lpMainWin::SendTickTskFun() //心跳包发送 if (m_pNet) { - m_pNet->sendPulse(6000, DetectState::instance()->IsDetect, DetectState::instance()->IsOnline); + m_pNet->sendPulse(6000, lpGlobalConfig::instance()->IsDetect, lpGlobalConfig::instance()->IsOnline); //m_TimerID = startTimer(500); } } @@ -1359,7 +1379,7 @@ Q_SLOT void lpMainWin::onClientConnect(QString addr, bool bConnect) QTimer::singleShot(200, this, SLOT(onSendClearLib2PLC())); } - if (bConnect == true && 1 == DetectState::instance()->IsOnline) { + if (bConnect == true && 1 == lpGlobalConfig::instance()->IsOnline) { //m_pUi->onSwitchOnlineModel(m_pState->IsOnline);//在线模式 离线模式切换 } QString strMsg; @@ -1463,7 +1483,7 @@ Q_SLOT void lpMainWin::onTrigRecv(int m_value) { //if (DetectState::instance()->m_CameraTrigeType == 0)//软件触发模式 { - if (DetectState::instance()->IsDetect == true) { + if (lpGlobalConfig::instance()->IsDetect == true) { // if (m_exposureTimeCount != 0) // { // m_pCoreCtrl->ISetExposureTime(m_camKey, m_exposureTimeArray[m_exposureTimeCount]); @@ -1516,7 +1536,7 @@ Q_SLOT void lpMainWin::onPulseTimer() //心跳包发送 if (m_pNet) { - m_pNet->sendPulse(6000, DetectState::instance()->IsDetect, DetectState::instance()->IsOnline); + m_pNet->sendPulse(6000, lpGlobalConfig::instance()->IsDetect, lpGlobalConfig::instance()->IsOnline); //m_TimerID = startTimer(500); } } @@ -1591,7 +1611,7 @@ Q_SLOT void lpMainWin::onTriggerCam() Q_SLOT void lpMainWin::onChangePLCParam() { if (m_pNet) - m_pNet->sendTrigerPara(DetectState::instance()->m_PLC_TrigerFilter, DetectState::instance()->m_PLC_CamTrigDelay, DetectState::instance()->m_PLC_CamTrigPulse, DetectState::instance()->m_PLC_LightDelay, DetectState::instance()->m_PLC_TrigerType, DetectState::instance()->m_PLC_ResHoldTime); + m_pNet->sendTrigerPara(lpGlobalConfig::instance()->m_PLC_TrigerFilter, lpGlobalConfig::instance()->m_PLC_CamTrigDelay, lpGlobalConfig::instance()->m_PLC_CamTrigPulse, lpGlobalConfig::instance()->m_PLC_LightDelay, lpGlobalConfig::instance()->m_PLC_TrigerType, lpGlobalConfig::instance()->m_PLC_ResHoldTime); } void lpMainWin::onInitAbout() @@ -1660,7 +1680,7 @@ void lpMainWin::onShowResult(Result2Ui* pRlt) else scare = scareh; if (pRlt->m_strModel.isEmpty()) { - DetectState::instance()->totalUnDetectNum++; + lpGlobalConfig::instance()->totalUnDetectNum++; QPixmap pix(":/image/none.jpg"); ui.main_lb_res_model_pic->setPixmap(pix.scaled(scare - 15, scare - 15)); @@ -1687,7 +1707,7 @@ void lpMainWin::onShowResult(Result2Ui* pRlt) emit m_pTableCheck->sgValueChange(pModel->getModelID()); } } - DetectState::instance()->totalDetectNum++; + lpGlobalConfig::instance()->totalDetectNum++; //show // ui.main_lb_res_ng_num->setText(QString::number(DetectState::instance()->totalUnDetectNum)); @@ -1734,7 +1754,7 @@ void lpMainWin::SendResultChannel2PLC(Result2Ui* m_Res) qDebug() << "SendResultChannel2PLC"; CChannelInfo *pChannelInfo = m_pCtrl->getChannelInfo(); ChannelInfo *npInfo = pChannelInfo->getChannelInfo(m_Res->m_strModel); - if (npInfo && DetectState::instance()->m_bObjAll2A == false) { + if (npInfo && lpGlobalConfig::instance()->m_bObjAll2A == false) { if (m_pNet) m_pNet->sendResultChannel(npInfo->m_value, m_Res->m_dDiameter, m_Res->m_dThickness, m_Res->m_strModel); emit(sgShowChannelRes(npInfo->m_ChannelName)); @@ -1800,11 +1820,11 @@ void lpMainWin::saveImage(Result2Ui* pRes) QString curExposureTimeStr = QString::number(getCurExposureTime()); QDir testDir; - bool IsTestDir = testDir.exists(DetectState::instance()->m_SaveImgDirPath); + bool IsTestDir = testDir.exists(lpGlobalConfig::instance()->m_SaveImgDirPath); if (!IsTestDir) - DetectState::instance()->m_SaveImgDirPath = DetectState::instance()->m_applicationDirPath; + lpGlobalConfig::instance()->m_SaveImgDirPath = lpGlobalConfig::instance()->m_applicationDirPath; - QString baseSavePath = DetectState::instance()->m_SaveImgDirPath + "\\Data\\"; + QString baseSavePath = lpGlobalConfig::instance()->m_SaveImgDirPath + "\\Data\\"; IsTestDir = testDir.exists(baseSavePath); if (!IsTestDir) testDir.mkpath(baseSavePath); @@ -1817,7 +1837,7 @@ void lpMainWin::saveImage(Result2Ui* pRes) QString goodsourceDir = fileSavePath + "\\Good"; filename += QString("_%1_%2_").arg((int)pRes->m_dThickness).arg((int)pRes->m_dDiameter); filename += QDateTime::currentDateTime().toString("hhmmsszzz"); - if (DetectState::instance()->saveGood == 1) { + if (lpGlobalConfig::instance()->saveGood == 1) { goodsourceDir += "\\Source"; goodsourceDir += "\\"; goodsourceDir += pRes->m_strModel; @@ -1825,7 +1845,7 @@ void lpMainWin::saveImage(Result2Ui* pRes) saveImage(pRes->m_pixSrc, goodsourceDir + "\\", filename + ".png"); } QString goodtargetDir = fileSavePath + "\\Good"; - if (DetectState::instance()->saveCutGood == 1) { + if (lpGlobalConfig::instance()->saveCutGood == 1) { goodtargetDir += "\\Target"; goodtargetDir += "\\"; goodtargetDir += pRes->m_strModel; @@ -1839,13 +1859,13 @@ void lpMainWin::saveImage(Result2Ui* pRes) filename += QString("_%1_%2_").arg((int)pRes->m_dThickness).arg((int)pRes->m_dDiameter); filename += QDateTime::currentDateTime().toString("hhmmsszzz"); filename = filename + "_" + curExposureTimeStr; - if (DetectState::instance()->saveBad == 1) { + if (lpGlobalConfig::instance()->saveBad == 1) { errorSourceDir += "\\Source"; QString resultpath = errorSourceDir + "\\" + filename + ".png"; saveImage(pRes->m_pixSrc, errorSourceDir + "\\", filename + ".png"); } QString errortargetDir = fileSavePath + "\\Error"; - if (DetectState::instance()->saveCutBad == 1) { + if (lpGlobalConfig::instance()->saveCutBad == 1) { errortargetDir += "\\Target"; QString resultpath = errortargetDir + "\\" + filename + "Res.png"; if (pRes->m_pixResult.isNull()) @@ -1995,11 +2015,11 @@ void lpMainWin::onSaveValveResult(ValueResult &rlt) { QString strModeName = rlt.strModel;//型号名 QDir testDir; - bool IsTestDir = testDir.exists(DetectState::instance()->m_SaveImgDirPath); + bool IsTestDir = testDir.exists(lpGlobalConfig::instance()->m_SaveImgDirPath); if (!IsTestDir) - DetectState::instance()->m_SaveImgDirPath = DetectState::instance()->m_applicationDirPath; + lpGlobalConfig::instance()->m_SaveImgDirPath = lpGlobalConfig::instance()->m_applicationDirPath; - QString baseSavePath = DetectState::instance()->m_SaveImgDirPath + "\\Data\\"; + QString baseSavePath = lpGlobalConfig::instance()->m_SaveImgDirPath + "\\Data\\"; IsTestDir = testDir.exists(baseSavePath); if (!IsTestDir) testDir.mkpath(baseSavePath); @@ -2047,11 +2067,11 @@ void lpMainWin::saveValveImage(QImage image, QString strName) QPixmap pixmap = QPixmap::fromImage(image); QDir testDir; - bool IsTestDir = testDir.exists(DetectState::instance()->m_SaveImgDirPath); + bool IsTestDir = testDir.exists(lpGlobalConfig::instance()->m_SaveImgDirPath); if (!IsTestDir) - DetectState::instance()->m_SaveImgDirPath = DetectState::instance()->m_applicationDirPath; + lpGlobalConfig::instance()->m_SaveImgDirPath = lpGlobalConfig::instance()->m_applicationDirPath; - QString baseSavePath = DetectState::instance()->m_SaveImgDirPath + "\\Data\\"; + QString baseSavePath = lpGlobalConfig::instance()->m_SaveImgDirPath + "\\Data\\"; IsTestDir = testDir.exists(baseSavePath); if (!IsTestDir) testDir.mkpath(baseSavePath); diff --git a/tpvs17/tpMain/lpMainWin.h b/tpvs17/tpMain/lpMainWin.h index d3c8b36..cec6c43 100644 --- a/tpvs17/tpMain/lpMainWin.h +++ b/tpvs17/tpMain/lpMainWin.h @@ -9,7 +9,7 @@ #include "QTranslator" #include "QTimer" #include "qmythread.h" -#include "DetectState.h" +#include "lpGlobalConfig.h" #include "WheelNet.h" #include "ModelTableView.h" #include "QModelMgrDlg.h" @@ -27,6 +27,7 @@ #include "lpdesigner.h" #include "lpImageCaliUI.h" #include "QPLCDevice.h" +#include "lpSystemConfigUI.h" class lpMainWin : public QMainWindow { @@ -165,8 +166,8 @@ private: class QLabel* m_pLbDetectState{ nullptr };//显示检测状态 class QLabel *m_pLbUser{ nullptr };//显示登陆用户信息 private: - CDllCoreCtrl* m_pDllCoreCtrl{ nullptr }; - ICoreCtrl* m_pCoreCtrl{ nullptr }; + CDllCoreCtrl* m_pDllCoreCtrl{ nullptr }; + ICoreCtrl* m_pCoreCtrl{ nullptr }; private: class IWheelCtrl *m_pCtrl{ nullptr }; @@ -198,7 +199,8 @@ private: QWidget m_aboutDlg;//关于 QTimeMgrDlg* m_pTimerMgrDlg{ nullptr }; QPixmapListBar* m_pixMapList{ nullptr };//展示历史检测结果 - QSystemSettingDlg* m_pSystemSettingDlg{ nullptr }; + //QSystemSettingDlg* m_pSystemSettingDlg{ nullptr }; + lpSystemConfigUI* m_pSystemConfigUI{ nullptr }; QCamSettingDlg* m_CamSettingDlg{ nullptr }; lpImageCaliUI* m_pImageCaliUI{ nullptr }; diff --git a/tpvs17/tpMain/lpSystemConfigUI.cpp b/tpvs17/tpMain/lpSystemConfigUI.cpp new file mode 100644 index 0000000..53eee9e --- /dev/null +++ b/tpvs17/tpMain/lpSystemConfigUI.cpp @@ -0,0 +1,42 @@ +#include "lpSystemConfigUI.h" +#include "lpGlobalConfig.h" + +lpSystemConfigUI::lpSystemConfigUI(QWidget *parent) + : QWidget(parent) +{ + ui.setupUi(this); + connect(ui.m_pbApply, SIGNAL(clicked()), this, SLOT(onButtonClicked())); + connect(ui.m_pbExit, SIGNAL(clicked()), this, SLOT(onButtonClicked())); + connect(ui.m_pbSetPath, SIGNAL(clicked()), this, SLOT(onButtonClicked())); + +} + +lpSystemConfigUI::~lpSystemConfigUI() +{ + +} + +Q_SLOT void lpSystemConfigUI::onButtonClicked() +{ + QString strObj = sender()->objectName(); + if (strObj == "m_pbApply") { + + } + else if (strObj == "m_pbExit") { + + } + else if (strObj == "m_pbSetPath") { + + } +} + +void lpSystemConfigUI::showEvent(QShowEvent *event) +{ + ui.checkBox_saveNGCutImg->setChecked(lpGlobalConfig::instance()->bSaveCutNGImg);//ʶ + ui.checkBox_saveOKCutImg->setChecked(lpGlobalConfig::instance()->bSaveCutOKImg);//ʶ + ui.checkBox_saveNGSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcNGImg);//ʶ + ui.checkBox_saveOKSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcOKImg);//ʶ + ui.checkBox_saveValue_OKSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcOKImg_value);//λ + ui.checkBox_saveValue_NGSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcNGImg_value);//λ +} + diff --git a/tpvs17/tpMain/lpSystemConfigUI.h b/tpvs17/tpMain/lpSystemConfigUI.h new file mode 100644 index 0000000..b5249bf --- /dev/null +++ b/tpvs17/tpMain/lpSystemConfigUI.h @@ -0,0 +1,21 @@ +#ifndef _LPSYSTEMCONFIG_H_ +#define _LPSYSTEMCONFIG_H_ + +#include +#include "ui_lpSystemConfigUI.h" + +class lpSystemConfigUI : public QWidget +{ + Q_OBJECT + +public: + lpSystemConfigUI(QWidget *parent = Q_NULLPTR); + ~lpSystemConfigUI(); +protected: + Q_SLOT void onButtonClicked(); + virtual void showEvent(QShowEvent *event); +private: + Ui::lpSystemConfigUI ui; +}; + +#endif diff --git a/tpvs17/tpMain/lpSystemConfigUI.ui b/tpvs17/tpMain/lpSystemConfigUI.ui new file mode 100644 index 0000000..8380194 --- /dev/null +++ b/tpvs17/tpMain/lpSystemConfigUI.ui @@ -0,0 +1,255 @@ + + + lpSystemConfigUI + + + + 0 + 0 + 538 + 459 + + + + lpSystemConfigUI + + + + + + + 12 + + + + true + + + + + 0 + 0 + 518 + 407 + + + + + + + 系统语言设置: + + + + + + + + 语言 + + + + + + + + 中文 + + + + + English + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 图像保存相关: + + + + + + 是否保存识别NG抠图 + + + + + + + 是否保存识别OK抠图 + + + + + + + 是否保存识别NG原始图 + + + + + + + 是否保存识别OK原始图 + + + + + + + 是否保存定位NG原始图 + + + + + + + 是否保存定位OK原始图 + + + + + + + + + 图像存储路径: + + + + + + + + + + 设置 + + + + + + + + + + + + 通讯配置: + + + + + + + + TCP服务端口: + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 12 + + + + 应用 + + + + + + + + 12 + + + + 退出 + + + + + + + + + + + diff --git a/tpvs17/tpMain/tpMain.vcxproj b/tpvs17/tpMain/tpMain.vcxproj index 69c06d2..34325ed 100644 --- a/tpvs17/tpMain/tpMain.vcxproj +++ b/tpvs17/tpMain/tpMain.vcxproj @@ -27,7 +27,7 @@ - + @@ -103,6 +103,9 @@ true + + true + true @@ -253,6 +256,9 @@ true + + true + true @@ -364,6 +370,7 @@ + @@ -374,6 +381,16 @@ + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DTPMAIN_LIB -DTPMAIN_EXPORTS -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_PRINTSUPPORT_LIB -DQT_NETWORK_LIB -DQT_SERIALPORT_LIB -D_WINDOWS -D%(PreprocessorDefinitions) "-I." "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\ActiveQt" "-I$(QTDIR)\include\QtSerialPort" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtPrintSupport" "-I$(QTDIR)\include\QtSql" "-I$(QTDIR)\include\QtNetwork" "-I.\..\..\src\algorithm" "-I.\..\..\src\tpMain" "-I.\..\..\src\tpMain\thread" "-I.\..\..\src\tpMain\splashScreen" "-I.\..\..\src\tpMain\LightBoxwidget" "-I.\..\..\src\tpMain\QDiskCleanThread" "-I.\..\..\src\tpMain\QPixmapListBar" "-I.\..\..\src\userCtrl" "-I.\..\..\src\NetWheel" "-I.\..\..\src\RasterSDG20" "-I.\..\..\src\ReportModel" "-I.\..\..\3part\libzkq\include" "-I.\..\..\3part\tadpole\include\tpBase" "-I.\..\..\3part\opencv3.4.1\include" "-I.\..\..\3part\opencv3.4.1\include\opencv" "-I.\..\..\3part\opencv3.4.1\include\opencv2" "-I.\..\..\3part\edcircle\include" "-I.\..\..\3part\lpCoreCtrl\include" "-I.\..\..\src\tpMain\algela" "-I.\..\..\src\ImageCompare" "-I.\..\..\src\interface" "-I.\lpRawTcp" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DTPMAIN_LIB -DTPMAIN_EXPORTS -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_PRINTSUPPORT_LIB -DQT_NETWORK_LIB -DQT_SERIALPORT_LIB -D%(PreprocessorDefinitions) "-I." "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\ActiveQt" "-I$(QTDIR)\include\QtSerialPort" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtPrintSupport" "-I$(QTDIR)\include\QtSql" "-I$(QTDIR)\include\QtNetwork" "-I.\..\..\src\algorithm" "-I.\..\..\src\tpMain" "-I.\..\..\src\tpMain\thread" "-I.\..\..\src\tpMain\splashScreen" "-I.\..\..\src\tpMain\LightBoxwidget" "-I.\..\..\src\tpMain\QDiskCleanThread" "-I.\..\..\src\tpMain\QPixmapListBar" "-I.\..\..\src\userCtrl" "-I.\..\..\src\NetWheel" "-I.\..\..\src\RasterSDG20" "-I.\..\..\src\ReportModel" "-I.\..\..\3part\libzkq\include" "-I.\..\..\3part\tadpole\include\tpBase" "-I.\..\..\3part\opencv3.4.1\include" "-I.\..\..\3part\opencv3.4.1\include\opencv" "-I.\..\..\3part\opencv3.4.1\include\opencv2" "-I.\..\..\3part\lpCoreCtrl\include" "-I.\..\..\src\tpMain\algela" "-I.\..\..\src\ImageCompare" "-I.\..\..\src\interface" "-I.\..\..\3part\edcircle\include" + $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing %(Identity)... @@ -486,6 +503,7 @@ + @@ -813,7 +831,7 @@ .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DTPMAIN_LIB -DTPMAIN_EXPORTS -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_PRINTSUPPORT_LIB -DQT_NETWORK_LIB -DQT_SERIALPORT_LIB -D%(PreprocessorDefinitions) "-I." "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\ActiveQt" "-I$(QTDIR)\include\QtSerialPort" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtPrintSupport" "-I$(QTDIR)\include\QtSql" "-I$(QTDIR)\include\QtNetwork" "-I.\..\..\src\algorithm" "-I.\..\..\src\tpMain" "-I.\..\..\src\tpMain\thread" "-I.\..\..\src\tpMain\splashScreen" "-I.\..\..\src\tpMain\LightBoxwidget" "-I.\..\..\src\tpMain\QDiskCleanThread" "-I.\..\..\src\tpMain\QPixmapListBar" "-I.\..\..\src\userCtrl" "-I.\..\..\src\NetWheel" "-I.\..\..\src\RasterSDG20" "-I.\..\..\src\ReportModel" "-I.\..\..\3part\libzkq\include" "-I.\..\..\3part\tadpole\include\tpBase" "-I.\..\..\3part\opencv3.4.1\include" "-I.\..\..\3part\opencv3.4.1\include\opencv" "-I.\..\..\3part\opencv3.4.1\include\opencv2" "-I.\..\..\3part\lpCoreCtrl\include" "-I.\..\..\src\tpMain\algela" "-I.\..\..\src\ImageCompare" "-I.\..\..\src\interface" "-I.\..\..\3part\edcircle\include" - + @@ -1370,6 +1388,16 @@ + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + {A229CF5C-81EF-4909-AB6E-49C746F1ED4C} diff --git a/tpvs17/tpMain/tpMain.vcxproj.filters b/tpvs17/tpMain/tpMain.vcxproj.filters index 226b7ba..59cd386 100644 --- a/tpvs17/tpMain/tpMain.vcxproj.filters +++ b/tpvs17/tpMain/tpMain.vcxproj.filters @@ -163,9 +163,6 @@ Generated Files\Release - - Source Files - Source Files @@ -589,6 +586,18 @@ Source Files + + Generated Files\Debug + + + Generated Files\Release + + + Source Files + + + Source Files + @@ -606,9 +615,6 @@ Header Files - - Header Files - Header Files @@ -738,6 +744,12 @@ Generated Files + + Generated Files + + + Header Files + @@ -944,6 +956,12 @@ Form Files + + Header Files + + + Form Files +