|
|
|
|
|
#include "zxLogInstance.h"
|
|
|
|
|
|
#include "ZxBaHelper.h"
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
#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"
|
|
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
|
#include "ZxDataGaugeP.h"
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
|
#include "nmXmlHelper.h"
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include "nmDataDemo.h"
|
|
|
|
|
|
#include "nmDataAnalyzeManager.h"
|
|
|
|
|
|
#include "nmDataLogFile.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "nmGuiPlot.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "nmSubWndPostprocessing.h"
|
|
|
|
|
|
#include "nmWxPebiResultViewWidget.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <QVector>
|
|
|
|
|
|
#include <QProcess>
|
|
|
|
|
|
|
|
|
|
|
|
nmSubWndPostprocessing::nmSubWndPostprocessing(
|
|
|
|
|
|
nmDataAnalyzeManager* pDataManager,
|
|
|
|
|
|
QWidget *parent,
|
|
|
|
|
|
QString sExt) :
|
|
|
|
|
|
iSubWndBaseFit(parent, sExt),
|
|
|
|
|
|
m_pDataManager(pDataManager),
|
|
|
|
|
|
m_pResultView(nullptr)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_sMdiWndType = s_MdiType_DataAnal;
|
|
|
|
|
|
setWindowTitle(tr("nmSubWndPostprocessing"));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
nmSubWndPostprocessing::~nmSubWndPostprocessing()
|
|
|
|
|
|
{
|
|
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmSubWndPostprocessing::setDataManager(
|
|
|
|
|
|
nmDataAnalyzeManager* pDataManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_pDataManager = pDataManager;
|
|
|
|
|
|
if(!m_pResultView.isNull()) {
|
|
|
|
|
|
// 已有独立窗口复用同一个渲染基础设施,只切换其显式数据来源。
|
|
|
|
|
|
m_pResultView->setDataManager(pDataManager);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
nmDataAnalyzeManager* nmSubWndPostprocessing::getDataManager() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_pDataManager.data();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmSubWndPostprocessing::configWnd(QString sPrevInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
iSubWndBaseFit::configWnd(sPrevInfo);
|
|
|
|
|
|
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);
|
|
|
|
|
|
qDebug() << QString("%1: %2").arg(pData->m_sName).arg(pData->m_sAlias);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QWidget* nmSubWndPostprocessing::initUiMainWx()
|
|
|
|
|
|
{
|
|
|
|
|
|
// 业务窗口只组合新结果视图,Manager 为空时由控件显示稳定空状态。
|
|
|
|
|
|
m_pResultView = new nmWxPebiResultViewWidget(
|
|
|
|
|
|
m_pDataManager.data(), NULL);
|
|
|
|
|
|
return m_pResultView.data();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool nmSubWndPostprocessing::runCmdBy(QString sName, QString sID)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (sID.toInt() == 5601) {
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|