From 9861d9a112aaa7b9afd1832c69acc6ea70b7cf18 Mon Sep 17 00:00:00 2001 From: simonyan <315082291@qq.com> Date: Wed, 23 Oct 2024 13:21:08 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AE=9E=E7=8E=B0=E5=9C=A8subWnd?= =?UTF-8?q?=E4=B8=AD=E6=98=BE=E7=A4=BA=E5=90=8E=E5=A4=84=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nmNum/nmSubWnd/nmSubWndPostprocessing.h | 27 +++++ Src/nmNum/nmSubWnd/nmSubWndMain.cpp | 6 +- Src/nmNum/nmSubWnd/nmSubWndPostprocessing.cpp | 103 ++++++++++++++++++ Src/nmNum/nmSubWnd/nmSubWndUtils.cpp | 4 + 4 files changed, 137 insertions(+), 3 deletions(-) create mode 100644 Include/nmNum/nmSubWnd/nmSubWndPostprocessing.h create mode 100644 Src/nmNum/nmSubWnd/nmSubWndPostprocessing.cpp diff --git a/Include/nmNum/nmSubWnd/nmSubWndPostprocessing.h b/Include/nmNum/nmSubWnd/nmSubWndPostprocessing.h new file mode 100644 index 0000000..3d2bd6a --- /dev/null +++ b/Include/nmNum/nmSubWnd/nmSubWndPostprocessing.h @@ -0,0 +1,27 @@ +#pragma once + +#include "iSubWndBaseAF.h" +#include "nmSubWnd_global.h" + +class NM_SUB_WND_EXPORT nmSubWndPostprocessing : public iSubWndBaseAF +{ + Q_OBJECT + +public: + explicit nmSubWndPostprocessing(QWidget *parent = 0, QString sExt = ""); + ~nmSubWndPostprocessing(); + + // 配置窗体 + virtual void configWnd(); + + // 初始化UI + virtual void initUI(); + virtual QWidget* initUiMainWx(); + +public: + // 执行命令:通常来自Ribbon + virtual bool runCmdBy(QString sName, QString sID); + +private: + +}; diff --git a/Src/nmNum/nmSubWnd/nmSubWndMain.cpp b/Src/nmNum/nmSubWnd/nmSubWndMain.cpp index 2ccc2de..dfd63f0 100644 --- a/Src/nmNum/nmSubWnd/nmSubWndMain.cpp +++ b/Src/nmNum/nmSubWnd/nmSubWndMain.cpp @@ -310,9 +310,9 @@ bool nmSubWndMain::runCmdBy(QString sName, QString sID) case 5312: this->identificationRegion(); return true; - case 5401: - this->generationMesh(); - return true; +// case 5401: +// this->generationMesh(); +// return true; case 5501: return true; } diff --git a/Src/nmNum/nmSubWnd/nmSubWndPostprocessing.cpp b/Src/nmNum/nmSubWnd/nmSubWndPostprocessing.cpp new file mode 100644 index 0000000..2997a9b --- /dev/null +++ b/Src/nmNum/nmSubWnd/nmSubWndPostprocessing.cpp @@ -0,0 +1,103 @@ + +#include "zxLogInstance.h" +#include "ZxBaHelper.h" +#include "ZxResolutionHelper.h" +#include "zxSysUtils.h" +#include "ZxPtyDock.h" +#include "iDockBaseWx.h" +#include "ZxMainWindow.h" + +#include "ZxSubAxisX.h" +#include "ZxSubAxisY.h" + +#include "ZxPlot.h" +#include "ZxObjCurve.h" +#include "ZxSubTitle.h" +#include "tCurvePlotScene.h" +#include "tCurvePlotView.h" + +#include "ZxTableView.h" +#include "ZxTableModel.h" + +#include "mModuleDefines.h" + +#include "ZxDataWell.h" +#include "ZxDataProject.h" +#include "ZxRstJobWnd.h" +#ifdef QT_DEBUG + #include "ZxDataGaugeP.h" +#endif + +#ifdef QT_DEBUG + #include "nmXmlHelper.h" +#endif + +#include "nmSubWndPostprocessing.h" +#include "nmDataDemo.h" + +#include "nmDataLogFile.h" + +#include "nmWxGridVTKContainerWidget.h" + +#include + +nmSubWndPostprocessing::nmSubWndPostprocessing(QWidget *parent, QString sExt) : + iSubWndBaseAF(parent, sExt) +{ + m_sMdiWndType = s_MdiType_DataNum; + setWindowTitle(tr("nmSubWndPostprocessing")); +} + +nmSubWndPostprocessing::~nmSubWndPostprocessing() +{ +#ifdef QT_DEBUG +#endif +} + +void nmSubWndPostprocessing::configWnd() +{ + iSubWndBaseAF::configWnd(); + if (NULL != m_pMainWindow) { + disconnect(this, SIGNAL(sigAppendDock2Main(iDockBaseWx*, Qt::DockWidgetArea)), \ + m_pMainWindow, SLOT(slotAppendDock2Main(iDockBaseWx*, Qt::DockWidgetArea))); + connect(this, SIGNAL(sigAppendDock2Main(iDockBaseWx*, Qt::DockWidgetArea)), \ + m_pMainWindow, SLOT(slotAppendDock2Main(iDockBaseWx*, Qt::DockWidgetArea))); + } + initUI(); +} + +void nmSubWndPostprocessing::initUI() +{ + // 主布局:定义 + initUiMain(); + // 外围布局,DockWx + { + initUiDockWxs(); + initUiDockPtys(); + } +#ifdef QT_DEBUG + // 示例:如何加载xml文件 + if (_nmXmlHelper->loadXmlDefines()) { + foreach (nmXmlData* pData, *(_nmXmlHelper->getVecNmXmlDataPtrs())) { + Q_ASSERT (NULL != pData); + zxLogRunD(QString("%1: %2").arg(pData->m_sName).arg(pData->m_sAlias)); + } + } +#endif +} + +QWidget* nmSubWndPostprocessing::initUiMainWx() +{ + // TODO,返回网格的视图 + nmWxGridVTKContainerWidget* vtkWidget = new nmWxGridVTKContainerWidget; + return vtkWidget; +} + +bool nmSubWndPostprocessing::runCmdBy(QString sName, QString sID) +{ + if (sID.toInt() == 5401) { + return true; + } + return false; +} + diff --git a/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp b/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp index 331d7a6..ccfcf02 100644 --- a/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp +++ b/Src/nmNum/nmSubWnd/nmSubWndUtils.cpp @@ -1,6 +1,7 @@ #include "zxLogInstance.h" #include "iRibbonXmlCmd.h" #include "nmSubWndMain.h" +#include "nmSubWndPostprocessing.h" #include "nmSubWndUtils.h" #include "nmNewDlg.h" @@ -39,6 +40,9 @@ iSubWnd* nmSubWndUtils::createSubWnd(QString sID, QString sExt) nmSubWndMain* pSubWndDemo = new nmSubWndMain(NULL, sExt); pSubWndDemo->setAnalyzeData(analyzeData); pSubWnd = pSubWndDemo; + } else if (nID == 5401) { + nmSubWndPostprocessing* pSubWndPostProcessing = new nmSubWndPostprocessing(NULL, sExt); + pSubWnd = pSubWndPostProcessing; } if (NULL != pSubWnd) { // TODO 此处根据需要设置 改变 标识