diff --git a/.gitignore b/.gitignore
index 4d5735b..dc7369e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,3 +39,40 @@ tpvs17/QUserInfo/x64/
tpvs17/EDCircle_test/
tpvs17/RasterSDG20/
tpvs17/algorithm/x64/
+runner17/algorithmLib/caliCenterd.ilk
+runner17/algorithmLib/valveDetectord.ilk
+runner17/lpMaind.ilk
+runner17/lpbengined.ilk
+runner17/lpdesignerd.ilk
+runner17/user/globalConfig.json
+tpvs17/caliCenter/x64/Debug/algEg.obj
+tpvs17/caliCenter/x64/Debug/caliCenter.obj
+tpvs17/caliCenter/x64/Debug/caliCenter.tlog/caliCenter.write.1u.tlog
+tpvs17/caliCenter/x64/Debug/caliCenter.tlog/link.read.1.tlog
+tpvs17/caliValve/x64/Debug/algEg.obj
+tpvs17/caliValve/x64/Debug/caliValve.obj
+tpvs17/caliValve/x64/Debug/caliValve.tlog/caliValve.write.1u.tlog
+tpvs17/caliValve/x64/Debug/caliValve.tlog/link.read.1.tlog
+tpvs17/caliValve/x64/Debug/vc141.pdb
+runner17/dbLog.db
+tpvs17/caliCenter/x64/
+release/runner17_twoStation/
+runner17/DBFiles/
+tpvs17/caliValve/x64/
+tpvs17/lpCoreCtrl/x64/
+tpvs17/tpCamVirtual/x64/
+runner17/lpdesigner.ilk
+runner17/tpAlgorithm.ilk
+runner17/tpCam_100.ilk
+runner17/tpCam_120.ilk
+runner17/tpCam_140.ilk
+runner17/tpCam_160.ilk
+runner17/user/StandImage_1.jpg
+runner17/QUserInfod.ilk
+runner17/lpMain.ilk
+runner17/lpbengine.ilk
+runner17/lpCoreCtrl.ilk
+runner17/algorithmLib/valveDetector.map
+tpvs17/Report/x64/
+tpvs17/Report/GeneratedFiles/
+runner17/Reportd.ilk
diff --git a/release/气门芯定位检测更新内容.txt b/release/气门芯定位检测更新内容.txt
index e0a7dc8..e38ad97 100644
--- a/release/气门芯定位检测更新内容.txt
+++ b/release/气门芯定位检测更新内容.txt
@@ -11,4 +11,18 @@
3、UI布局调整
2021-10-18 3
-1、修复串口不能正常打开问题
\ No newline at end of file
+1、修复串口不能正常打开问题
+
+2021-10-18 4
+1、修复图像在没有标定的情况下不能保存的问题
+2、模板管理UI页面增加图像显示
+3、算法结构图中增加圆心坐标打印
+4、修复查询结果工具不显示图片问题
+
+2021-10-18 5
+1、优化主界面图像显示逻辑,支持缩放
+
+2021-10-19
+1、增加中英翻译切换
+2、增加权限管理 只对系统参数设置和测试菜单进行保护
+3、增加翻译文件
\ No newline at end of file
diff --git a/runner17/Report.exe b/runner17/Report.exe
index 756a089..c9bdc0e 100644
Binary files a/runner17/Report.exe and b/runner17/Report.exe differ
diff --git a/runner17/Reportd.exe b/runner17/Reportd.exe
new file mode 100644
index 0000000..439d51d
Binary files /dev/null and b/runner17/Reportd.exe differ
diff --git a/runner17/algorithmLib/valveDetectord.dll b/runner17/algorithmLib/valveDetectord.dll
index 9d76a6e..1b19fb3 100644
Binary files a/runner17/algorithmLib/valveDetectord.dll and b/runner17/algorithmLib/valveDetectord.dll differ
diff --git a/runner17/language/English/lpmain_en.qm b/runner17/language/English/lpmain_en.qm
index f998137..b9dbe5b 100644
Binary files a/runner17/language/English/lpmain_en.qm and b/runner17/language/English/lpmain_en.qm differ
diff --git a/runner17/language/English/lpreport_en.qm b/runner17/language/English/lpreport_en.qm
deleted file mode 100644
index 8f170a6..0000000
Binary files a/runner17/language/English/lpreport_en.qm and /dev/null differ
diff --git a/runner17/lpMain.dll b/runner17/lpMain.dll
index dc68e8c..7d51412 100644
Binary files a/runner17/lpMain.dll and b/runner17/lpMain.dll differ
diff --git a/runner17/lpMaind.dll b/runner17/lpMaind.dll
index 9b39163..6f72e54 100644
Binary files a/runner17/lpMaind.dll and b/runner17/lpMaind.dll differ
diff --git a/runner17/showImg.ini b/runner17/showImg.ini
index 85ec52b..821f6e3 100644
--- a/runner17/showImg.ini
+++ b/runner17/showImg.ini
@@ -3,3 +3,5 @@ Scale_Stand=0.28294005293337054
Scale_Standard=0.2663824433072367
Scale_Standard_1=0.1829515775204701
Scale_Standard_2=0.2032795305783001
+ScaleA=0.22807097164814868
+ScaleB=0.23141863221833192
diff --git a/runner17/user/systemConfig.ini b/runner17/user/systemConfig.ini
index c6c4ed0..c6cdd28 100644
--- a/runner17/user/systemConfig.ini
+++ b/runner17/user/systemConfig.ini
@@ -16,7 +16,7 @@ Enable_SrcImg=true
FilterTime=10
[Image]
-SrcImgSave_st1=true
-SrcImgSave_st2=true
-RltImgSave_st1=true
-RltImgSave_st2=true
+SrcImgSave_st1=false
+SrcImgSave_st2=false
+RltImgSave_st1=false
+RltImgSave_st2=false
diff --git a/tpvs17/Report/main.cpp b/tpvs17/Report/main.cpp
index 033955d..95d337e 100644
--- a/tpvs17/Report/main.cpp
+++ b/tpvs17/Report/main.cpp
@@ -18,7 +18,7 @@ int main(int argc, char *argv[])
dlg.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
dlg.setDbPtr(m_db);
QStringList strList;
- strList<< "λ1" << "λ2";
+ strList<< "Station_1" << "Station_2";
dlg.setStationNames(strList);
dlg.show();
int ret = a.exec();
diff --git a/tpvs17/Report/qcheckdatadlg.cpp b/tpvs17/Report/qcheckdatadlg.cpp
index 70ffae8..1101983 100644
--- a/tpvs17/Report/qcheckdatadlg.cpp
+++ b/tpvs17/Report/qcheckdatadlg.cpp
@@ -73,8 +73,9 @@ void QCheckDataDlg::updateModelShowLog(QSqlQuery &sql)
m_tableModel->clear();
m_strMap.clear();
createHeader();
- tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
- tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+ tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);//自适应行宽
int nIndex = 0;
while (sql.next())
@@ -307,7 +308,7 @@ Q_SLOT void QCheckDataDlg::onTBUI_ItemClick(const QModelIndex & index)
{
QPixmap npixmap;
QString appPath = QApplication::applicationDirPath();
- npixmap.load(appPath+strFileName);
+ npixmap.load(strFileName);
m_ViewImg->setImg(npixmap);
if (!npixmap.isNull()){
if (pShowName_label)
diff --git a/tpvs17/Report/qcheckdatadlg.ui b/tpvs17/Report/qcheckdatadlg.ui
index dbb721b..4e9407b 100644
--- a/tpvs17/Report/qcheckdatadlg.ui
+++ b/tpvs17/Report/qcheckdatadlg.ui
@@ -299,6 +299,15 @@
TextLabel
+
+ true
+
+
+ true
+
+
+ 0
+
diff --git a/tpvs17/lpMain/CMainWin.cpp b/tpvs17/lpMain/CMainWin.cpp
index 8272565..4043722 100644
--- a/tpvs17/lpMain/CMainWin.cpp
+++ b/tpvs17/lpMain/CMainWin.cpp
@@ -87,13 +87,14 @@ CMainWin::CMainWin(QWidget *parent)
lpSysConfig::instance()->writeConfig();
lpGlobalConfig::instance()->readConfig();
+ SetLanguage(lpSysConfig::instance()->m_CurLanguage);//语言设置
setWindowIcon(QIcon(LEAPER_LOGO));
- onInitCoreCtrl();
- onInitSerial();
- onInitUser();
- onInitUI();
- onInitStatus();
- onInitDiskClean();
+ onInitCoreCtrl();//核心模块
+ onInitSerial();//串口通讯模块
+ onInitUser();//用户登录模块
+ onInitUI();//其他UI
+ onInitStatus();//状态栏
+ onInitDiskClean();//定期删除任务
SYSLOG_STATUS << "系统启动";
{
@@ -108,7 +109,6 @@ CMainWin::CMainWin(QWidget *parent)
m_pCameraTrig = new AutoTrigger;
connect(m_pCameraTrig, SIGNAL(sgTrig()), this, SLOT(onTrigImage()));
-
connect(&m_devMgrWid, SIGNAL(sgChangeLanguage(QString)), this, SLOT(onLanguageChange(QString)));
connect(&m_testWid, SIGNAL(sgTestMode(int)), this, SLOT(onTestMode(int)));
@@ -122,26 +122,20 @@ CMainWin::CMainWin(QWidget *parent)
connect(pS, SIGNAL(sgShowModeName(QString, QString)), this, SLOT(onShowName(QString, QString)));
}
- {
-// if (m_pDetectorEngine)
-// {
-// QStringList Names = m_pDetectorEngine->getSolutionMgr()->GetAllSolutions().keys();
-//
-// }
- }
-
m_pWfCtrl->ISelModel(lpGlobalConfig::instance()->m_StationSolution_1, lpGlobalConfig::instance()->m_StationRunModel_1);
m_pWfCtrl->ISelModel(lpGlobalConfig::instance()->m_StationSolution_2, lpGlobalConfig::instance()->m_StationRunModel_2);
m_pImageCaliUI = new lpImageCaliUI();//图像标定页面
-
lpGlobalData::instance()->m_bCheckLinese = lpCheckKey::instance()->checkLinese();
m_pCheckLineseUI = new QCryptokeyUI();
connect(m_pCheckLineseUI, SIGNAL(sgRegisterFinish(bool)), this, SLOT(onLineseCheck(bool)));
-
onLineseCheck(lpGlobalData::instance()->m_bCheckLinese);
m_TimerID_Status = startTimer(1000);
+
+ ui.actionSystem->setDisabled(true);
+ ui.actionTest->setDisabled(true);
+ ui.actionStandard->setDisabled(true);
}
CMainWin::~CMainWin()
@@ -189,6 +183,18 @@ CMainWin::~CMainWin()
delete m_pWfCtrl;
m_pWfCtrl = nullptr;
}
+ {
+ if (m_ImgViewer_A)
+ {
+ delete m_ImgViewer_A;
+ m_ImgViewer_A = nullptr;
+ }
+ if (m_ImgViewer_B)
+ {
+ delete m_ImgViewer_B;
+ m_ImgViewer_B = nullptr;
+ }
+ }
if (m_pLabelInfo)
{
delete m_pLabelInfo;
@@ -570,8 +576,8 @@ Q_SLOT void CMainWin::onActionClicked()
else if ("actionTest" == strObj) {//测试
m_testWid.setParent(this);
m_testWid.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
- m_testWid.setWindowModality(Qt::ApplicationModal);
- m_testWid.setAttribute(Qt::WA_ShowModal, true);
+ //m_testWid.setWindowModality(Qt::ApplicationModal);
+ //m_testWid.setAttribute(Qt::WA_ShowModal, true);
m_testWid.show();
}
else if ("actionHelp" == strObj) {//帮助
@@ -596,14 +602,12 @@ Q_SLOT void CMainWin::onActionClicked()
m_devMgrWid.setParent(this);
m_devMgrWid.setWindowIcon(QIcon(LEAPER_LOGO));
m_devMgrWid.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
- m_devMgrWid.setWindowModality(Qt::ApplicationModal);
- m_devMgrWid.setAttribute(Qt::WA_ShowModal, true);
-
+ //m_devMgrWid.setWindowModality(Qt::ApplicationModal);
+ //m_devMgrWid.setAttribute(Qt::WA_ShowModal, true);
QStringList camkeys = m_pCoreCtrl->ICameraKeys();
QStringList solutions = m_pDetectorEngine->getSolutionMgr()->GetAllSolutions().keys();
m_devMgrWid.setSystemConfig(camkeys, solutions);
-
m_devMgrWid.show();
}
else if ("main_Login_action" == strObj) {//用户登陆
@@ -904,6 +908,36 @@ void CMainWin::onInitSerial()
void CMainWin::onInitUI()
{
+ //检测结果图展示 UI初始化
+ {
+ QGridLayout *pLayout_A = new QGridLayout(ui.widget_A);//A侧相机结果图展示UI
+ m_ImgViewer_A = new RoiImgViewer(ui.widget_A);
+ m_ImgViewer_A->setObjectName("m_ImgViewer_A");
+ connect(m_ImgViewer_A, SIGNAL(sgImageScale(qreal)), this, SLOT(onImageScale(qreal)));
+ pLayout_A->addWidget(m_ImgViewer_A);
+ ui.widget_A->setLayout(pLayout_A);
+
+ QGridLayout *pLayout_B = new QGridLayout(ui.widget_B);//B侧相机结果图展示UI
+ m_ImgViewer_B = new RoiImgViewer(ui.widget_A);
+ m_ImgViewer_B->setObjectName("m_ImgViewer_B");
+ connect(m_ImgViewer_B, SIGNAL(sgImageScale(qreal)), this, SLOT(onImageScale(qreal)));
+ pLayout_B->addWidget(m_ImgViewer_B);
+ ui.widget_B->setLayout(pLayout_B);
+
+ QString strPath = QApplication::applicationDirPath() + "/showImg.ini";//图像展示比例的参数
+ QSettings setting(strPath, QSettings::IniFormat);
+ double nScale_A = setting.value("ShowImg/ScaleA", 0.53).toDouble();
+ double nScale_B = setting.value("ShowImg/ScaleB", 0.53).toDouble();
+ m_ImgViewer_A->setInitScale(nScale_A);
+ m_ImgViewer_B->setInitScale(nScale_B);
+
+ m_ImgViewer_A->setContextMenuPolicy(Qt::CustomContextMenu);
+ connect(m_ImgViewer_A, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPopMenu(const QPoint&)));
+
+ m_ImgViewer_B->setContextMenuPolicy(Qt::CustomContextMenu);
+ connect(m_ImgViewer_B, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPopMenu(const QPoint&)));
+ }
+
QFont font;
//工具栏菜单
QMenu *pToolMenu = new QMenu(this);
@@ -964,11 +998,11 @@ void CMainWin::onInitUI()
pDoc = ui.wf_text_edit_result_2->document();
pDoc->setMaximumBlockCount(200);
- ui.wf_lb_image_show_1->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(ui.wf_lb_image_show_1, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPopMenu(const QPoint&)));
+// ui.wf_lb_image_show_1->setContextMenuPolicy(Qt::CustomContextMenu);
+// connect(ui.wf_lb_image_show_1, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPopMenu(const QPoint&)));
- ui.wf_lb_image_show_2->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(ui.wf_lb_image_show_2, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPopMenu(const QPoint&)));
+// ui.wf_lb_image_show_2->setContextMenuPolicy(Qt::CustomContextMenu);
+// connect(ui.wf_lb_image_show_2, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPopMenu(const QPoint&)));
connect(this, SIGNAL(sgShowSrcImg(QString, QImage)), &m_camSetWid, SLOT(onShowImage(QString, QImage)));
}
@@ -1032,6 +1066,10 @@ Q_SLOT void CMainWin::onLanguageChange(QString strLanguage)
{
// QSettings languageSetting(lpSysConfig::instance()->getCfgPath(), QSettings::IniFormat);
// languageSetting.value("language/select", "Chinese").toString();
+ if (strLanguage == lpSysConfig::instance()->m_CurLanguage)
+ return;
+ lpSysConfig::instance()->m_CurLanguage = strLanguage;
+ lpSysConfig::instance()->writeConfig();
SetLanguage(strLanguage);
}
@@ -1092,13 +1130,15 @@ Q_SLOT void CMainWin::onChangeUI(QString strUsr, int nLevel)
case 7:
case 6:
ui.main_action_userManager->setVisible(true);
- ui.actionSystem->setEnabled(true);
- ui.actionTest->setEnabled(true);
+ ui.actionSystem->setDisabled(false);
+ ui.actionTest->setDisabled(false);
+ ui.actionStandard->setDisabled(false);
break;
case 5:
ui.main_action_userManager->setVisible(true);
- ui.actionSystem->setEnabled(true);
- ui.actionTest->setEnabled(true);
+ ui.actionSystem->setDisabled(false);
+ ui.actionTest->setDisabled(false);
+ ui.actionStandard->setDisabled(false);
break;
case 4:
case 3:
@@ -1106,8 +1146,9 @@ Q_SLOT void CMainWin::onChangeUI(QString strUsr, int nLevel)
case 1:
case 0:
ui.main_action_userManager->setVisible(false);
- ui.actionSystem->setEnabled(false);
- ui.actionTest->setEnabled(false);
+ ui.actionSystem->setDisabled(true);
+ ui.actionTest->setDisabled(true);
+ ui.actionStandard->setDisabled(true);
break;
default:
break;
@@ -1171,11 +1212,15 @@ Q_SLOT void CMainWin::onShowImage(int ID, QImage img)
};
if (ID == 1)
{
- ShowImg(ui.wf_lb_image_show_1,img);
+ if(m_ImgViewer_A)
+ m_ImgViewer_A->setImg(img);
+ //ShowImg(ui.wf_lb_image_show_1,img);
}
else if (ID == 2)
{
- ShowImg(ui.wf_lb_image_show_2, img);
+ if (m_ImgViewer_B)
+ m_ImgViewer_B->setImg(img);
+ //ShowImg(ui.wf_lb_image_show_2, img);
}
}
//展示正在检测的型号名
@@ -1207,12 +1252,14 @@ Q_SLOT void CMainWin::onPopMenu(const QPoint& pt)
{
/*根据UI名判断是哪个工位需要设置相机*/
QString strCamKey;
- QString strObj = sender()->objectName();
- if ("wf_lb_image_show_1" == strObj)
+ //QString strObj = sender()->objectName();
+ //if ("wf_lb_image_show_1" == strObj)
+ if(m_ImgViewer_A == sender())
{
strCamKey = lpGlobalConfig::instance()->m_StationCamKey_1;
}
- else if ("wf_lb_image_show_2" == strObj)
+ //else if ("wf_lb_image_show_2" == strObj)
+ else if (m_ImgViewer_B == sender())
{
strCamKey = lpGlobalConfig::instance()->m_StationCamKey_2;
}
@@ -1389,7 +1436,7 @@ void CMainWin::IEngineResult(QVariantMap vMap)
/********打印检测结果到ui上*********/
QString strResult = QTime::currentTime().toString("hh:mm:ss zzz:") + taskName;
- strResult += " angle result : " + QString::number(dAngle, 'f', 3);
+ strResult += " angle : " + QString::number(dAngle, 'f', 3);
if (dAngle >= 361)
{
@@ -1547,3 +1594,18 @@ void CMainWin::onInitDiskClean()
}
}
+Q_SLOT void CMainWin::onImageScale(qreal value)
+{
+ QString strPath = QApplication::applicationDirPath() + "/showImg.ini";
+ QSettings setting(strPath, QSettings::IniFormat);
+ QObject *obj = sender();
+ if (m_ImgViewer_A == obj)
+ {
+ setting.setValue("ShowImg/ScaleA", value);
+ }
+ else if (m_ImgViewer_B == obj)
+ {
+ setting.setValue("ShowImg/ScaleB", value);
+ }
+}
+
diff --git a/tpvs17/lpMain/CMainWin.h b/tpvs17/lpMain/CMainWin.h
index d7152fa..86d37af 100644
--- a/tpvs17/lpMain/CMainWin.h
+++ b/tpvs17/lpMain/CMainWin.h
@@ -23,6 +23,7 @@
#include "QCryptokeyUI.h"
#include "lpImageCaliUI.h"
#include "QDiskCleanThread.h"
+#include "RoiImgViewer.h"
struct StationInfo
{
@@ -60,6 +61,8 @@ public:
Q_SLOT void onActionClicked();
QString genSavePath(int stationID, QString modelName, QImage &img);
QString genSaveSrcImgPath(int stationID, QString modelName, QImage &img);
+
+ Q_SLOT void onImageScale(qreal value);
protected:
virtual void timerEvent(QTimerEvent *event);
virtual void closeEvent(QCloseEvent *event);
@@ -75,6 +78,7 @@ protected:
void onInitUI();
void onInitDiskClean();
+
QString SecondTimeString(quint64 value);
Q_SLOT void onLineseCheck(bool bFlag);
void saveImage(const QImage& m_pixmap, QString m_path, QString filename);
@@ -121,6 +125,9 @@ private:
ISerialPortTool *m_pSerialPort{ nullptr };//ͨѶģ
QLabel* m_pLabelInfo{ nullptr };
+
+ RoiImgViewer *m_ImgViewer_A{ nullptr };//չʾͼ
+ RoiImgViewer *m_ImgViewer_B{ nullptr };//չʾͼ
private:
//ͼģ
CDllCoreCtrl* m_pDllCoreCtrl{nullptr};
@@ -156,6 +163,9 @@ private:
lpImageCaliUI* m_pImageCaliUI{ nullptr };
QList m_pDCThreadList;
+
+
+
};
#endif
diff --git a/tpvs17/lpMain/CMainWin.ui b/tpvs17/lpMain/CMainWin.ui
index 6e7120d..682bdc4 100644
--- a/tpvs17/lpMain/CMainWin.ui
+++ b/tpvs17/lpMain/CMainWin.ui
@@ -6,8 +6,8 @@
0
0
- 1022
- 723
+ 1115
+ 781
@@ -101,137 +101,292 @@
-
- QFrame::Box
+ QFrame::NoFrame
- QFrame::Raised
+ QFrame::Plain
+
+
+ 1
-
+
3
+
+ 3
+
3
-
-
-
-
-
-
-
-
- 0
- 40
-
-
-
-
- 55555
- 40
-
-
-
-
- 12
-
-
-
- <html><head/><body><p><span style=" font-size:11pt; color:#ff0000;">工位1</span></p></body></html>
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 492
- 372
-
-
-
- QFrame::Panel
-
-
- image
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- true
-
-
-
-
+
+ 3
+
+ -
+
+
+
+
+
+ false
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
-
+
+
+
+ 0
+ 5
+
+
+
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 40
+
+
+
+
+ 55555
+ 40
+
+
+
+
+ 12
+
+
+
+ <html><head/><body><p><br/></p></body></html>
+
+
+
+ -
+
+
+
+ 12
+
+
+
+ 工位1
+
+
+
+ -
+
+
+
+ 0
+ 5
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 2
+
+
+
+
+ 12
+
+
+
+ true
+
+
+
+
+
- -
-
-
-
-
-
-
- 0
- 40
-
-
-
-
- 16777215
- 40
-
-
-
-
- 12
-
-
-
- <html><head/><body><p><span style=" font-size:11pt; color:#ff0000;">工位2</span></p></body></html>
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 492
- 372
-
-
-
- QFrame::Panel
-
-
- image
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- true
-
-
-
-
+ -
+
+
+
+
+
+ false
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
-
+
+
+
+ 0
+ 5
+
+
+
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 40
+
+
+
+
+ 16777215
+ 40
+
+
+
+
+ 12
+
+
+
+ <html><head/><body><p><br/></p></body></html>
+
+
+
+ -
+
+
+
+ 12
+
+
+
+ 工位2
+
+
+
+ -
+
+
+
+ 0
+ 5
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 2
+
+
+
+
+ 12
+
+
+
+ true
+
+
+
+
+
diff --git a/tpvs17/lpMain/QAboutUI.cpp b/tpvs17/lpMain/QAboutUI.cpp
index 01a6519..c697883 100644
--- a/tpvs17/lpMain/QAboutUI.cpp
+++ b/tpvs17/lpMain/QAboutUI.cpp
@@ -10,3 +10,11 @@ QAboutUI::QAboutUI(QWidget *parent)
QAboutUI::~QAboutUI()
{
}
+
+void QAboutUI::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
diff --git a/tpvs17/lpMain/QAboutUI.h b/tpvs17/lpMain/QAboutUI.h
index a48c100..697fa83 100644
--- a/tpvs17/lpMain/QAboutUI.h
+++ b/tpvs17/lpMain/QAboutUI.h
@@ -11,7 +11,8 @@ class QAboutUI : public QWidget
public:
QAboutUI(QWidget *parent = Q_NULLPTR);
~QAboutUI();
-
+protected:
+ virtual void changeEvent(QEvent *event);
private:
Ui::QAboutUI ui;
};
diff --git a/tpvs17/lpMain/QAboutUI.ui b/tpvs17/lpMain/QAboutUI.ui
index 28f1fc3..6697774 100644
--- a/tpvs17/lpMain/QAboutUI.ui
+++ b/tpvs17/lpMain/QAboutUI.ui
@@ -22,7 +22,7 @@
- <html><head/><body><p>Main Version: 1.5.0228</p><p>Tadpole Version: 2.0.99</p><p>Final update date:20211018 11:00:00</p><p>Final Test data:20211018 11:00:00</p><p>单工位汽轮定位型号判别</p><p>CopyRight (C) 2016-2025 HangZhou Leaper </p><p>摩汽配件产品部</p><p><br/></p></body></html>
+ <html><head/><body><p>Main Version: 1.6.1019</p><p>Tadpole Version: 3.0.00</p><p>Final update date:20211019 11:00:00</p><p>Final Test data:20211019 11:00:00</p><p>单工位汽轮定位型号判别</p><p>CopyRight (C) 2016-2025 HangZhou Leaper </p><p>摩汽配件产品部</p><p><br/></p></body></html>
diff --git a/tpvs17/lpMain/QAddModeUI.cpp b/tpvs17/lpMain/QAddModeUI.cpp
index 523624c..a957f09 100644
--- a/tpvs17/lpMain/QAddModeUI.cpp
+++ b/tpvs17/lpMain/QAddModeUI.cpp
@@ -33,3 +33,11 @@ QString QAddModeUI::getInputName() {
QString strName = ui.lineEdit->text();
return strName;
}
+
+void QAddModeUI::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
diff --git a/tpvs17/lpMain/QAddModeUI.h b/tpvs17/lpMain/QAddModeUI.h
index d46c432..3fda4e0 100644
--- a/tpvs17/lpMain/QAddModeUI.h
+++ b/tpvs17/lpMain/QAddModeUI.h
@@ -13,6 +13,8 @@ public:
~QAddModeUI();
Q_SLOT void onButtonClicked();
QString getInputName();
+protected:
+ virtual void changeEvent(QEvent *event);
private:
Ui::QAddModeUI ui;
};
diff --git a/tpvs17/lpMain/QCamSetDlg.cpp b/tpvs17/lpMain/QCamSetDlg.cpp
index 5025a0f..3ea4e5f 100644
--- a/tpvs17/lpMain/QCamSetDlg.cpp
+++ b/tpvs17/lpMain/QCamSetDlg.cpp
@@ -81,3 +81,11 @@ void QCamSetDlg::closeEvent(QCloseEvent *event)
m_pCorl->IRunAlg(m_curCamKey, true);
}
}
+
+void QCamSetDlg::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
diff --git a/tpvs17/lpMain/QCamSetDlg.h b/tpvs17/lpMain/QCamSetDlg.h
index c7a9891..08e1e0f 100644
--- a/tpvs17/lpMain/QCamSetDlg.h
+++ b/tpvs17/lpMain/QCamSetDlg.h
@@ -20,6 +20,7 @@ public:
Q_SLOT void onButtonClicked();
protected:
virtual void closeEvent(QCloseEvent *event);
+ virtual void changeEvent(QEvent *event);
private:
Ui::QCamSetDlg ui;
QTpGraphView *m_ViewImg{ nullptr };
diff --git a/tpvs17/lpMain/QCamSettingDlg.cpp b/tpvs17/lpMain/QCamSettingDlg.cpp
index 004a408..279f5ee 100644
--- a/tpvs17/lpMain/QCamSettingDlg.cpp
+++ b/tpvs17/lpMain/QCamSettingDlg.cpp
@@ -283,3 +283,11 @@ void QCamSettingDlg::EnableUI(bool b)
// ui.m_ImgHeight->setDisabled(!b);
}
+void QCamSettingDlg::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
+
diff --git a/tpvs17/lpMain/QCamSettingDlg.h b/tpvs17/lpMain/QCamSettingDlg.h
index c5790d7..3d14c85 100644
--- a/tpvs17/lpMain/QCamSettingDlg.h
+++ b/tpvs17/lpMain/QCamSettingDlg.h
@@ -24,6 +24,8 @@ public:
void onShowVirtualDir(bool bShow);
void EnableUI(bool b);
+protected:
+ virtual void changeEvent(QEvent *event);
private:
Ui::QCamSettingDlg ui;
ICoreCtrl* m_pCoreCtl{ nullptr };
diff --git a/tpvs17/lpMain/QCameraConfigUI.cpp b/tpvs17/lpMain/QCameraConfigUI.cpp
index ff2dbdc..585f51c 100644
--- a/tpvs17/lpMain/QCameraConfigUI.cpp
+++ b/tpvs17/lpMain/QCameraConfigUI.cpp
@@ -55,3 +55,11 @@ tagCamInfo QCameraConfigUI::getNewCamInfo()
camInfo.loadPath = filePath;
return camInfo;
}
+
+void QCameraConfigUI::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
diff --git a/tpvs17/lpMain/QCameraConfigUI.h b/tpvs17/lpMain/QCameraConfigUI.h
index 0cd2b15..9041729 100644
--- a/tpvs17/lpMain/QCameraConfigUI.h
+++ b/tpvs17/lpMain/QCameraConfigUI.h
@@ -28,6 +28,8 @@ public:
Q_SLOT void onButtonClicked();
tagCamInfo getNewCamInfo();
+protected:
+ virtual void changeEvent(QEvent *event);
private:
Ui::QCameraConfigUI ui;
};
diff --git a/tpvs17/lpMain/QCameraMgrUI.cpp b/tpvs17/lpMain/QCameraMgrUI.cpp
index 9cc0c39..d8dfa93 100644
--- a/tpvs17/lpMain/QCameraMgrUI.cpp
+++ b/tpvs17/lpMain/QCameraMgrUI.cpp
@@ -1,4 +1,4 @@
-#include "QCameraMgrUI.h"
+#include "QCameraMgrUI.h"
#include
#pragma execution_character_set("utf-8")
QCameraMgrUI::QCameraMgrUI(QWidget *parent)
@@ -12,7 +12,7 @@ QCameraMgrUI::QCameraMgrUI(QWidget *parent)
connect(ui.m_pbClose, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
QStringList strHeaders;
- strHeaders << "ID" << "ʾ" << "к" << "" << "״̬";
+ strHeaders << "ID" << "显示名" << "序列号" << "类型" << "状态";
m_tableModel.setHorizontalHeaderLabels(strHeaders);
ui.tableView->setModel(&m_tableModel);
//ui.tableView->hideColumn(4);
@@ -25,8 +25,8 @@ QCameraMgrUI::QCameraMgrUI(QWidget *parent)
connect(ui.tableView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(onDoubleClicked(const QModelIndex &)));
- m_pCamSetUI = new QCamSettingDlg();//Ԥ
- m_pCamConfigUI = new QCameraConfigUI();//
+ m_pCamSetUI = new QCamSettingDlg();//相机预览
+ m_pCamConfigUI = new QCameraConfigUI();//相机配置
}
@@ -85,10 +85,10 @@ Q_SLOT void QCameraMgrUI::onButtonClicked()
int row = ui.tableView->currentIndex().row();
if (row < 0)
{
- QMessageBox::information(this, tr("ʾ"), "ѡҪĵ");
+ QMessageBox::information(this, tr("提示"), "请选择要修改的相机");
return;
}
- QModelIndex index = m_tableModel.index(row, 2);//ѡеһе
+ QModelIndex index = m_tableModel.index(row, 2);//选中行第一列的内容
QVariant data = m_tableModel.data(index);
QString strSerial = data.toString();
@@ -108,24 +108,24 @@ Q_SLOT void QCameraMgrUI::onButtonClicked()
int row = ui.tableView->currentIndex().row();
if (row < 0)
{
- QMessageBox::information(this, tr("ʾ"), "ѡҪƳ");
+ QMessageBox::information(this, tr("提示"), "请选择要移除的相机");
return;
}
- QModelIndex index = m_tableModel.index(row, 2);//ѡеһе
+ QModelIndex index = m_tableModel.index(row, 2);//选中行第一列的内容
QVariant data = m_tableModel.data(index);
QString key = data.toString();
if (key.isEmpty())
{
- QMessageBox::information(this, tr("ʾ"), "ѡҪƳ");
+ QMessageBox::information(this, tr("提示"), "请选择要移除的相机");
return;
}
QMessageBox info(this);
//info.setWindowIcon(QIcon(LEAPER_LOGO));
- info.setWindowTitle(QObject::tr(""));
- info.setText(QObject::tr("ȷҪƳ %1").arg(key));
+ info.setWindowTitle(QObject::tr("警告"));
+ info.setText(QObject::tr("你确定要移除相机 %1?").arg(key));
info.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
- info.setButtonText(QMessageBox::Ok, QObject::tr("ȷ"));
- info.setButtonText(QMessageBox::Cancel, QObject::tr("ȡ"));
+ info.setButtonText(QMessageBox::Ok, QObject::tr("确定"));
+ info.setButtonText(QMessageBox::Cancel, QObject::tr("取消"));
if (info.exec() == QMessageBox::Ok)
{
m_pCorctl->IDelCamera(key);
@@ -140,7 +140,7 @@ Q_SLOT void QCameraMgrUI::onButtonClicked()
void QCameraMgrUI::onUpdateTableView()
{
- //Ƴ
+ //移除所有
while (m_tableModel.rowCount())
{
m_tableModel.removeRow(0);
@@ -176,7 +176,7 @@ void QCameraMgrUI::onUpdateTableView()
// listItem.append(new QStandardItem((*it).hostMac));
// QString strVersion = lpGlobalData::instance()->m_CamVersionMap[strKey];
// listItem.append(new QStandardItem(strVersion));
-// // QStandardItem *pStateItem = new QStandardItem((*it).bConnect == false ? "δ" : "");
+// // QStandardItem *pStateItem = new QStandardItem((*it).bConnect == false ? "未连接" : "已连接");
// // listItem.append(pStateItem);
// // if ((*it).bConnect == true) {
// // pStateItem->setBackground(QBrush(Qt::red, Qt::NoBrush));
diff --git a/tpvs17/lpMain/QDeviceMgrUI.cpp b/tpvs17/lpMain/QDeviceMgrUI.cpp
index 65302c9..5b5b66c 100644
--- a/tpvs17/lpMain/QDeviceMgrUI.cpp
+++ b/tpvs17/lpMain/QDeviceMgrUI.cpp
@@ -1,4 +1,4 @@
-#include "QDeviceMgrUI.h"
+#include "QDeviceMgrUI.h"
#include "lpSysConfig.h"
#include "QTipWidget.h"
#include "lpGlobalConfig.h"
@@ -10,6 +10,10 @@ QDeviceMgrUI::QDeviceMgrUI(QWidget *parent)
ui.setupUi(this);
connect(ui.m_pbOK, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.pushButton, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
+
+ ui.comboBox->clear();
+ ui.comboBox->addItem("Chinese");
+ ui.comboBox->addItem("English");
}
QDeviceMgrUI::~QDeviceMgrUI()
@@ -23,7 +27,7 @@ Q_SLOT void QDeviceMgrUI::onButtonClicked()
if (strObj == "m_pbOK") {
getParam();
lpSysConfig::instance()->writeConfig();
- ShowMessage(QObject::tr("ѱ"));
+ ShowMessage(QObject::tr("参数已保存"));
}
else if (strObj == "pushButton")
{
@@ -48,6 +52,7 @@ void QDeviceMgrUI::setParam()
ui.checkBox_SaveSrcImg_st2->setChecked(lpSysConfig::instance()->m_bSaveSrcImg_st2);
ui.spinBox->setValue(lpSysConfig::instance()->m_MinSpaceSizeG);
ui.spinBox_2->setValue(lpSysConfig::instance()->m_CheckFileDays);
+ ui.comboBox->setCurrentText(lpSysConfig::instance()->m_CurLanguage);
}
@@ -64,6 +69,9 @@ void QDeviceMgrUI::getParam()
lpSysConfig::instance()->m_bSaveRltImg_st2 = ui.checkBox_SaveRltImg_st2->isChecked();
lpSysConfig::instance()->m_bSaveSrcImg_st1 = ui.checkBox_SaveSrcImg_st1->isChecked();
lpSysConfig::instance()->m_bSaveSrcImg_st2 = ui.checkBox_SaveSrcImg_st2->isChecked();
+
+ QString curText = ui.comboBox->currentText();
+ emit sgChangeLanguage(curText);
}
void QDeviceMgrUI::showEvent(QShowEvent *event)
@@ -71,6 +79,14 @@ void QDeviceMgrUI::showEvent(QShowEvent *event)
setParam();
}
+void QDeviceMgrUI::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
+
void QDeviceMgrUI::setSystemConfig(QStringList camkeys, QStringList solutions)
{
ui.comboBox_cam1->clear();
diff --git a/tpvs17/lpMain/QDeviceMgrUI.h b/tpvs17/lpMain/QDeviceMgrUI.h
index e622c5b..49b7cc5 100644
--- a/tpvs17/lpMain/QDeviceMgrUI.h
+++ b/tpvs17/lpMain/QDeviceMgrUI.h
@@ -15,10 +15,14 @@ public:
Q_SLOT void onButtonClicked();
void setParam();
void getParam();
- virtual void showEvent(QShowEvent *event);
+
void setSystemConfig(QStringList camkeys, QStringList solutions);
-
+protected:
+ virtual void showEvent(QShowEvent *event);
+ virtual void changeEvent(QEvent *event);
+signals:
+ void sgChangeLanguage(QString);
private:
Ui::QDeviceMgrUI ui;
};
diff --git a/tpvs17/lpMain/QDeviceMgrUI.ui b/tpvs17/lpMain/QDeviceMgrUI.ui
index fe07b72..daff95f 100644
--- a/tpvs17/lpMain/QDeviceMgrUI.ui
+++ b/tpvs17/lpMain/QDeviceMgrUI.ui
@@ -7,7 +7,7 @@
0
0
531
- 337
+ 360
@@ -336,7 +336,19 @@
维护相关:
- -
+
-
+
+
+
+ 12
+
+
+
+ 是否启用结果图定期删除功能
+
+
+
+ -
@@ -348,17 +360,17 @@
- -
-
+
-
+
-
-
+
12
- 超期天数:
+ 预留磁盘大小:
Qt::AlignCenter
@@ -366,36 +378,36 @@
-
-
+
12
- 天
+ G
1
- 360
+ 10000
- -
-
+
-
+
-
-
+
12
- 预留磁盘大小:
+ 超期天数:
Qt::AlignCenter
@@ -403,49 +415,52 @@
-
-
+
12
- G
+ 天
1
- 10000
+ 360
- -
-
-
-
- 12
-
-
-
- 是否启用结果图定期删除功能
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
+
-
+
+
-
+
+
+
+ 12
+
+
+
+ 语言:
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 12
+
+
+
+
+
diff --git a/tpvs17/lpMain/QModelMangerUI.cpp b/tpvs17/lpMain/QModelMangerUI.cpp
index b97d0de..f55b42e 100644
--- a/tpvs17/lpMain/QModelMangerUI.cpp
+++ b/tpvs17/lpMain/QModelMangerUI.cpp
@@ -1,4 +1,4 @@
-#include "QModelMangerUI.h"
+#include "QModelMangerUI.h"
#include
#include
#include
@@ -96,9 +96,9 @@ Q_SLOT void QModelMangerUI::onButtonClicked()
m_pCtrl->ISaveModel(nStaionID, strName);
}
else {
- QMessageBox msgWarning(QMessageBox::Warning, QObject::tr(""), strName + QObject::tr(" ʧ,ظ"), QMessageBox::Yes);
+ QMessageBox msgWarning(QMessageBox::Warning, QObject::tr("错误警告"), strName + QObject::tr(" 添加失败,可能名字重复"), QMessageBox::Yes);
msgWarning.setWindowIcon(QIcon(":/leaper/Resource/app.png"));
- msgWarning.setButtonText(QMessageBox::Yes, QObject::tr("ȷ"));
+ msgWarning.setButtonText(QMessageBox::Yes, QObject::tr("确认"));
msgWarning.exec();
}
}
@@ -119,13 +119,13 @@ Q_SLOT void QModelMangerUI::onButtonClicked()
QString strName = m_pCtrl->IGetCurrentRuningModel(currentTab());
if (strModel == strName)
{
- QMessageBox msgWarning(QMessageBox::Warning, QObject::tr(""), strModel + QObject::tr(" ʹãܱɾ"), QMessageBox::Yes);
+ QMessageBox msgWarning(QMessageBox::Warning, QObject::tr("错误警告"), strModel + QObject::tr(" 正在使用,不能被删除"), QMessageBox::Yes);
msgWarning.setWindowIcon(QIcon(":/leaper/Resource/app.png"));
- msgWarning.setButtonText(QMessageBox::Yes, QObject::tr("ȷ"));
+ msgWarning.setButtonText(QMessageBox::Yes, QObject::tr("确认"));
msgWarning.exec();
return ;
}
- QMessageBox msgBox(QMessageBox::Warning, QObject::tr("ͺɾ"), QObject::tr("ɾ") + strModel + "?", QMessageBox::Yes | QMessageBox::No);
+ QMessageBox msgBox(QMessageBox::Warning, QObject::tr("型号删除"), QObject::tr("删除") + strModel + "?", QMessageBox::Yes | QMessageBox::No);
msgBox.setWindowIcon(QIcon(":/leaper/Resource/app.png"));
if (QMessageBox::Yes == msgBox.exec()) {
bool b = m_pCtrl->IDeleteModel(currentTab(), strModel);
@@ -157,7 +157,7 @@ Q_SLOT bool QModelMangerUI::OnCellClicked(const QModelIndex &index)
IStation *pStation = m_pCtrl->IGetStationByKey(key);
if (pStation) {
QString strModel = pStation->model(index.row());
- QString strName = QObject::tr("ģͺ:") + strModel;
+ QString strName = QObject::tr("模型号:") + strModel;
int plcIndex = m_pCtrl->IGetPLCIndex(key, strModel);
ui.label_Name->setText(strModel);
@@ -196,7 +196,7 @@ Q_SLOT bool QModelMangerUI::OnCellDoubleClicked(const QModelIndex &index)
IStation *pStation = m_pCtrl->IGetStationByKey(key);
if (pStation) {
QString strModel = pStation->model(index.row());
- QString strName = QObject::tr("ģͺ:") + strModel;
+ QString strName = QObject::tr("模型号:") + strModel;
int plcIndex = m_pCtrl->IGetPLCIndex(key, strModel);
QPLCIndexUI dlg(this);
dlg.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
@@ -220,19 +220,19 @@ Q_SLOT bool QModelMangerUI::OnCellDoubleClicked(const QModelIndex &index)
}
if (bExist == true)
{
- QMessageBox msgWarning(QMessageBox::Warning, QObject::tr(""), strName + QObject::tr("ʧ,%1ֵͻ").arg(strExistModel), QMessageBox::Yes);
+ QMessageBox msgWarning(QMessageBox::Warning, QObject::tr("警告"), strName + QObject::tr("索引修改失败,与%1索引值冲突").arg(strExistModel), QMessageBox::Yes);
msgWarning.setWindowIcon(QIcon(":/leaper/Resource/app.png"));
- msgWarning.setButtonText(QMessageBox::Yes, QObject::tr("ȷ"));
+ msgWarning.setButtonText(QMessageBox::Yes, QObject::tr("确认"));
msgWarning.exec();
- ui.mLblModelState->setText(QObject::tr(" %1 PLCֵʧܣ").arg(strModel));
+ ui.mLblModelState->setText(QObject::tr(" %1 的 PLC索引值修改失败!").arg(strModel));
return false;
}
m_pCtrl->ISetPLCIndex(key, strModel, nIndex);
if (m_pCtrl)
m_pCtrl->ISaveModel(key, strModel);
- ui.mLblModelState->setText(QObject::tr(" %1 PLCֵijɹ").arg(strModel));
+ ui.mLblModelState->setText(QObject::tr(" %1 的 PLC索引值修改成功!").arg(strModel));
}
}
return true;
diff --git a/tpvs17/lpMain/QPLCIndexUI.cpp b/tpvs17/lpMain/QPLCIndexUI.cpp
index 31b4447..56b09c0 100644
--- a/tpvs17/lpMain/QPLCIndexUI.cpp
+++ b/tpvs17/lpMain/QPLCIndexUI.cpp
@@ -38,3 +38,11 @@ Q_SLOT void QPLCIndexUI::onButtonClicked()
QDialog::reject();
}
}
+
+void QPLCIndexUI::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
diff --git a/tpvs17/lpMain/QPLCIndexUI.h b/tpvs17/lpMain/QPLCIndexUI.h
index 31f14c6..b1a4538 100644
--- a/tpvs17/lpMain/QPLCIndexUI.h
+++ b/tpvs17/lpMain/QPLCIndexUI.h
@@ -16,6 +16,8 @@ public:
void setModelIndex(int val);
int getModelIndex();
Q_SLOT void onButtonClicked();
+protected:
+ virtual void changeEvent(QEvent *event);
private:
Ui::QPLCIndexUI ui;
};
diff --git a/tpvs17/lpMain/QTestModeWid.cpp b/tpvs17/lpMain/QTestModeWid.cpp
index 6a346b8..fd8c394 100644
--- a/tpvs17/lpMain/QTestModeWid.cpp
+++ b/tpvs17/lpMain/QTestModeWid.cpp
@@ -31,3 +31,11 @@ Q_SLOT void QTestModeWid::onButtonClicked()
emit sgTestMode(EM_CAM2_Trig);
}
}
+
+void QTestModeWid::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui.retranslateUi(this);
+ }
+}
diff --git a/tpvs17/lpMain/QTestModeWid.h b/tpvs17/lpMain/QTestModeWid.h
index 089f4c5..146cda2 100644
--- a/tpvs17/lpMain/QTestModeWid.h
+++ b/tpvs17/lpMain/QTestModeWid.h
@@ -18,6 +18,8 @@ public:
~QTestModeWid();
Q_SLOT void onButtonClicked();
+protected:
+ virtual void changeEvent(QEvent *event);
signals:
void sgTestMode(int);
private:
diff --git a/tpvs17/lpMain/lpMain.vcxproj b/tpvs17/lpMain/lpMain.vcxproj
index 3d4f9a3..a94afb4 100644
--- a/tpvs17/lpMain/lpMain.vcxproj
+++ b/tpvs17/lpMain/lpMain.vcxproj
@@ -254,7 +254,6 @@
.\GeneratedFiles;.;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtSql;.\GeneratedFiles\$(ConfigurationName);.\..\..\3part\SerialPortTool\include;.\..\..\src\lpMain;.\..\..\src\lpMain\algela;.\..\..\src\lpMain\QDiskCleanThread;.\..\..\src\lpMain\sqliteDB;.\..\..\src\lpMain\UI;.\..\..\3part\opencv3.4.1\include;.\..\..\3part\opencv3.4.1\include\opencv;.\..\..\3part\opencv3.4.1\include\opencv2;.\..\..\3part\libzkq\include;.\..\..\3part\lpSyslog\inc;.\..\..\src\userCtrl;.\..\..\src\lpMain\CoreCtrl;.\..\..\3part\tadpole\include\tpBase;.\..\..\src\lpMain\view;.\..\..\src\lpMain\cryptokey;.\..\..\3part\RsaCrypto\include;F:\ValueProject\newValve\3part\openssl-1.0.2n\vs13\include
.\GeneratedFiles;.;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtSql;.\GeneratedFiles\$(ConfigurationName);.\..\..\3part\SerialPortTool\include;.\..\..\src\lpMain;.\..\..\src\lpMain\algela;.\..\..\src\lpMain\QDiskCleanThread;.\..\..\src\lpMain\sqliteDB;.\..\..\src\lpMain\UI;.\..\..\3part\opencv3.4.1\include;.\..\..\3part\opencv3.4.1\include\opencv;.\..\..\3part\opencv3.4.1\include\opencv2;.\..\..\3part\libzkq\include;.\..\..\3part\lpSyslog\inc;.\..\..\src\userCtrl;.\..\..\src\lpMain\CoreCtrl;.\..\..\3part\tadpole\include\tpBase;.\..\..\src\lpMain\view
-
@@ -341,7 +340,6 @@
-
diff --git a/tpvs17/lpMain/lpMain.vcxproj.filters b/tpvs17/lpMain/lpMain.vcxproj.filters
index 9152128..5c14b59 100644
--- a/tpvs17/lpMain/lpMain.vcxproj.filters
+++ b/tpvs17/lpMain/lpMain.vcxproj.filters
@@ -396,9 +396,6 @@
lpMain\db
-
- Header Files
-
cryptokey
@@ -462,8 +459,5 @@
Translation Files
-
- Translation Files
-
\ No newline at end of file
diff --git a/tpvs17/lpMain/lpStationMgr.cpp b/tpvs17/lpMain/lpStationMgr.cpp
index e18cb18..f28ed66 100644
--- a/tpvs17/lpMain/lpStationMgr.cpp
+++ b/tpvs17/lpMain/lpStationMgr.cpp
@@ -1,4 +1,4 @@
-#include "lpStationMgr.h"
+#include "lpStationMgr.h"
lpStationMgr::lpStationMgr(QObject *parent)
: QObject(parent)
diff --git a/tpvs17/lpMain/lpmain_en.ts b/tpvs17/lpMain/lpmain_en.ts
new file mode 100644
index 0000000..8df71ca
--- /dev/null
+++ b/tpvs17/lpMain/lpmain_en.ts
@@ -0,0 +1,1372 @@
+
+
+
+
+ AwesomeImgViewerBar
+
+
+ Rect
+
+
+
+
+ Add
+
+
+
+
+ +
+
+
+
+
+ f067,white
+
+
+
+
+ f067
+
+
+
+
+ Subtract
+
+
+
+
+ -
+
+
+
+
+ f068
+
+
+
+
+ Delete
+
+
+
+
+ D
+
+
+
+
+ f2ed
+
+
+
+
+ Hide
+
+
+
+
+ H
+
+
+
+
+ f06e
+
+
+
+
+ f070,white
+
+
+
+
+ f070,gray
+
+
+
+
+ CMainWin
+
+
+ 气门芯定位检测系统
+ Valve core positioning and detection system
+
+
+
+ 浙江万丰科技开发股份有限公司
+ Zhejiang Wanfeng Technology Development Company
+
+
+
+
+ <html><head/><body><p><br/></p></body></html>
+
+
+
+
+ 工位1
+ Station1
+
+
+
+ 工位2
+ Station2
+
+
+
+
+ 模型标定
+ Model Standard
+
+
+
+ 模型管理
+ Model Manager
+
+
+
+ 测试
+ Test
+
+
+
+
+
+ 帮助
+ Help
+
+
+
+ 查询记录
+ History
+
+
+
+
+ 系统配置
+ System Setting
+
+
+
+ 登 录
+ LogIn
+
+
+
+ 用户管理
+ User Manager
+
+
+
+
+ 视场标定
+ View Standard
+
+
+
+
+ 注册
+ Register
+
+
+
+ 图像标定
+ View Standard
+
+
+
+ 运行时长:
+ Run:
+
+
+
+
+
+
+
+ 提示
+ Info
+
+
+
+ Corectrl模块加载失败,请检查!
+ Corectrl module failed to load, please check!
+
+
+
+
+
+
+
+ 确认
+ OK
+
+
+
+ camera.json文件出错,请检查!
+ Camera.json failed to load, please check!
+
+
+
+ lpbengine模块加载失败,请检查!
+ Lpbengine module failed to load, please check!
+
+
+
+ lpdesigner模块加载失败,请检查!
+ Lpdesigner module failed to load, please check!
+
+
+
+
+ 工具
+ Tool
+
+
+
+
+ 本系统未注册激活
+ The system is not Active
+
+
+
+ 请对该工位的相机进行绑定!
+ Please Binding Camera!
+
+
+
+ 相机配置
+ Camera Setting
+
+
+
+ center:(%1,%2)
+
+
+
+
+ 天
+ D
+
+
+
+ 时
+ H
+
+
+
+ 分
+ M
+
+
+
+ 秒
+ S
+
+
+
+ QAboutUI
+
+
+ 关于
+ About
+
+
+
+ <html><head/><body><p>Main Version: 1.5.0228</p><p>Tadpole Version: 2.0.99</p><p>Final update date:20211018 11:00:00</p><p>Final Test data:20211018 11:00:00</p><p>单工位汽轮定位型号判别</p><p>CopyRight (C) 2016-2025 HangZhou Leaper </p><p>摩汽配件产品部</p><p><br/></p></body></html>
+
+
+
+
+ QAddModeUI
+
+
+ 添加型号
+ Add Model
+
+
+
+ 确认
+ OK
+
+
+
+ 取消
+ Cancel
+
+
+
+ 请输入型号名:
+ Please input Model Name:
+
+
+
+ QCamSetDlg
+
+
+ 相机设置
+ Camera Setting
+
+
+
+ 相机ID:
+ Camera ID:
+
+
+
+ 软触发一次
+ Triger Once
+
+
+
+ 增益值:
+ Gain:
+
+
+
+ 曝光值:
+ Expouse:
+
+
+
+ 应用参数
+ Apply
+
+
+
+ 保存
+ Save
+
+
+
+ QCamSettingDlg
+
+
+ 相机配置
+ Camera Setting
+
+
+
+ 相机预览
+ Preview
+
+
+
+ 打开
+ Open
+
+
+
+ 运行
+ Run
+
+
+
+ 当前图片尺寸:
+ Size:
+
+
+
+ 高度:
+ Height:
+
+
+
+ 宽度:
+ Width:
+
+
+
+ 应用
+ Apply
+
+
+
+ 起始X:
+ OffsetX:
+
+
+
+ 起始Y:
+ OffsetY:
+
+
+
+ 相机类型(*):
+ Type:
+
+
+
+ 序列号(*):
+ Serial:
+
+
+
+ Virtual Camera(100)
+
+
+
+
+ BitFlow(110)
+
+
+
+
+ Gige(120)
+
+
+
+
+ USB Camera(130)
+
+
+
+
+ HIK(140)
+
+
+
+
+ Vimba(150)
+
+
+
+
+ Baumer(160)
+
+
+
+
+ AdLink(170)
+
+
+
+
+ DaHua(180)
+
+
+
+
+ Basler(190)
+
+
+
+
+ PtGray(200)
+
+
+
+
+ Euresys(220)
+
+
+
+
+ 相机通用参数
+ Params
+
+
+
+ 触发源:
+ Triger:
+
+
+
+ 开启
+ Open
+
+
+
+ 缩放:
+ Resize:
+
+
+
+ 增益:
+ Gain:
+
+
+
+ Line0
+
+
+
+
+ Line1
+
+
+
+
+ 格式:
+ Form:
+
+
+
+ 显示名称(*):
+ Name:
+
+
+
+ 曝光:
+ Expouse:
+
+
+
+ GRAY8
+
+
+
+
+ RGB32
+
+
+
+
+ 虚拟相机配置
+ Visural Setting
+
+
+
+ 虚拟相机目录:
+ Dir:
+
+
+
+ ...
+
+
+
+
+ 依赖的相机:
+ othes:
+
+
+
+ 是否循环:
+ Loog:
+
+
+
+ 循环
+ loop
+
+
+
+ 其他
+ Othes
+
+
+
+ 保存参数
+ Save or Not
+
+
+
+ 启用保存
+ Save
+
+
+
+ 保存图片后缀:
+ suffix:
+
+
+
+ 是否保存:
+ Save:
+
+
+
+ .BMP
+
+
+
+
+ .PNG
+
+
+
+
+ .JPG
+
+
+
+
+ .JPEG
+
+
+
+
+ 确定
+ OK
+
+
+
+ 取消
+ Cancel
+
+
+
+ QCameraConfigUI
+
+
+ QCameraConfigUI
+
+
+
+
+ 相机类型(*)
+ Type
+
+
+
+ 序列号(*)
+ Serial
+
+
+
+ 显示名称(*)
+ Name
+
+
+
+ 配置
+ Setting
+
+
+
+ 虚拟相机路径:
+ Path:
+
+
+
+ 保存
+ Apply
+
+
+
+ 取消
+ Cancel
+
+
+
+ QCameraMgrUI
+
+
+ 相机管理
+ Camera Manager
+
+
+
+ 相机列表
+ Camera List
+
+
+
+ 修改/预览
+ Modify
+
+
+
+ 删除
+ Delete
+
+
+
+ 手动添加
+ Add
+
+
+
+ 查找可用
+ Find
+
+
+
+ 关闭
+ Close
+
+
+
+
+
+ 提示
+ Info
+
+
+
+ QCryptokeyUI
+
+
+ 注册
+ Register
+
+
+
+ 退出
+ Close
+
+
+
+ 机器码:
+ Serial:
+
+
+
+ 注册码:
+ Lineses:
+
+
+
+ 激活
+ Active
+
+
+
+ 请输入注册码
+ Please input lineses
+
+
+
+ 激活状态:
+ State:
+
+
+
+ 未激活
+ Not Active
+
+
+
+
+
+ 提示
+ Info
+
+
+
+ QDeviceMgrUI
+
+
+ 系统配置
+ System Setting
+
+
+
+ 检测配置
+ Detection
+
+
+
+
+ 应用
+ Apply
+
+
+
+ 相机绑定:
+ Camera Binding:
+
+
+
+
+ 工位2:
+ Station2:
+
+
+
+
+ 工位1:
+ Station1:
+
+
+
+ 解决方案绑定:
+ Solution Binding:
+
+
+
+ 系统设置
+ System
+
+
+
+ 通讯设备配置:
+ Serial Port:
+
+
+
+ 波特率:
+ Baute:
+
+
+
+ 串口名:
+ Name:
+
+
+
+ 维护相关:
+ Others:
+
+
+
+ 是否启用结果图定期删除功能
+ Use Delete Target Images By Time
+
+
+
+ 是否启用原图定期删除功能
+ Use Delete Source Images By Time
+
+
+
+ 预留磁盘大小:
+ Disk Space:
+
+
+
+ G
+
+
+
+
+ 超期天数:
+ Days:
+
+
+
+ 天
+ Day
+
+
+
+ 语言:
+ Language:
+
+
+
+ 图像保存:
+ Save Image:
+
+
+
+ 保存工位2结果图
+ Save Station 2 Result Images
+
+
+
+ 保存工位1结果图
+ Save Station 1 Result Images
+
+
+
+ 保存工位1原图
+ Save Station 1 Source Images
+
+
+
+ 保存工位2原图
+ Save Station 2 Source Images
+
+
+
+ QModelMangerUI
+
+
+ 型号管理
+ Model Manager
+
+
+
+ 标定图:
+ Image:
+
+
+
+ 型号名:
+ Name:
+
+
+
+ xxxx
+
+
+
+
+ 添加
+ Add
+
+
+
+ 修改
+ Mod
+
+
+
+ 删除
+ Del
+
+
+
+ 设置为当前运行模型
+ Set to Run
+
+
+
+ 从PLC获取当前模型
+ Get Model by PLC
+
+
+
+ current %1 OK!
+
+
+
+
+ add %1 successful!
+
+
+
+
+ QObject
+
+
+
+ 已标定
+ Standard
+
+
+
+
+ 未标定
+ No Standard
+
+
+
+
+
+
+ 提示
+ Info
+
+
+
+ 你确定要注销%1 ?
+ Are you sure Logout %1?
+
+
+
+
+ 该功能未启用.
+ Not Active.
+
+
+
+
+
+
+
+ 确认
+ OK
+
+
+
+
+
+ 警告
+ Warning
+
+
+
+ 本检测系统正在运行,您真的要关闭?
+ Are you Sure Exit the System?
+
+
+
+
+ 确定
+ OK
+
+
+
+
+ 取消
+ Cancel
+
+
+
+ 系统时间
+ Time
+
+
+
+ 模式:
+ Mode:
+
+
+
+ 用户:无
+ User:None
+
+
+
+ 连接状态:
+ State:
+
+
+
+ 检测模式:
+ Mode:
+
+
+
+ 在线模式
+ Online
+
+
+
+ 离线模式
+ OffLine
+
+
+
+ 连接状态:
+ Connect:
+
+
+
+ 连接正常
+ Online
+
+
+
+ 连接异常
+ OffLine
+
+
+
+ 用户: %1
+ User:%1
+
+
+
+ 未登录
+ None
+
+
+
+ 注 销
+ LogOut
+
+
+
+ 登 录
+ LogIn
+
+
+
+ 检测到错误: 模型与图像尺寸不匹配,请重新标定模型!!!
+ Size Error!
+
+
+
+
+ 错误警告
+ Error
+
+
+
+ 添加失败,可能名字重复
+ Failed to add, possibly with duplicate name
+
+
+
+ 正在使用,不能被删除
+ In use cannot be deleted
+
+
+
+ 型号删除
+ Delete Model
+
+
+
+ 删除
+ Delete
+
+
+
+ delete %1 failed!
+
+
+
+
+ delete %1 successful!
+
+
+
+
+
+ 模型号:
+ Name:
+
+
+
+ 索引修改失败,与%1索引值冲突
+ Failed to modify index because it conflicts with index value %1
+
+
+
+ %1 的 PLC索引值修改失败!
+ Failed to modify PLC index value for %1!
+
+
+
+ %1 的 PLC索引值修改成功!
+ PLC index value of %1 changed successfully!
+
+
+
+ 模型号
+ Name
+
+
+
+ PLC索引值
+ PLC Index
+
+
+
+ 标定情况
+ Status
+
+
+
+ 你确定要移除相机 %1?
+ Are you sure you want to remove camera %1?
+
+
+
+ 参数已保存
+ Params apply successful
+
+
+
+ QPLCIndexUI
+
+
+ QPLCIndexUI
+
+
+
+
+ 确认
+ OK
+
+
+
+ 取消
+ Cancel
+
+
+
+ PLC索引号设置
+ PLC Index Setting
+
+
+
+ PLC索引值
+ PLC Index
+
+
+
+ QTestModeWid
+
+
+ 功能测试
+ Test
+
+
+
+ 模拟运行
+ Run
+
+
+
+ 相机2捕获
+ Cam2 Triger
+
+
+
+ 相机1捕获
+ Cam1 Triger
+
+
+
+ 停止
+ Stop
+
+
+
+ RoiImgViewer
+
+
+
+ line item is not created
+
+
+
+
+ line item is already created
+
+
+
+
+ rect item is already created
+
+
+
+
+ Station
+
+
+ 当前检测型号
+ Current Model
+
+
+
+ lpImageCaliUI
+
+
+ 相机视场标定
+ Camera View Standard
+
+
+
+ 工位1相机视场标定
+ Station1
+
+
+
+
+ 操作
+ Opera
+
+
+
+
+ 选择标定图像
+ Select Image
+
+
+
+
+ P1_X:
+
+
+
+
+
+ P1_Y:
+
+
+
+
+
+ P2_Y:
+
+
+
+
+
+
+
+
+
+
+
+ 1200
+
+
+
+
+
+ P2_X:
+
+
+
+
+
+ 两点实际距离mm:
+ Real Distance:
+
+
+
+
+ 两点像素距离px:
+ Pixel Distance:
+
+
+
+
+ 像素比例值(mm/px):
+ Scale:
+
+
+
+
+
+
+
+
+
+
+
+
+ 解锁
+ Unlock
+
+
+
+
+ 物理X方向偏移:
+ Real X Offset:
+
+
+
+
+ 物理Y方向偏移:
+ Real Y Offset:
+
+
+
+
+ 应用
+ Apply
+
+
+
+ 工位2相机视场标定
+ Station2
+
+
+
+
+ 选择标定图
+ Select Image
+
+
+
+
+ Image Files (*.png *.jpg *.bmp)
+
+
+
+
+
+ 上锁
+ Lock
+
+
+