1、数值试井数据采用单例模式;

feature/ribbon-menu-20240927
simonyan 2 weeks ago
parent ad6e208835
commit 5cc5ba5093

@ -49,7 +49,7 @@ nmSubWndGrid::nmSubWndGrid(QWidget *parent, QString sExt) :
iSubWndBaseAF(parent, sExt) iSubWndBaseAF(parent, sExt)
{ {
m_sMdiWndType = s_MdiType_DataNum; m_sMdiWndType = s_MdiType_DataNum;
m_pAnalyzeData = nmDataDemo::getInstance(); m_pAnalyzeData = nmDataDemo::getInstance();
setWindowTitle(tr("nmSubWndGrid")); setWindowTitle(tr("nmSubWndGrid"));
} }
@ -102,7 +102,7 @@ QWidget* nmSubWndGrid::initUiMainWx()
nmDataLogFile::getInstance()->writeLog(QString("%1 %2").arg(p.x()).arg(p.y())); nmDataLogFile::getInstance()->writeLog(QString("%1 %2").arg(p.x()).arg(p.y()));
} }
nmDataLogFile::getInstance()->writeLog("==== outline end ===="); nmDataLogFile::getInstance()->writeLog("==== outline end ====");
QVector<QVector<double>> wellList = pPlot->getWellsInformation(); QVector<QVector<double >> wellList = pPlot->getWellsInformation();
nmDataLogFile::getInstance()->writeLog("==== " + QString::number(outlineInformation.count()) + " ===="); nmDataLogFile::getInstance()->writeLog("==== " + QString::number(outlineInformation.count()) + " ====");
nmDataLogFile::getInstance()->writeLog("==== " + QString::number(wellList.count()) + " ===="); nmDataLogFile::getInstance()->writeLog("==== " + QString::number(wellList.count()) + " ====");
// 根据边界和井的信息生成geo文件先生成一个文件到tmp中 // 根据边界和井的信息生成geo文件先生成一个文件到tmp中
@ -124,7 +124,7 @@ bool nmSubWndGrid::runCmdBy(QString sName, QString sID)
return false; return false;
} }
void nmSubWndGrid::genGeo(QVector<QPointF> outlinePoints, QVector<QVector<double>> vWellsInfo) void nmSubWndGrid::genGeo(QVector<QPointF> outlinePoints, QVector<QVector<double >> vWellsInfo)
{ {
// 井数据结构 // 井数据结构
QVector<CircleWell> circles; QVector<CircleWell> circles;

@ -67,7 +67,7 @@ nmSubWndMain::nmSubWndMain(QWidget *parent, QString sExt) :
m_pDataWell = zxCurWell; m_pDataWell = zxCurWell;
} }
m_sMdiWndType = s_MdiType_DataNum; m_sMdiWndType = s_MdiType_DataNum;
m_pAnalyzeData = nmDataDemo::getInstance(); m_pAnalyzeData = nmDataDemo::getInstance();
setWindowTitle(tr("nmSubWndMain")); setWindowTitle(tr("nmSubWndMain"));
} }

@ -26,19 +26,15 @@ iSubWnd* nmSubWndUtils::createSubWnd(QString sID, QString sExt)
int nID = sID.toInt(); int nID = sID.toInt();
if (nID == 5101) { if (nID == 5101) {
// 初始化一个数据类 // 初始化一个数据类
//nmDataDemo* analyzeData = nmDataDemo::getInstance();
// TODO先弹窗做新建分析再创建subWnd // TODO先弹窗做新建分析再创建subWnd
nmWxNewNormalDlg* dlg = new nmWxNewNormalDlg(NULL); nmWxNewNormalDlg dlg(NULL);
//dlg->show(); if(dlg.exec() == QDialog::Rejected) {
/*QDialog* dlg = new QDialog;
dlg->show();*/
if(dlg->exec() == QDialog::Rejected) {
// 对话框被用户显式拒绝 // 对话框被用户显式拒绝
// 在这里处理你的逻辑 // 在这里处理你的逻辑
return nullptr; return nullptr;
} }
nmSubWndMain* pSubWndDemo = new nmSubWndMain(NULL, sExt); nmSubWndMain* pSubWndDemo = new nmSubWndMain(NULL, sExt);
pSubWnd = pSubWndDemo; pSubWnd = pSubWndDemo;
} else if (nID == 5401) { } else if (nID == 5401) {
// 网格 // 网格
nmSubWndGrid* pSubWndGrid = new nmSubWndGrid(NULL, sExt); nmSubWndGrid* pSubWndGrid = new nmSubWndGrid(NULL, sExt);

Loading…
Cancel
Save