feat:nmSubWndUtils 中加载NM参数XML并替换参数面板为 nmWxParaPropertyPebi

feature/nm-para-property-20260615
lh 3 weeks ago
parent f4f0bf1492
commit 9e71a3986f

@ -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模块专用参数定义XMLBin/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()),

Loading…
Cancel
Save