1、修复空型号还能正常添加的bug

2、调整控件按钮的显示大小和字体
master 2021-10-28
bob.pan 4 years ago
parent 72429d1ec2
commit 1f7fa52da7

@ -1,19 +0,0 @@
{
"COM": {
"baute": "19200",
"comName": "COM1",
"useRaster": true
},
"Raster": {
"basehight": 0,
"basehight_bool": false,
"beilv": 1,
"beilv_bool": true,
"lowNum": 0,
"lowNum_bool": false,
"maxsize": 10,
"maxsize_bool": false,
"mid_value": 0.8,
"mid_value_bool": false
}
}

@ -49,3 +49,9 @@
4、修复在线PLC型号切换不成功bug
5、lpengine模块增加不存在的task失败信息输出
6、修复型号手动切换和在线切换发现的bug
2021-10-27
1、修复输出中心坐标出现的信息不准确问题
2、增加新添加UI的英文翻译
2021-10-28
1、修复空型号还能正常添加的bug
2、调整控件按钮的显示大小和字体

@ -144,6 +144,8 @@ bool CWfCtrl::initCurrentModel()
bool CWfCtrl::IAddModel(QString nStation, QString strModel)
{
if (strModel.isEmpty())
return false;
IStation *pStation = IGetStationByKey(nStation);
if (!pStation) {
return false;
@ -175,6 +177,8 @@ bool CWfCtrl::IAddModel(QString nStation, QString strModel)
bool CWfCtrl::IDeleteModel(QString nStation, QString strModel)
{
if (strModel.isEmpty())
return false;
IStation *pStation = IGetStationByKey(nStation);
if (!pStation) {
return false;

@ -43,6 +43,7 @@ bool CDetectorUI::ShowMainFrame(class QWidget* parent)
m_pMainFrame->setAttribute(Qt::WA_ShowModal, true);
m_pMainFrame->show();
//m_pMainFrame->showMaximized();
return true;
}

@ -22,7 +22,7 @@
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Main Version: 1.6.1027&lt;/p&gt;&lt;p&gt;Tadpole Version: 3.0.00&lt;/p&gt;&lt;p&gt;Final update date:20211027 11:00:00&lt;/p&gt;&lt;p&gt;Final Test data:20211027 11:00:00&lt;/p&gt;&lt;p&gt;单工位汽轮定位型号判别&lt;/p&gt;&lt;p&gt;CopyRight (C) 2016-2025 HangZhou Leaper &lt;/p&gt;&lt;p&gt;摩汽配件产品部&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Main Version: 1.6.1028&lt;/p&gt;&lt;p&gt;Tadpole Version: 3.0.00&lt;/p&gt;&lt;p&gt;Final update date:20211028 15:00:00&lt;/p&gt;&lt;p&gt;Final Test data:20211028 15:00:00&lt;/p&gt;&lt;p&gt;单工位汽轮定位型号判别&lt;/p&gt;&lt;p&gt;CopyRight (C) 2016-2025 HangZhou Leaper &lt;/p&gt;&lt;p&gt;摩汽配件产品部&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>

@ -1,6 +1,7 @@
#include "QAddModeUI.h"
#include <QRegExp>
#include "QMessageBox"
#pragma execution_character_set("utf-8")
QAddModeUI::QAddModeUI(QWidget *parent)
: QDialog(parent)
{
@ -22,6 +23,15 @@ Q_SLOT void QAddModeUI::onButtonClicked()
QString strObj = sender()->objectName();
if (strObj == "pushButton")
{
QString strName = ui.lineEdit->text();
if (strName.isEmpty())
{
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.exec();
return;
}
QDialog::accept();
}
else if (strObj == "pushButton_2") {

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>220</width>
<height>89</height>
<height>105</height>
</rect>
</property>
<property name="windowTitle">
@ -16,9 +16,15 @@
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QPushButton" name="pushButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
@ -28,9 +34,15 @@
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButton_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
@ -40,9 +52,15 @@
</item>
<item row="1" column="0" colspan="2">
<widget class="QLineEdit" name="lineEdit">
<property name="minimumSize">
<size>
<width>0</width>
<height>35</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<pointsize>12</pointsize>
</font>
</property>
</widget>
@ -51,7 +69,7 @@
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>11</pointsize>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">

@ -88,6 +88,14 @@ Q_SLOT void QModelMangerUI::onButtonClicked()
if (adddlg.exec() == QDialog::Accepted)
{
QString strName = adddlg.getInputName();
if (strName.isEmpty())
{
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.exec();
return;
}
QString nStaionID = currentTab();
bool bFlag = m_pCtrl->IAddModel(nStaionID, strName);
if (bFlag) {
@ -101,12 +109,11 @@ Q_SLOT void QModelMangerUI::onButtonClicked()
msgWarning.setButtonText(QMessageBox::Yes, QObject::tr("确认"));
msgWarning.exec();
}
}
QTimer::singleShot(5000, [&]() {
QTimer::singleShot(1000, [&]() {
ui.mLblModelState->setText("");
});
}
}
else if ("wf_model_mod_button" == strObj) {
}
@ -149,9 +156,6 @@ int QModelMangerUI::lastNum(QString str)
Q_SLOT bool QModelMangerUI::OnCellClicked(const QModelIndex &index)
{
QString strListName = sender()->objectName();
if (1 != index.column()) {
return false;
}
QString key = m_tabViewKeys.value(strListName);
int stationID = lastNum(strListName);
IStation *pStation = m_pCtrl->IGetStationByKey(key);

@ -158,10 +158,16 @@
</property>
<item>
<widget class="QPushButton" name="wf_model_add_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
<height>30</height>
</size>
</property>
<property name="font">
@ -176,10 +182,16 @@
</item>
<item>
<widget class="QPushButton" name="wf_model_mod_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
<height>30</height>
</size>
</property>
<property name="font">
@ -194,10 +206,16 @@
</item>
<item>
<widget class="QPushButton" name="wf_model_delete_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
<height>30</height>
</size>
</property>
<property name="font">
@ -212,10 +230,16 @@
</item>
<item>
<widget class="QPushButton" name="wf_model_select_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
<height>30</height>
</size>
</property>
<property name="font">
@ -230,10 +254,16 @@
</item>
<item>
<widget class="QCheckBox" name="wf_chkbox_read_mode_from_plc">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
<height>30</height>
</size>
</property>
<property name="font">
@ -245,6 +275,18 @@
<property name="text">
<string>从PLC获取当前模型</string>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
</layout>

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>230</width>
<height>104</height>
<width>205</width>
<height>105</height>
</rect>
</property>
<property name="font">
@ -74,7 +74,7 @@
<widget class="QLabel" name="mLblPLCIndexState">
<property name="font">
<font>
<pointsize>11</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
@ -99,16 +99,31 @@
<item row="0" column="1">
<widget class="QSpinBox" name="spBxPLCEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>40</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToPreviousValue</enum>
</property>
<property name="maximum">
<number>1000</number>
</property>

Loading…
Cancel
Save