|
|
|
|
@ -157,6 +157,7 @@ void resetResultDialog(QDialog* window)
|
|
|
|
|
plot->setCurveData(QVector<iCurveDesc>());
|
|
|
|
|
plot->runUpdate();
|
|
|
|
|
}
|
|
|
|
|
window->setProperty("nmResultDirty", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QSet<QString> hiddenSensitiveCurves(iGuiPlot* plot)
|
|
|
|
|
@ -363,6 +364,11 @@ void nmSubWndMain::onPebiResultSnapshotChanged()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 项目读取或结果井切换后清理旧图,保留数据,等待设置窗口请求显示。
|
|
|
|
|
const char* names[] = { "nmForecastResult", "nmSensitivityLoglog", "nmSensitivityHistory", "nmSensitivityHistogram" };
|
|
|
|
|
for(int i = 0; i < 4; ++i)
|
|
|
|
|
resetResultDialog(pSubWndFitting->findChild<QDialog*>(names[i]));
|
|
|
|
|
|
|
|
|
|
QSharedPointer<const nmPebiResultSnapshot> pSnapshot =
|
|
|
|
|
pDataManager->getPebiResultSnapshot();
|
|
|
|
|
if(pSnapshot.isNull()) {
|
|
|
|
|
@ -372,12 +378,6 @@ void nmSubWndMain::onPebiResultSnapshotChanged()
|
|
|
|
|
|
|
|
|
|
const QString sSnapshotId = pSnapshot->getSnapshotId();
|
|
|
|
|
if(sSnapshotId == m_sObservedPebiResultSnapshotId) {
|
|
|
|
|
// 切换结果井时关闭上一口井的敏感性窗口及附属表格,保留批次数据供再次查看。
|
|
|
|
|
const char* names[] = { "nmSensitivityLoglog", "nmSensitivityHistory", "nmSensitivityHistogram" };
|
|
|
|
|
for(int i = 0; i < 3; ++i) {
|
|
|
|
|
QDialog* window = pSubWndFitting->findChild<QDialog*>(names[i]);
|
|
|
|
|
if(window) window->close();
|
|
|
|
|
}
|
|
|
|
|
// 同一快照内切换结果井仍由 onWellSelected() 处理,不重复刷新全部结果页面。
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@ -2210,18 +2210,45 @@ void nmSubWndMain::onShowSensitiveResults()
|
|
|
|
|
{
|
|
|
|
|
nmDataAnalyzeManager* manager = m_pResultRefreshDataManager.data();
|
|
|
|
|
iSubWndFitting* fitting = m_pResultRefreshFitting.data();
|
|
|
|
|
if(!manager || !fitting || !manager->getSensitiveData()) return;
|
|
|
|
|
// 新批次先清理已有窗口的旧数据,再复用原窗口显示结果。
|
|
|
|
|
if(!manager || !fitting) return;
|
|
|
|
|
// 新批次先清理已有窗口的旧数据,默认只重绘并显示双对数图。
|
|
|
|
|
const char* names[] = { "nmSensitivityLoglog", "nmSensitivityHistory", "nmSensitivityHistogram" };
|
|
|
|
|
for(int i = 0; i < 3; ++i)
|
|
|
|
|
resetResultDialog(fitting->findChild<QDialog*>(names[i]));
|
|
|
|
|
for(int i = 0; i < 3; ++i) {
|
|
|
|
|
QDialog* window = fitting->findChild<QDialog*>(names[i]);
|
|
|
|
|
resetResultDialog(window);
|
|
|
|
|
}
|
|
|
|
|
onSensitiveFilterChanged();
|
|
|
|
|
updateSensitiveHistoryPlot();
|
|
|
|
|
updateSensitiveHistogramPlot();
|
|
|
|
|
const QSharedPointer<nmDataSensitive::BatchResult> result = manager->getSensitiveData()->getResults();
|
|
|
|
|
onShowSensitiveResult(nmWxSensitive::LoglogResult);
|
|
|
|
|
if(sender() == manager) fitting->setModified(true);
|
|
|
|
|
if(result.isNull()) return;
|
|
|
|
|
QDialog* window = fitting->findChild<QDialog*>("nmSensitivityLoglog");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmSubWndMain::onShowSensitiveResult(int plotType)
|
|
|
|
|
{
|
|
|
|
|
// 仅从数据中心读取已有批次,已打开的图直接恢复并激活,不重复绘制。
|
|
|
|
|
nmDataAnalyzeManager* manager = m_pResultRefreshDataManager.data();
|
|
|
|
|
iSubWndFitting* fitting = m_pResultRefreshFitting.data();
|
|
|
|
|
if(!manager || !fitting || !manager->getSensitiveData()) return;
|
|
|
|
|
const QSharedPointer<nmDataSensitive::BatchResult> result = manager->getSensitiveData()->getResults();
|
|
|
|
|
if(result.isNull() || plotType < nmWxSensitive::LoglogResult ||
|
|
|
|
|
plotType > nmWxSensitive::HistogramResult) return;
|
|
|
|
|
if(plotType == nmWxSensitive::HistogramResult && result->m_calcType != nmDataSensitive::CALC_MONTE_CARLO) return;
|
|
|
|
|
const char* names[] = { "nmSensitivityLoglog", "nmSensitivityHistory", "nmSensitivityHistogram" };
|
|
|
|
|
QDialog* window = fitting->findChild<QDialog*>(names[plotType]);
|
|
|
|
|
if(window && !window->property("nmResultDirty").toBool()) {
|
|
|
|
|
if(window->isMinimized()) window->showNormal();
|
|
|
|
|
else window->show();
|
|
|
|
|
window->raise();
|
|
|
|
|
window->activateWindow();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(plotType == nmWxSensitive::HistoryResult) {
|
|
|
|
|
updateSensitiveHistoryPlot();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(plotType == nmWxSensitive::HistogramResult) {
|
|
|
|
|
updateSensitiveHistogramPlot();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 与预测一致,直接在结果对话框内创建框架绘图控件,不经过主界面 MDI。
|
|
|
|
|
if(!window) {
|
|
|
|
|
window = createResultDialog("nmSensitivityLoglog", tr("Sensitivity loglog plot"));
|
|
|
|
|
@ -2295,6 +2322,7 @@ void nmSubWndMain::onShowSensitiveResults()
|
|
|
|
|
plot->setReadOnly(true);
|
|
|
|
|
plot->freshAxisScales(true, false);
|
|
|
|
|
plot->show();
|
|
|
|
|
window->setProperty("nmResultDirty", false);
|
|
|
|
|
if(window->isMinimized()) window->showNormal();
|
|
|
|
|
else window->show();
|
|
|
|
|
window->raise();
|
|
|
|
|
@ -2396,6 +2424,7 @@ void nmSubWndMain::updateSensitiveHistoryPlot()
|
|
|
|
|
plot->freshAxisScales(true, true);
|
|
|
|
|
}
|
|
|
|
|
history->show();
|
|
|
|
|
window->setProperty("nmResultDirty", false);
|
|
|
|
|
if(window->isMinimized()) window->showNormal();
|
|
|
|
|
else window->show();
|
|
|
|
|
// 历史图只显示曲线,隐藏框架默认的空数据表侧栏。
|
|
|
|
|
@ -2583,6 +2612,7 @@ void nmSubWndMain::updateSensitiveHistogramPlot()
|
|
|
|
|
plot->setAxisScaleY(0.0, top, ticksY);
|
|
|
|
|
plot->setAxisScaleY2(0.0, 110.0, ticksY2);
|
|
|
|
|
plot->show();
|
|
|
|
|
window->setProperty("nmResultDirty", false);
|
|
|
|
|
if(window->isMinimized()) window->showNormal();
|
|
|
|
|
else window->show();
|
|
|
|
|
window->raise();
|
|
|
|
|
|