1、修改分析基础数据获取的方式为单例;

feature/ribbon-menu-20240927
simonyan 2 weeks ago
parent 6c82d054b2
commit ad6e208835

@ -49,7 +49,7 @@ nmSubWndGrid::nmSubWndGrid(QWidget *parent, QString sExt) :
iSubWndBaseAF(parent, sExt)
{
m_sMdiWndType = s_MdiType_DataNum;
m_pAnalyzeData = NULL;
m_pAnalyzeData = nmDataDemo::getInstance();
setWindowTitle(tr("nmSubWndGrid"));
}

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

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

@ -19,7 +19,7 @@
nmWxNewNormalDlg::nmWxNewNormalDlg(nmDataDemo* dataPtr)
{
this->m_pAnalyzeData = dataPtr;
this->m_pAnalyzeData = nmDataDemo::getInstance();
m_mainLayout = NULL;
m_nameEdit = NULL;
m_checkboxWater = NULL;

Loading…
Cancel
Save