From 9e71a3986fc0e6e478b178d235b3f3f87c83fd6f Mon Sep 17 00:00:00 2001 From: lh <2334563547@qq.com> Date: Mon, 15 Jun 2026 17:09:24 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9AnmSubWndUtils=20=E4=B8=AD=E5=8A=A0?= =?UTF-8?q?=E8=BD=BDNM=E5=8F=82=E6=95=B0XML=E5=B9=B6=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E4=B8=BA=20nmWxParaPropert?= =?UTF-8?q?yPebi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/nmNum/nmSubWnd/nmSubWndUtils.cpp | 51 ++++++++++++---------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp b/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp index d8a487b..f08a5c3 100644 --- a/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp +++ b/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp @@ -41,9 +41,13 @@ #include "nmDataAnalyzeManager.h" #include "iRibbonXmlTab.h" #include "nmWxParameterProperty.h" +#include "nmWxParaPropertyPebi.h" #include "nmWxNumericalDesign.h" #include "nmDataOutline.h" +#include "iSysParaHelper.h" +#include "mModuleDefines.h" + #include "ZxRstWnd.h" #include "nmWxChangeAnal.h" @@ -83,6 +87,16 @@ nmSubWndUtils::nmSubWndUtils() { m_pMainWnd = nullptr; m_pTabWx = nullptr; + + // 加载NM模块专用参数定义XML(Bin/XmlFiles/ModelParaDefinesNM_cn.xml) + { + QString sXmlDir = ZxBaseUtil::getDirOf(s_Dir_Config, zxAppID); + QString sFileNm = QString("%1ModelParaDefinesNM_cn.xml").arg(sXmlDir); + if (!_paraHelper->loadParaDefines(sFileNm, s_Nm_Serie)) + { + zxLogInstance::getInstance()->writeLogF("Failed to load NM para defines: " + sFileNm); + } + } } nmSubWndUtils::~nmSubWndUtils() {} @@ -352,35 +366,6 @@ bool nmSubWndUtils::fillNmDockWxs(iSubWnd* pSubWnd) return false; } - // 如果当前分析没有对应相态的PVT相关参数,提示并返回 - //PvtFluidType eType = pSubWndF->getBasicPft(); - //bool bHasPvtData = false; - - //if(eType == WFT_Oil) { - // bHasPvtData = hasPvtCurve(pSubWndF, WFT_Oil, QStringList() << "Rs" << "Bo" << "Co" << "Rhoo" << "Miuo"); - //} else if(eType == WFT_Gas) { - // bHasPvtData = hasPvtCurve(pSubWndF, WFT_Gas, QStringList() << "Rv" << "Bg" << "Cg" << "Miug" << "Rhog" << "Zg"); - //} else if(eType == WFT_Water) { - // bHasPvtData = hasPvtCurve(pSubWndF, WFT_Water, QStringList() << "Rsw" << "Bw" << "Cw" << "Miuw" << "Rhow"); - //} else if(eType == WFT_Oil_Water) { - // bHasPvtData = hasPvtCurve(pSubWndF, WFT_Oil, QStringList() << "Rs" << "Bo" << "Co" << "Rhoo" << "Miuo") - // || hasPvtCurve(pSubWndF, WFT_Water, QStringList() << "Rsw" << "Bw" << "Cw" << "Miuw" << "Rhow"); - //} - - //if(!bHasPvtData) { - // QString appDir = QCoreApplication::applicationDirPath(); - // appDir = appDir.section('/', 0, -2); // 获取上一级目录 - - // QMessageBox msgBox; - // msgBox.setWindowTitle(tr("PVT Data Missing")); - // msgBox.setText(tr("Please check if PVT parameters have been calculated in the analysis.")); - // msgBox.setIconPixmap(QPixmap(appDir + "/Res/Icon/NmPVTDataMissMessage.png")); // PVT 参数计算向导 - // msgBox.setStandardButtons(QMessageBox::Ok); - // msgBox.exec(); - - // return false; - //} - iDockBaseWx* pWxDockNm1 = pSubWndF->getNmDockWx(0); iDockBaseWx* pWxDockNm2 = pSubWndF->getNmDockWx(1); Q_ASSERT (nullptr != pWxDockNm1); @@ -598,7 +583,13 @@ bool nmSubWndUtils::fillNmDockWxs(iSubWnd* pSubWnd) //QTextEdit* pWx1 = new QTextEdit("This is demo for upper"); //QTextEdit* pWx2 = new QTextEdit("This is demo for lower"); nmWxNumericalDesign* pAnalWx = new nmWxNumericalDesign(); - nmWxParameterProperty* pParaWx = new nmWxParameterProperty(); + nmWxParaPropertyPebi* pParaWx = new nmWxParaPropertyPebi(); + pParaWx->initUI(); + + QStringList listParas; + listParas << "h" << "Pi" << "K" << "phi" << "Cti" << "Cf" << "Soi" << "Swi"; + + pParaWx->refreshUIs(listParas); // 建立求解调用连接 connect(pAnalWx, SIGNAL(sigGenerateClicked()),