diff --git a/runner17/Enchanter.exe b/runner17/Enchanter.exe new file mode 100644 index 0000000..2416ac1 Binary files /dev/null and b/runner17/Enchanter.exe differ diff --git a/runner17/QUserInfo.dll b/runner17/QUserInfo.dll new file mode 100644 index 0000000..fa02146 Binary files /dev/null and b/runner17/QUserInfo.dll differ diff --git a/runner17/Reportd.exe b/runner17/Reportd.exe deleted file mode 100644 index dfcb965..0000000 Binary files a/runner17/Reportd.exe and /dev/null differ diff --git a/runner17/language/English/lpmain_en.qm b/runner17/language/English/lpmain_en.qm new file mode 100644 index 0000000..eaad2f5 Binary files /dev/null and b/runner17/language/English/lpmain_en.qm differ diff --git a/runner17/lpCoreCtrl.dll b/runner17/lpCoreCtrl.dll new file mode 100644 index 0000000..dc89c80 Binary files /dev/null and b/runner17/lpCoreCtrl.dll differ diff --git a/runner17/tpCam_100.dll b/runner17/tpCam_100.dll new file mode 100644 index 0000000..871a661 Binary files /dev/null and b/runner17/tpCam_100.dll differ diff --git a/runner17/tpCam_120.dll b/runner17/tpCam_120.dll new file mode 100644 index 0000000..811f96d Binary files /dev/null and b/runner17/tpCam_120.dll differ diff --git a/runner17/tpCam_120d.dll b/runner17/tpCam_120d.dll new file mode 100644 index 0000000..bbc7d30 Binary files /dev/null and b/runner17/tpCam_120d.dll differ diff --git a/runner17/tpCam_140.dll b/runner17/tpCam_140.dll new file mode 100644 index 0000000..1ce9256 Binary files /dev/null and b/runner17/tpCam_140.dll differ diff --git a/runner17/tpCam_140d.dll b/runner17/tpCam_140d.dll new file mode 100644 index 0000000..8ff97d5 Binary files /dev/null and b/runner17/tpCam_140d.dll differ diff --git a/runner17/tpCam_160.dll b/runner17/tpCam_160.dll new file mode 100644 index 0000000..92166fa Binary files /dev/null and b/runner17/tpCam_160.dll differ diff --git a/runner17/tpCam_160d.dll b/runner17/tpCam_160d.dll new file mode 100644 index 0000000..4ffb7cd Binary files /dev/null and b/runner17/tpCam_160d.dll differ diff --git a/tpvs17/tpAlgorithmQt/tpAlgorithmQt.vcxproj b/tpvs17/tpAlgorithmQt/tpAlgorithmQt.vcxproj index eb4838a..8f75d11 100644 --- a/tpvs17/tpAlgorithmQt/tpAlgorithmQt.vcxproj +++ b/tpvs17/tpAlgorithmQt/tpAlgorithmQt.vcxproj @@ -82,10 +82,10 @@ Windows - $(SolutionDir)..\runner13\$(TargetName)$(TargetExt) - $(QTDIR)\lib;..\..\..\lpOpenCV\openCV2.4.9\build\x86\vc12\lib;$(OutDir);%(AdditionalLibraryDirectories) + $(SolutionDir)..\runner17\$(TargetName)$(TargetExt) + $(QTDIR)\lib;$(OutDir);..\..\3part\opencv3.4.1\x64\vc15\lib;..\..\3part\Cyclops\lib;..\..\3part\edcircle\lib;%(AdditionalLibraryDirectories) true - qtmain.lib;Qt5Core.lib;Qt5Gui.lib;opencv_core249.lib;opencv_imgproc249.lib;opencv_highgui249.lib;opencv_features2d249.lib;Cyclops.lib;luffy.lib;opencv_calib3d249.lib;%(AdditionalDependencies) + qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Cyclops.lib;luffy.lib;opencv_world341.lib;EDCircle.lib;%(AdditionalDependencies) true diff --git a/tpvs17/tpMain/QSystemSettingDlg.cpp b/tpvs17/tpMain/QSystemSettingDlg.cpp index 418e004..a3e97fe 100644 --- a/tpvs17/tpMain/QSystemSettingDlg.cpp +++ b/tpvs17/tpMain/QSystemSettingDlg.cpp @@ -940,6 +940,8 @@ Q_SLOT void QSystemSettingDlg::oncurrentChanged(const QString &str) { QString strObjName = sender()->objectName(); if ("m_Language" == strObjName) { + + emit sgChangeLanguage(str); //emit(sgGenalData("languageSeting", str)); } } diff --git a/tpvs17/tpMain/QSystemSettingDlg.h b/tpvs17/tpMain/QSystemSettingDlg.h index ba12496..10d1781 100644 --- a/tpvs17/tpMain/QSystemSettingDlg.h +++ b/tpvs17/tpMain/QSystemSettingDlg.h @@ -1,4 +1,4 @@ -#ifndef _H_QSYSTEMSETTINGUI_H_ +#ifndef _H_QSYSTEMSETTINGUI_H_ #define _H_QSYSTEMSETTINGUI_H_ #include @@ -17,6 +17,8 @@ public: ~QSystemSettingDlg(); void onShowWidget(int level); +signals: + void sgChangeLanguage(QString strLanguage); private: bool InitTreeWidget(QTreeWidget* pTreewidget); void addComRoot(class QTreeWidget *pTreewidget, QString strName /*= QString()*/); diff --git a/tpvs17/tpMain/QTimeMgrDlg.h b/tpvs17/tpMain/QTimeMgrDlg.h index 9437f4b..2f3c934 100644 --- a/tpvs17/tpMain/QTimeMgrDlg.h +++ b/tpvs17/tpMain/QTimeMgrDlg.h @@ -1,4 +1,4 @@ -#ifndef _H_QTIMEMGRDLG_H_ +#ifndef _H_QTIMEMGRDLG_H_ #define _H_QTIMEMGRDLG_H_ #include @@ -6,7 +6,7 @@ #include "InfoFile.h" #include "IWheelCtrl.h" class TimeMgrCtrl; -/*°à´Î¹ÜÀí´°¿ÚÒ³Ãæ*/ +/*ç�­æ¬¡ç®¡ç�†çª—å�£é¡µé�¢*/ class QTimeMgrDlg : public QDialog { Q_OBJECT diff --git a/tpvs17/tpMain/lpMainWin.cpp b/tpvs17/tpMain/lpMainWin.cpp index 8b03bf7..d46e34c 100644 --- a/tpvs17/tpMain/lpMainWin.cpp +++ b/tpvs17/tpMain/lpMainWin.cpp @@ -78,8 +78,8 @@ lpMainWin::lpMainWin(QWidget *parent) } {//加载语言设置 QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); - QString strLangeage = languageSetting.value("language", "Chinese").toString(); - SetLanguage(strLangeage); + QString strLanguage = languageSetting.value("language", "Chinese").toString(); + SetLanguage(strLanguage); } { m_pLbCurrentTime = new QLabel(tr("系统时间")); @@ -138,6 +138,7 @@ lpMainWin::lpMainWin(QWidget *parent) m_pSystemSettingDlg = new QSystemSettingDlg();//系统设置 m_CamSettingDlg = new QCamSettingDlg(); m_CamSettingDlg->setCoreCtrlPtr(m_pCoreCtrl); + connect(m_pSystemSettingDlg, SIGNAL(sgChangeLanguage(QString)), this, SLOT(onLanguageChange(QString))); m_pixMapList = new QPixmapListBar(ui.tp_main_tabWidget); ui.tp_main_tabWidget->insertTab(0, m_pixMapList, tr("历å�²")); @@ -1240,6 +1241,13 @@ void lpMainWin::onInitAbout() //m_lightBox->setLayout(lbLayout); } +Q_SLOT void lpMainWin::onLanguageChange(QString strLanguage) +{ + QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); + languageSetting.setValue("language", strLanguage); + SetLanguage(strLanguage); +} + void lpMainWin::onShowResult(Result2Ui* pRlt) { if (!pRlt) diff --git a/tpvs17/tpMain/lpMainWin.h b/tpvs17/tpMain/lpMainWin.h index 800812a..a3cdfda 100644 --- a/tpvs17/tpMain/lpMainWin.h +++ b/tpvs17/tpMain/lpMainWin.h @@ -1,4 +1,4 @@ -#ifndef _H_LPMAINWIN_H_ +#ifndef _H_LPMAINWIN_H_ #define _H_LPMAINWIN_H_ #include @@ -30,11 +30,11 @@ public: lpMainWin(QWidget *parent = Q_NULLPTR); ~lpMainWin(); - //½ÓÊÕͼÏñ»Øµ÷º¯Êý + //接收图åƒ�回调函数 void INewCameraImage(const QString& camKey, QImage img); - //½ÓÊÕËã·¨¼ì²â½á¹û»Øµ÷º¯Êý + //接收算法检测结果回调函数 void IVariantMapToUI(const QString& camKey, const QVariantMap& vMap); - //´«ÊäËã·¨²ÎÊý»Øµ÷º¯Êý + //传输算法å�‚数回调函数 QVariant IGetVariantById(int id); signals: void sgTaskSendModels(int nIndex, QString strModel, double dDiameter, double dHeight); @@ -69,9 +69,9 @@ private: protected: bool onInitCoreCtrl(); - void loadUserModel();//¼ÓÔØÓû§¹ÜÀíÄ£¿é + void loadUserModel();//加载用户管ç�†æ¨¡å�— - //¹ú¼Ê»¯ + //国际化 void SearchQmFile(const QString & strDir); void SetTranslator(const QString strPath); void SetLanguage(QString strLangage); @@ -80,7 +80,7 @@ protected: void SendTickTskFun(); void onSetModel(); - Q_SLOT void onUpdateDefect();//¹´Ñ¡ ¸üнçÃæÏÔʾ´°¿Ú + Q_SLOT void onUpdateDefect();//勾选 更新界é�¢æ˜¾ç¤ºçª—å�£ //net slot Q_SLOT void onTcpConnet(QString str, bool bConnect); Q_SLOT void onClientConnect(QString addr, bool bConnect); @@ -108,8 +108,10 @@ protected: Q_SLOT void onTriggerCam(); void onInitAbout(); + + Q_SLOT void onLanguageChange(QString strLanguage); private: - void onShowResult(Result2Ui* pRlt);//չʾʶ±ð½á¹û + void onShowResult(Result2Ui* pRlt);//展示识别结果 void SendResultBee(emTypeBee m_Type, int num); void SendResultStr2PLC(Result2Ui* m_Res); @@ -131,12 +133,12 @@ private: class QLabel* main_showWorkLabel{ nullptr }; class ModelsView *m_pTableCheck{ nullptr }; - RoiImgViewer *m_ImgViewer{ nullptr };//չʾ¼ì²âͼÏñ -/*status ״̬À¸*/ - class QLabel* m_pLbCurrentTime{ nullptr };//ÏÔʾϵͳʱ¼ä - class QLabel* m_pLbBanci{ nullptr };//ÏÔʾ°à´Î - class QLabel* m_pLbDetectState{ nullptr };//ÏÔʾ¼ì²â״̬ - class QLabel *m_pLbUser{ nullptr };//ÏÔʾµÇ½Óû§ÐÅÏ¢ + RoiImgViewer *m_ImgViewer{ nullptr };//展示检测图åƒ� +/*status 状æ€�æ �*/ + class QLabel* m_pLbCurrentTime{ nullptr };//显示系统时间 + class QLabel* m_pLbBanci{ nullptr };//显示ç�­æ¬¡ + class QLabel* m_pLbDetectState{ nullptr };//显示检测状æ€� + class QLabel *m_pLbUser{ nullptr };//显示登陆用户信æ�¯ private: CDllCoreCtrl* m_pDllCoreCtrl{ nullptr }; ICoreCtrl* m_pCoreCtrl{ nullptr }; @@ -158,27 +160,27 @@ private: QThread *pTickThread{ nullptr }; int m_nWfThress{ 0 }; - int m_TimerID{ 0 };//ÐÄÌø°ü¶¨Ê±Æ÷ ÓÃÓڼǼ³¬Ê± + int m_TimerID{ 0 };//心跳包定时器 用于记录超时 int m_TimerOutCount{ 0 }; int m_RestartServerCount{ 0 }; QStringList forDefectList; - int m_nDiffTrigNum{ 0 };//´¥·¢´ÎÊý ÓÃÓÚÅжÏÏà»úÊÇ·ñÕý³£´ò¿ª + int m_nDiffTrigNum{ 0 };//触å�‘次数 用于判断相机是å�¦æ­£å¸¸æ‰“å¼€ - //Ä£°å¹ÜÀíÒ³Ãæ + //模æ�¿ç®¡ç�†é¡µé�¢ QModelMgrDlg *m_pModelMgrDlg{ nullptr }; QDebugDlg* m_pDebugDlg{ nullptr }; - QWidget m_aboutDlg;//¹ØÓÚ + QWidget m_aboutDlg;//关于 QTimeMgrDlg* m_pTimerMgrDlg{ nullptr }; - QPixmapListBar* m_pixMapList{ nullptr };//չʾÀúÊ·¼ì²â½á¹û + QPixmapListBar* m_pixMapList{ nullptr };//展示历å�²æ£€æµ‹ç»“æžœ QSystemSettingDlg* m_pSystemSettingDlg{ nullptr }; QCamSettingDlg* m_CamSettingDlg{ nullptr }; private: - IUserCtrl *m_pUserCtrl{ nullptr };//Óû§¹ÜÀíÄ£¿é + IUserCtrl *m_pUserCtrl{ nullptr };//用户管ç�†æ¨¡å�— - QVector m_VecTranPtr;//¹ú¼Ê»¯ÓïÑÔ°ü¹ÜÀí + QVector m_VecTranPtr;//国际化语言包管ç�† - int m_timerID{ 0 };//¶¨Ê±Æ÷ ¸üÐÂ״̬À¸ÐÅÏ¢ + int m_timerID{ 0 };//定时器 更新状æ€�æ �ä¿¡æ�¯ }; #endif diff --git a/tpvs17/tpMain/tpMain.vcxproj b/tpvs17/tpMain/tpMain.vcxproj index 964effc..c5e2f93 100644 --- a/tpvs17/tpMain/tpMain.vcxproj +++ b/tpvs17/tpMain/tpMain.vcxproj @@ -1358,7 +1358,7 @@ Console - $(SolutionDir)..\runner13\$(TargetName)$(TargetExt) + $(SolutionDir)..\runner17\$(TargetName)$(TargetExt) $(QTDIR)\lib;$(OutDir);..\..\3part\opencv3.4.1\x64\vc15\lib;..\..\3part\Cyclops\lib;..\..\3part\libzkq\lib;%(AdditionalLibraryDirectories) true qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5AxContainer.lib;Qt5AxBase.lib;Qt5Sql.lib;Qt5PrintSupport.lib;Qt5Network.lib;Qt5SerialPort.lib;libzkq.lib;luffy.lib;Cyclops.lib;opencv_world341.lib;%(AdditionalDependencies)