1、修复没有标定的情况下,图片不能保存的问题

2、报表查看修改
master
bob.pan 4 years ago
parent 06f0edcc54
commit 8d8159e41c

@ -9,3 +9,6 @@
1、恢复检测数据结果保存和检测图片保存功能
2、移除不需要的代码和接口
3、UI布局调整
2021-10-18 3
1、修复串口不能正常打开问题

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -19,6 +19,7 @@ public:
virtual bool ISelModel(QString, QString) = 0;
virtual bool ISaveModel(QString, QString) = 0;
virtual bool IStandard(QString strName ,QString strModel) = 0;
virtual QImage IGetStandardImg(QString strName, QString strModel) = 0;
virtual int IGetPLCIndex(QString strName, QString strModel) = 0;
virtual bool ISetPLCIndex(QString strName, QString strModel, int plcIndex) = 0;
virtual QString IFindModelName(QString strName, int plcIndex) = 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

@ -144,7 +144,7 @@ bool Station::updateCurrentModel2Label()
bool bCali = false;
bCali = IStandard(m_strCurrentModel);
QString strText = "<html><body><h4><span style = '%1'>%2: %3 __ %4< /span>< /h4>< /body>< /html>";
QString strText = "<html><body><h4><span style = '%1'>%2: %3_%4< /span>< /h4>< /body>< /html>";
strText = strText.arg("color:#ff0000;")
.arg(tr("当前检测型号"))
.arg(m_strCurrentModel == "" ? "?" : m_strCurrentModel)

@ -14,6 +14,39 @@
#pragma execution_character_set("utf-8")
static QImage cvMat2QImage_2(const cv::Mat& mat) {
if (mat.type() == CV_8UC1) {
QImage image(mat.cols, mat.rows, QImage::Format_Indexed8);
image.setColorCount(256);
for (int i = 0; i < 256; i++) {
image.setColor(i, qRgb(i, i, i));
}
uchar *pSrc = mat.data;
for (int row = 0; row < mat.rows; row++) {
uchar *pDest = image.scanLine(row);
memcpy(pDest, pSrc, mat.cols);
pSrc += mat.step;
}
return image;
}
else if (mat.type() == CV_8UC3) {
const uchar *pSrc = (const uchar*)mat.data;
QImage image(pSrc, mat.cols, mat.rows, mat.step, QImage::Format_RGB888);
if (image.isNull())
return QImage();
return image.rgbSwapped();
}
else if (mat.type() == CV_8UC4) {
const uchar *pSrc = (const uchar*)mat.data;
QImage image(pSrc, mat.cols, mat.rows, mat.step, QImage::Format_ARGB32);
return image.copy();
}
else {
qDebug() << "ERROR: Mat could not be converted to QImage.";
return QImage();
}
}
CWfCtrl::CWfCtrl(IDetectorEngine* ptr)
{
m_rootPath = QApplication::applicationDirPath();
@ -304,3 +337,28 @@ bool CWfCtrl::IStandard(QString strName, QString strModel)
}
return false;
}
QImage CWfCtrl::IGetStandardImg(QString strName, QString strModel)
{
if (m_pEngine)
{
IDetectorSolutionMgr* pSolutionMgr = m_pEngine->getSolutionMgr();
if (!pSolutionMgr)
return QImage();
QMap<QString, IDetectorSolution*> solutionMap = pSolutionMgr->GetAllSolutions();
QMap<QString, IDetectorSolution*>::iterator it = solutionMap.find(strName);
if (it != solutionMap.end())
{
IDetectorSolution *p = *it;
IDetectorTask* pTask = p->GetTaskByName(strModel);
if (pTask->GetTaskInfo()->templateImg.data == nullptr)
return QImage();
else
{
return cvMat2QImage_2(pTask->GetTaskInfo()->templateImg);
}
}
}
return QImage();
}

@ -6,7 +6,7 @@
#include <QSettings>
#include "IWfCtrl.h"
#include "lpbengine.h"
#include <QImage>
class CWfCtrl : public IWfCtrl
{
Q_OBJECT
@ -18,6 +18,7 @@ public:
virtual IStation* IGetStationByKey(QString);
virtual bool IStandard(QString strName,QString strModel);
virtual QImage IGetStandardImg(QString strName, QString strModel);
virtual int IGetPLCIndex(QString strName, QString strModel);
virtual bool ISetPLCIndex(QString strName, QString strModel, int plcIndex);
virtual QString IFindModelName(QString strName, int plcIndex);

@ -22,4 +22,7 @@
<file>Resource/app.png</file>
<file>Resource/app2.png</file>
</qresource>
<qresource prefix="/">
<file>Resource/no-img.png</file>
</qresource>
</RCC>

@ -1,7 +0,0 @@
#include "Report.h"
Report::Report(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
}

@ -1,15 +0,0 @@
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_Report.h"
class Report : public QMainWindow
{
Q_OBJECT
public:
Report(QWidget *parent = Q_NULLPTR);
private:
Ui::ReportClass ui;
};

@ -1,29 +0,0 @@
<UI version="4.0" >
<class>ReportClass</class>
<widget class="QMainWindow" name="ReportClass" >
<property name="objectName" >
<string notr="true">ReportClass</string>
</property>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle" >
<string>Report</string>
</property>
<widget class="QMenuBar" name="menuBar" />
<widget class="QToolBar" name="mainToolBar" />
<widget class="QWidget" name="centralWidget" />
<widget class="QStatusBar" name="statusBar" />
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<resources>
<include location="Report.qrc"/>
</resources>
<connections/>
</UI>

@ -122,14 +122,9 @@
<ClCompile Include="..\..\src\lpMain\sqliteDB\stationdb.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="qcheckdatadlg.cpp" />
<ClCompile Include="Report.cpp" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="Report.h" />
</ItemGroup>
<ItemGroup>
<QtUic Include="qcheckdatadlg.ui" />
<QtUic Include="Report.ui" />
</ItemGroup>
<ItemGroup>
<QtRcc Include="Report.qrc" />

@ -36,9 +36,6 @@
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Report.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\lpMain\sqliteDB\databasesql.cpp">
<Filter>db</Filter>
</ClCompile>
@ -62,9 +59,6 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<QtMoc Include="Report.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="..\..\src\lpMain\sqliteDB\databasesql.h">
<Filter>db</Filter>
</QtMoc>
@ -79,9 +73,6 @@
</QtMoc>
</ItemGroup>
<ItemGroup>
<QtUic Include="Report.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="qcheckdatadlg.ui">
<Filter>Form Files</Filter>
</QtUic>

@ -1,4 +1,3 @@
#include "Report.h"
#include <QtWidgets/QApplication>
#include "stationdb.h"
#include "qcheckdatadlg.h"

@ -329,8 +329,6 @@ Q_SLOT void QCheckDataDlg::onTBUI_ItemClick(const QModelIndex & index)
}
}
}
int i = 0;
}
Q_SLOT void QCheckDataDlg::onSlowPixmap(QSqlQuery sql)

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>902</width>
<height>598</height>
<width>978</width>
<height>633</height>
</rect>
</property>
<property name="windowTitle">
@ -81,6 +81,11 @@
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="title">
<string>查询操作</string>
</property>
@ -192,6 +197,11 @@
<verstretch>8</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="title">
<string/>
</property>
@ -276,7 +286,13 @@
</widget>
</item>
<item row="0" column="0" colspan="7">
<widget class="QTableView" name="tableView"/>
<widget class="QTableView" name="tableView">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="0" colspan="7">
<widget class="QLabel" name="check_fileName">
@ -304,6 +320,11 @@
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>

@ -82,6 +82,10 @@ CMainWin::CMainWin(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
lpSysLog::instance()->Init();
lpSysConfig::instance()->readConfig();
lpSysConfig::instance()->writeConfig();
lpGlobalConfig::instance()->readConfig();
setWindowIcon(QIcon(LEAPER_LOGO));
onInitCoreCtrl();
@ -90,10 +94,7 @@ CMainWin::CMainWin(QWidget *parent)
onInitUI();
onInitStatus();
onInitDiskClean();
lpSysLog::instance()->Init();
lpSysConfig::instance()->readConfig();
lpSysConfig::instance()->writeConfig();
lpGlobalConfig::instance()->readConfig();
SYSLOG_STATUS << "系统启动";
{
QString strPath = QCoreApplication::applicationDirPath();
@ -1071,10 +1072,6 @@ void CMainWin::saveSolution()
}
Q_SLOT void CMainWin::onMainFrameClose()
{
}
//相机触发
Q_SLOT void CMainWin::onSnapImage(int nCamera /*= -1*/)
{
@ -1096,11 +1093,6 @@ Q_SLOT void CMainWin::onTrigImage()
onSnapImage(2);
}
Q_SLOT void CMainWin::onSelModel(int nId, QString strModel)
{
}
Q_SLOT void CMainWin::onChangeUI(QString strUsr, int nLevel)
{
switch (nLevel) {
@ -1303,6 +1295,7 @@ void CMainWin::IEngineResult(QVariantMap vMap)
bool taskCali = vMap.value("taskCali").toBool();//标定标志位 使用有标定图来判断
QString solutionName = vMap.value("solutionName").toString();
QString taskName = vMap.value("taskName").toString();
double taskTime = vMap.value("tasktime").toDouble();
if (taskCali == false)//模板未标定
{
int stationID = 0;
@ -1318,6 +1311,11 @@ void CMainWin::IEngineResult(QVariantMap vMap)
strResult += " No Cali!!!";
emit sgShowLog(stationID, strResult);
sendResult(stationID, 361, 0, 0);
//只保存原图
if ((lpSysConfig::instance()->m_bSaveSrcImg_st1 == true && stationID == 1)
|| (lpSysConfig::instance()->m_bSaveSrcImg_st2 == true && stationID == 2))
genSaveSrcImgPath(taskName, srcImg);
return;
}
//不包含算法检测结果表示没有相关task
@ -1338,6 +1336,10 @@ void CMainWin::IEngineResult(QVariantMap vMap)
strResult += " No Task!!!";
emit sgShowLog(stationID, strResult);
sendResult(stationID, 361, 0, 0);
if ((lpSysConfig::instance()->m_bSaveSrcImg_st1 == true && stationID == 1)
|| (lpSysConfig::instance()->m_bSaveSrcImg_st2 == true && stationID == 2))
genSaveSrcImgPath(taskName, srcImg);
}
else {
QVariantMap algResult = vMap.value("AlgoResult").toMap();
@ -1348,8 +1350,6 @@ void CMainWin::IEngineResult(QVariantMap vMap)
QImage rltImg = algResult.value("image").value<QImage>();
QString strResultTip = algResult.value("resultTip").toString();
QPointF centerPoint = algResult.value("centerPoint").toPointF();
QString taskName = vMap.value("taskName").toString();
double taskTime = vMap.value("tasktime").toDouble();
double centerX = 0.0;
double centerY = 0.0;
@ -1392,8 +1392,6 @@ void CMainWin::IEngineResult(QVariantMap vMap)
nStructData.value1 = strImgPath;
nStructData.value2 = str2;
m_db->addData2DB(nStructData);
// onSaveValveResult(valueRlt);
/*展示结果*/
onShowImage(stationID, rltImg);

@ -95,11 +95,9 @@ private://
private:
void saveSolution();
int lastNum(QString str);
Q_SLOT void onMainFrameClose();
Q_SLOT void onSnapImage(int nCamera = -1);
Q_SLOT void onTrigImage();
Q_SLOT void onSelModel(int, QString);
Q_SLOT void onChangeUI(QString strUsr, int nLevel);
Q_SLOT void onLogInOut(QString strName, int level, int state);
Q_SLOT void onTestMode(int);

@ -14,6 +14,14 @@ QModelMangerUI::QModelMangerUI(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
m_srcImgView = replaceWidget<lpImgViewer>(ui.widget);
//connect(m_srcImgView, SIGNAL(filterroiChanged(const AwesomeRoiInfo&, QString)), this, SLOT(onROIChange(const AwesomeRoiInfo&, QString)));
//connect(m_srcImgView, SIGNAL(pixelClicked(QPoint)), this, SLOT(onPixelClicked(QPoint)));
//connect(m_srcImgView, SIGNAL(roiLockIng(QString)), this, SLOT(onRoiLockIng(QString)));
//connect(m_srcImgView, SIGNAL(sgImageScale(qreal)), this, SLOT(onImageScale(qreal)));
ui.wf_model_mod_button->setVisible(false);
connect(ui.wf_model_select_button, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.wf_model_add_button, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
@ -24,6 +32,27 @@ QModelMangerUI::QModelMangerUI(QWidget *parent)
QModelMangerUI::~QModelMangerUI()
{
if (m_srcImgView) {
delete m_srcImgView;
m_srcImgView = nullptr;
}
}
template<typename _Widget>
_Widget* QModelMangerUI::replaceWidget(QWidget* pSrcWidget)
{
if (!pSrcWidget) {
return nullptr;
}
QWidget* pParent = qobject_cast<QWidget*>(pSrcWidget->parent());
if (!pParent) {
return nullptr;
}
_Widget* pDstWidget = new _Widget;
auto *pFrom = pParent->layout()->replaceWidget(pSrcWidget, pDstWidget);
delete pFrom;
delete pSrcWidget;
return pDstWidget;
}
Q_SLOT void QModelMangerUI::onButtonClicked()
@ -117,6 +146,44 @@ int QModelMangerUI::lastNum(QString str)
return str.right(1).toInt();
}
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);
if (pStation) {
QString strModel = pStation->model(index.row());
QString strName = QObject::tr("Ä£ÐͺÅ:") + strModel;
int plcIndex = m_pCtrl->IGetPLCIndex(key, strModel);
ui.label_Name->setText(strModel);
QImage img = m_pCtrl->IGetStandardImg(key, strModel);
if (img.isNull())
{
img.load(":/Resource/no-img.png");
}
int widgetWidth = m_srcImgView->width();
int imgWidth = img.width();
float scalew = (widgetWidth*1.0) / (imgWidth*1.0);
int widgetHeight = m_srcImgView->height();
int imgHeight = img.height();
float scaleh = (widgetHeight*1.0) / (imgHeight*1.0);
float minScale = scalew < scaleh ? scalew : scaleh;
// m_srcImgView->setIsAutoResetToWindowSize(true);
// m_srcImgView->setIsAutoResetTransform(true);
m_srcImgView->setInitScale(minScale - 0.01);
m_srcImgView->clear();
m_srcImgView->setImg(img);
}
return true;
}
Q_SLOT bool QModelMangerUI::OnCellDoubleClicked(const QModelIndex &index)
{
QString strListName = sender()->objectName();
@ -175,31 +242,16 @@ Q_SLOT void QModelMangerUI::onCheckBoxChange(int state)
if (state > 0)
{
ui.wf_model_select_button->setDisabled(true);
// if (m_pCtrl)
// m_pCtrl->ISetOnlineModel(true);
lpGlobalConfig::instance()->m_bOnlineMode = true;
lpGlobalConfig::instance()->writeConfig();
}
else {
ui.wf_model_select_button->setDisabled(false);
// if (m_pCtrl)
// m_pCtrl->ISetOnlineModel(false);
lpGlobalConfig::instance()->m_bOnlineMode = false;
lpGlobalConfig::instance()->writeConfig();
}
}
// IStation * QModelMangerUI::getStation(int nIndex)
// {
// if (nIndex == -1) {
// QWidget *pWidget = ui.tabWidgetStation->currentWidget();
// if (pWidget) {
// nIndex = lastNum(pWidget->objectName());
// }
// }
// return m_pCtrl->IGetStationById(nIndex);
// }
void QModelMangerUI::showEvent(QShowEvent *event)
{
if (m_pCtrl) {
@ -247,6 +299,7 @@ void QModelMangerUI::onInitModelList(IWfCtrl *pCtrl)
pW->setObjectName(strObjName);
ui.tabWidgetStation->addTab((QWidget*)pW, var);
pStation->setView(pW);
connect(pW, SIGNAL(clicked(const QModelIndex &)), this, SLOT(OnCellClicked(const QModelIndex &)));
connect(pW, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(OnCellDoubleClicked(const QModelIndex &)));
nIndex++;
}

@ -3,6 +3,7 @@
#include <QWidget>
#include "ui_QModelMangerUI.h"
#include "Station.h"
#include "lpImgViewer.h"
class QModelMangerUI : public QWidget
{
@ -16,9 +17,13 @@ public:
Q_SLOT void onButtonClicked();
int lastNum(QString str);
Q_SLOT bool OnCellDoubleClicked(const QModelIndex &index);
Q_SLOT bool OnCellClicked(const QModelIndex &index);//单击事件
Q_SLOT bool OnCellDoubleClicked(const QModelIndex &index);//双击事件
Q_SLOT void onCheckBoxChange(int state);
QString currentTab();
template<typename _Widget>
_Widget* replaceWidget(QWidget* pSrcWidget);
protected:
virtual void showEvent(QShowEvent *event);
virtual void closeEvent(QCloseEvent *event);
@ -27,6 +32,9 @@ private:
Ui::QModelMangerUI ui;
IWfCtrl *m_pCtrl{ nullptr };
QMap<QString, QString> m_tabViewKeys;
lpImgViewer *m_srcImgView{ nullptr };
};
#endif

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>671</width>
<height>450</height>
<width>856</width>
<height>509</height>
</rect>
</property>
<property name="font">
@ -20,172 +20,250 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidgetStation">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>23</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>44444</height>
</size>
</property>
<property name="tabPosition">
<enum>QTabWidget::North</enum>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
<item>
<widget class="QTabWidget" name="tabWidgetStation">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>5</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>23</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>44444</height>
</size>
</property>
<property name="tabPosition">
<enum>QTabWidget::North</enum>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>4</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>标定图:</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="0" column="0">
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>358</width>
<height>358</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>358</width>
<height>358</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(170, 255, 127);</string>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>型号名:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_Name">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>xxxx</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QFrame" name="frame">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QPushButton" name="wf_model_add_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>添加</string>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QFrame" name="frame">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="wf_model_mod_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
<property name="topMargin">
<number>3</number>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
<property name="rightMargin">
<number>3</number>
</property>
<property name="text">
<string>修改</string>
<property name="bottomMargin">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="wf_model_delete_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>删除</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="wf_model_select_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>设置为当前运行模型</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="wf_chkbox_read_mode_from_plc">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>从PLC获取当前模型</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mLblModelState">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>25</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
<item>
<widget class="QPushButton" name="wf_model_add_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>添加</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="wf_model_mod_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>修改</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="wf_model_delete_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>删除</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="wf_model_select_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>设置为当前运行模型</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="wf_chkbox_read_mode_from_plc">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>从PLC获取当前模型</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="mLblModelState">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>25</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>

@ -25,6 +25,6 @@ lpMain::~lpMain()
void lpMain::showWidget()
{
m_wid.show();
m_wid.showMaximized();
}

Loading…
Cancel
Save