feat(nmNum): 调整曲线显示控制入口

- 历史图和双对数图新增 Show 按钮,通过表格独立控制显示。
- 保留 Apply、OK、Cancel 操作,Results 用于恢复结果图。
- 重开保留显示选择,新批次重置并清理旧曲线。
feature/Sensitivity-20261012
lvjunjie 1 month ago
parent c375603d22
commit deffe08796

@ -168,6 +168,7 @@ class NM_SUB_WND_EXPORT nmSubWndMain : public iSubWndBaseFit {
void onSensitivityTaskDestroyed();
/** @brief 在框架已有的敏感性子窗口叠加显示本分析的双对数结果。 */
void onShowSensitiveResults();
void onSensitiveShowClicked();
/** @brief 刷新主界面的误差直方图,修改分箱数时复用当前批次结果。 */
void updateSensitiveHistogramPlot();
/** @brief 当前分析的建网提交结束后,恢复待启动或待捕获的求解流程。 */
@ -280,6 +281,8 @@ class NM_SUB_WND_EXPORT nmSubWndMain : public iSubWndBaseFit {
bool initPreHistory(QVector<QVector<double >> & vvecHistoryData, QVector<iCurveDesc>& vecDescs,bool isHistoryData);
// 在分析页面内同步敏感性压力/流量历史图。
void updateSensitiveHistoryPlot();
// 各结果图使用独立的 Show 按钮打开曲线显示表格。
void installSensitiveShow(QWidget* host);
// 根据原始压力数据、计算出半对数、双对数数据
//void calculationLogData(nmDataWellBase* pWellData,QVector<QVector<double>>& vvecHistoryData,QVector<QVector<double>>& vvecLogPreData,QVector<QVector<double>>& vvecSemiLogPreData);

@ -5,7 +5,6 @@
#include "nmSubWxs_global.h"
#include "nmDataSensitive.h"
#include <QPointer>
class QTreeWidget;
class QTreeWidgetItem;
@ -22,9 +21,27 @@ class QIcon;
class SensitivityRunsView;
class nmCalculationDllPebiSolverTask;
class QCloseEvent;
class QDialog;
class SensitivityResultsModel;
class SensitivityDistributionPlot;
class SensitivityResultsModel;
class iGuiPlot;
// 复用原结果表格,每个 Show 窗口只控制所属图中的采样曲线。
class NM_SUB_WXS_EXPORT nmWxSensitivityShow : public iDlgBase
{
Q_OBJECT
public:
nmWxSensitivityShow(const QSharedPointer<nmDataSensitive::BatchResult>& results,
iGuiPlot* plot, QWidget* parent);
private slots:
void onApply();
void onAccept();
void onShowAll();
void onHideAll();
private:
SensitivityResultsModel* m_model;
};
class NM_SUB_WXS_EXPORT nmWxSensitive : public iDlgBase
{
@ -62,10 +79,6 @@ protected:
void onResultsClicked();
void onResultsChanged();
void onModelResultChanged();
void onApplyResults();
void onAcceptResults();
void onShowAllResults();
void onHideAllResults();
private:
void setupUI();
@ -95,8 +108,6 @@ private:
QPushButton *cancelButton;
QPushButton *previewButton;
QPushButton *resultsButton;
QPointer<QDialog> m_resultsDialog;
QPointer<SensitivityResultsModel> m_resultsModel;
// 各个变量页面的控件列表
QList<QComboBox*> m_modeCombos;

@ -112,6 +112,17 @@ namespace
QPointer<nmCalculationDllPebiSolverTask> s_pRunningSolverTask;
QPointer<nmSubWndMain> s_pPendingSolverWindow;
QSet<QString> hiddenSensitiveCurves(iGuiPlot* plot)
{
// 刷新同一批次或重新打开窗口时保留本图的显示选择。
QSet<QString> hidden;
for(int i = 0; i < plot->m_pPlot->getObjCount(); ++i) {
ZxObjCurve* curve = qobject_cast<ZxObjCurve*>(plot->m_pPlot->getObjByIndex(i));
if(curve && !curve->isVisible()) hidden.insert(curve->getName());
}
return hidden;
}
class nmSensitivityHistogramBars : public ZxObjCurveBar
{
public:
@ -1909,6 +1920,7 @@ void nmSubWndMain::onShowSensitiveResults()
plot->m_pPlot->removeObjByIndex(i);
}
plot->clearUndoStack();
plot->setCurveData(QVector<iCurveDesc>());
plot->runUpdate();
QMdiSubWindow* subWindow = nullptr;
for(QWidget* parent = plot->parentWidget(); parent && !subWindow; parent = parent->parentWidget())
@ -1927,6 +1939,8 @@ void nmSubWndMain::onShowSensitiveResults()
tr("Failed to create sensitivity plot."));
return;
}
installSensitiveShow(plot);
const QSet<QString> hidden = sender() == manager ? QSet<QString>() : hiddenSensitiveCurves(plot);
QVector<iCurveDesc> curves;
QVector<QVector<double> > history = result->m_vecHistoryLogLog;
if(history.size() == 3 && history[0].size() == history[1].size() &&
@ -1934,7 +1948,7 @@ void nmSubWndMain::onShowSensitiveResults()
initloglog(history, curves, true);
for(size_t i = 0; i < result->m_runs.size(); ++i) {
const nmDataSensitive::RunResult& run = result->m_runs[i];
if(!run.m_bSucceeded || run.m_bCancelled || !run.m_bVisible) continue;
if(!run.m_bSucceeded || run.m_bCancelled) continue;
QVector<QVector<double> > data = run.m_vecLogLog;
if(data.size() != 3 || data[0].size() != data[1].size() ||
data[0].size() != data[2].size() || data[0].isEmpty()) continue;
@ -1995,6 +2009,9 @@ void nmSubWndMain::onShowSensitiveResults()
if(removed) plot->clearUndoStack();
plot->setCurveData(curves);
plot->runUpdate();
for(int i = 0; i < curves.size(); ++i)
if(ZxObjCurve* curve = plot->getCurve(curves[i].m_sCurveName))
curve->setVisible(!hidden.contains(curve->getName()));
plot->setReadOnly(true);
plot->freshAxisScales(true, false);
// 关闭后仍可通过 Results 恢复;只有新建或恢复窗口时才重新调整内部布局。
@ -2046,6 +2063,7 @@ void nmSubWndMain::updateSensitiveHistoryPlot()
window->setWindowTitle(tr("Sensitivity history plot"));
window->setAttribute(Qt::WA_DeleteOnClose, false);
}
installSensitiveShow(window->widget());
iGuiPlotPF* history = window->findChild<iGuiPlotPF*>();
QVector<iCurveDesc> curves;
// 基准压力、实测压力和流量均取成功求解快照,未求解的参数或制度编辑不参与绘图。
@ -2079,16 +2097,17 @@ void nmSubWndMain::updateSensitiveHistoryPlot()
}
for(size_t i = 0; i < batch->m_runs.size(); ++i) {
const nmDataSensitive::RunResult& run = batch->m_runs[i];
if(!run.m_bSucceeded || run.m_bCancelled || !run.m_bVisible || run.m_vecPressure.size() != 2) continue;
if(!run.m_bSucceeded || run.m_bCancelled || run.m_vecPressure.size() != 2) continue;
QVector<QVector<double> > pressure = run.m_vecPressure;
initPreHistory(pressure, curves, false);
curves.last().m_sCurveName = nmWxSensitive::tr("Run %1 - Pressure").arg(run.m_nRunIndex + 1);
curves.last().m_oPen.setColor(QColor::fromHsv(int((run.m_nRunIndex % 360) * 137 % 360), 190, 190));
}
// 框架不会删除本次未传入的曲线,刷新前清除旧图元,保证 Results 勾选同步生效。
// 刷新前清除旧图元;同一批次保留本图的 Show 选择,新批次恢复全部显示。
iGuiPlot* plots[] = {history->m_pWxPlotP, history->m_pWxPlotF};
for(int i = 0; i < 2; ++i) {
iGuiPlot* plot = plots[i];
const QSet<QString> hidden = sender() == manager ? QSet<QString>() : hiddenSensitiveCurves(plot);
for(int j = plot->m_pPlot->getObjCount() - 1; j >= 0; --j)
if(qobject_cast<ZxObjCurve*>(plot->m_pPlot->getObjByIndex(j))) plot->m_pPlot->removeObjByIndex(j);
plot->clearUndoStack();
@ -2101,6 +2120,9 @@ void nmSubWndMain::updateSensitiveHistoryPlot()
if((curves[j].m_oCurveType == POT_CurveFlow) == (i == 1)) data.append(curves[j]);
plot->setCurveData(data);
plot->runUpdate();
for(int j = 0; j < data.size(); ++j)
if(ZxObjCurve* curve = plot->getCurve(data[j].m_sCurveName))
curve->setVisible(!hidden.contains(curve->getName()));
plot->setReadOnly(true);
plot->freshAxisScales(true, true);
}
@ -2113,6 +2135,49 @@ void nmSubWndMain::updateSensitiveHistoryPlot()
if(created || restore) area->relayoutSubWnds();
}
void nmSubWndMain::installSensitiveShow(QWidget* host)
{
// 使用布局的顶部栏,不改变框架绘图控件及子窗口的创建方式。
if(host->findChild<QPushButton*>("nmSensitivityShowButton")) return;
QWidget* bar = new QWidget(host);
QHBoxLayout* layout = new QHBoxLayout(bar);
layout->setContentsMargins(4, 2, 4, 2);
QPushButton* show = new QPushButton(tr("Show"), bar);
show->setObjectName("nmSensitivityShowButton");
layout->addWidget(show);
layout->addStretch();
host->layout()->setMenuBar(bar);
connect(show, SIGNAL(clicked()), this, SLOT(onSensitiveShowClicked()));
}
void nmSubWndMain::onSensitiveShowClicked()
{
// Show 是普通按钮,每张图复用一个独立的表格窗口。
QPushButton* button = qobject_cast<QPushButton*>(sender());
nmDataAnalyzeManager* manager = m_pResultRefreshDataManager.data();
if(!button || !manager || !manager->getSensitiveData()) return;
QWidget* host = button->parentWidget()->parentWidget();
const QSharedPointer<nmDataSensitive::BatchResult> batch = manager->getSensitiveData()->getResults();
if(batch.isNull()) return;
nmWxSensitivityShow* dialog = host->findChild<nmWxSensitivityShow*>("nmSensitivityShowDialog");
if(!dialog) {
iGuiPlot* plot = qobject_cast<iGuiPlot*>(host);
const bool loglog = plot != nullptr;
if(!plot) {
iGuiPlotPF* history = host->findChild<iGuiPlotPF*>();
if(!history) return;
plot = history->m_pWxPlotP;
}
dialog = new nmWxSensitivityShow(batch, plot, host);
dialog->setWindowTitle(loglog ? tr("Show - Sensitivity loglog plot") : tr("Show - Sensitivity history plot"));
// 发布新批次或清除旧模型后关闭旧表格,不能再操作上一批曲线。
connect(manager, SIGNAL(sigSensitiveResultsChanged()), dialog, SLOT(reject()));
}
dialog->show();
dialog->raise();
dialog->activateWindow();
}
void nmSubWndMain::updateSensitiveHistogramPlot()
{
iSubWndFitting* fitting = m_pResultRefreshFitting.data();

@ -25,10 +25,14 @@
#include <QDialogButtonBox>
#include <QApplication>
#include <QDesktopWidget>
#include <QTableWidget>
#include <QTableView>
#include <QAbstractTableModel>
#include <QMap>
#include <QPointer>
#include "iGuiPlot.h"
#include "ZxPlot.h"
#include "ZxObjCurve.h"
#include <QTableWidget>
#include <QAbstractScrollArea>
#include <QScrollBar>
#include <QWheelEvent>
@ -175,19 +179,30 @@ bool validSamplingValue(const QString& name, double& value)
class SensitivityResultsModel : public QAbstractTableModel
{
public:
explicit SensitivityResultsModel(QObject* parent) : QAbstractTableModel(parent) {}
SensitivityResultsModel(const QSharedPointer<nmDataSensitive::BatchResult>& results,
iGuiPlot* plot, QObject* parent)
: QAbstractTableModel(parent), m_results(results), m_plot(plot) {}
void setResults(const QSharedPointer<nmDataSensitive::BatchResult>& results)
QList<ZxObjCurve*> runCurves(int row) const
{
// 同一批次同步已应用的选择,并保留本窗口尚未应用的勾选。
if(m_results == results) {
if(rowCount() > 0) emit dataChanged(index(0, 0), index(rowCount() - 1, 0));
return;
}
beginResetModel();
m_results = results;
m_pendingVisibility.clear();
endResetModel();
// 双对数图的一组包含压力与导数,历史压力图只包含压力。
QList<ZxObjCurve*> curves;
if(m_plot.isNull()) return curves;
const quint64 number = m_results->m_runs[row].m_nRunIndex + 1;
ZxObjCurve* pressure = m_plot->getCurve(nmWxSensitive::tr("Run %1 - Pressure").arg(number));
ZxObjCurve* derivative = m_plot->getCurve(nmWxSensitive::tr("Run %1 - Derivative").arg(number));
if(pressure) curves.append(pressure);
if(derivative) curves.append(derivative);
return curves;
}
bool isRunVisible(int row) const
{
// 从所属图读取已应用状态,两个 Show 表格互不共享勾选结果。
const QList<ZxObjCurve*> curves = runCurves(row);
for(int i = 0; i < curves.size(); ++i)
if(curves[i]->isVisible()) return true;
return false;
}
int rowCount(const QModelIndex& parent = QModelIndex()) const override
@ -217,7 +232,7 @@ public:
const nmDataSensitive::RunResult& run = m_results->m_runs[index.row()];
if(role == Qt::CheckStateRole && index.column() == 0)
return run.m_bSucceeded && !run.m_bCancelled &&
m_pendingVisibility.value(index.row(), run.m_bVisible) ? Qt::Checked : Qt::Unchecked;
m_pendingVisibility.value(index.row(), isRunVisible(index.row())) ? Qt::Checked : Qt::Unchecked;
if(role == Qt::TextAlignmentRole && index.column() == 1)
return int(Qt::AlignRight | Qt::AlignVCenter);
if(role == Qt::ToolTipRole && !run.m_sFailureReason.isEmpty()) return run.m_sFailureReason;
@ -243,19 +258,19 @@ public:
if(!index.isValid()) return Qt::NoItemFlags;
Qt::ItemFlags result = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
const nmDataSensitive::RunResult& run = m_results->m_runs[index.row()];
if(index.column() == 0 && run.m_bSucceeded && !run.m_bCancelled)
if(index.column() == 0 && run.m_bSucceeded && !run.m_bCancelled && !runCurves(index.row()).isEmpty())
result |= Qt::ItemIsUserCheckable;
return result;
}
bool setData(const QModelIndex& index, const QVariant& value, int role) override
{
// 勾选只记在本窗口,点击 Apply 或 OK 后才写入绘图使用的结果。
// 勾选只记在本窗口,点击 Apply 或 OK 后才改变所属图的显示。
if(!index.isValid() || index.column() != 0 || role != Qt::CheckStateRole) return false;
const nmDataSensitive::RunResult& run = m_results->m_runs[index.row()];
if(!run.m_bSucceeded || run.m_bCancelled) return false;
if(!run.m_bSucceeded || run.m_bCancelled || runCurves(index.row()).isEmpty()) return false;
const bool visible = value.toInt() == Qt::Checked;
if(visible == run.m_bVisible) m_pendingVisibility.remove(index.row());
if(visible == isRunVisible(index.row())) m_pendingVisibility.remove(index.row());
else m_pendingVisibility.insert(index.row(), visible);
emit dataChanged(index, index);
return true;
@ -267,34 +282,105 @@ public:
if(m_results.isNull() || m_results->m_runs.empty()) return;
for(int i = 0; i < rowCount(); ++i) {
const nmDataSensitive::RunResult& run = m_results->m_runs[i];
if(!run.m_bSucceeded || run.m_bCancelled) continue;
if(visible == run.m_bVisible) m_pendingVisibility.remove(i);
if(!run.m_bSucceeded || run.m_bCancelled || runCurves(i).isEmpty()) continue;
if(visible == isRunVisible(i)) m_pendingVisibility.remove(i);
else m_pendingVisibility.insert(i, visible);
}
emit dataChanged(index(0, 0), index(rowCount() - 1, 0));
}
bool applyVisibility()
void applyVisibility()
{
// 只提交本窗口改过的组,其他结果列表已应用的选择保持不变。
bool changed = false;
// Apply 仅更新所属图的采样曲线,保留实测、基准和流量参考线。
QMap<int, bool>::const_iterator it = m_pendingVisibility.constBegin();
for(; it != m_pendingVisibility.constEnd(); ++it) {
nmDataSensitive::RunResult& run = m_results->m_runs[it.key()];
if(run.m_bVisible != it.value()) {
run.m_bVisible = it.value();
changed = true;
}
const QList<ZxObjCurve*> curves = runCurves(it.key());
for(int i = 0; i < curves.size(); ++i) curves[i]->setVisible(it.value());
}
m_pendingVisibility.clear();
return changed;
if(!m_plot.isNull()) {
m_plot->clearUndoStack();
m_plot->m_pPlot->update();
}
}
private:
QSharedPointer<nmDataSensitive::BatchResult> m_results;
QMap<int, bool> m_pendingVisibility;
QPointer<iGuiPlot> m_plot;
};
nmWxSensitivityShow::nmWxSensitivityShow(
const QSharedPointer<nmDataSensitive::BatchResult>& results, iGuiPlot* plot, QWidget* parent)
: iDlgBase(parent)
{
// 沿用原 Results 的白色表格及按钮布局,勾选在 Apply 或 OK 后生效。
setAttribute(Qt::WA_DeleteOnClose);
setObjectName("nmSensitivityShowDialog");
resize(700, 380);
QVBoxLayout* layout = new QVBoxLayout(this);
QTableView* table = new QTableView(this);
table->setStyleSheet("QTableView { background-color: white; }");
m_model = new SensitivityResultsModel(results, plot, this);
table->setModel(m_model);
table->setSelectionBehavior(QAbstractItemView::SelectRows);
table->setSelectionMode(QAbstractItemView::SingleSelection);
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
table->setWordWrap(false);
table->verticalHeader()->setVisible(false);
table->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
table->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents);
table->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);
layout->addWidget(table);
QHBoxLayout* buttons = new QHBoxLayout();
QPushButton* showAll = new QPushButton(tr("Show all"), this);
QPushButton* hideAll = new QPushButton(tr("Hide all"), this);
// 明确按钮顺序,避免系统的标准按钮布局把 Apply 排到最后。
QPushButton* apply = new QPushButton(tr("Apply"), this);
QPushButton* ok = new QPushButton(tr("OK"), this);
QPushButton* cancel = new QPushButton(tr("Cancel"), this);
apply->setAutoDefault(false);
cancel->setAutoDefault(false);
ok->setDefault(true);
buttons->addWidget(showAll);
buttons->addWidget(hideAll);
buttons->addStretch();
buttons->addWidget(apply);
buttons->addWidget(ok);
buttons->addWidget(cancel);
layout->addLayout(buttons);
connect(showAll, SIGNAL(clicked()), this, SLOT(onShowAll()));
connect(hideAll, SIGNAL(clicked()), this, SLOT(onHideAll()));
connect(apply, SIGNAL(clicked()), this, SLOT(onApply()));
connect(ok, SIGNAL(clicked()), this, SLOT(onAccept()));
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
void nmWxSensitivityShow::onApply()
{
// 应用选择,保留窗口以便继续调整。
m_model->applyVisibility();
}
void nmWxSensitivityShow::onAccept()
{
// 确认时提交勾选,取消则直接丢弃未应用的选择。
onApply();
accept();
}
void nmWxSensitivityShow::onShowAll()
{
// 只修改待应用的采样组选择。
m_model->setAllVisible(true);
}
void nmWxSensitivityShow::onHideAll()
{
// 参考曲线不属于采样组,保持原来的显示方式。
m_model->setAllVisible(false);
}
class SensitivityDistributionPlot : public QWidget
{
public:
@ -1993,107 +2079,21 @@ void nmWxSensitive::onSensitivityFinished()
void nmWxSensitive::onResultsClicked()
{
// 绘图窗口仍由主界面创建;本窗口只提供运行列表与显示选择。
// Results 只打开或恢复结果图,曲线显示由各图自己的 Show 控制。
onResultsChanged();
if(!resultsButton->isEnabled()) return;
emit sigSensitiveResultsRequested();
if(m_resultsDialog.isNull()) {
// 与参数窗口共用框架对话框样式,避免普通 QDialog 使用默认灰色背景。
m_resultsDialog = new iDlgBase(this);
m_resultsDialog->setAttribute(Qt::WA_DeleteOnClose);
m_resultsDialog->setWindowTitle(tr("Sensitivity Results"));
m_resultsDialog->resize(700, 380);
QVBoxLayout* layout = new QVBoxLayout(m_resultsDialog.data());
QTableView* table = new QTableView(m_resultsDialog.data());
table->setStyleSheet("QTableView { background-color: white; }");
m_resultsModel = new SensitivityResultsModel(m_resultsDialog.data());
m_resultsModel->setResults(m_pDataManager->getSensitiveData()->getResults());
table->setModel(m_resultsModel.data());
table->setSelectionBehavior(QAbstractItemView::SelectRows);
table->setSelectionMode(QAbstractItemView::SingleSelection);
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
table->setWordWrap(false);
table->verticalHeader()->setVisible(false);
table->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
table->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents);
table->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);
layout->addWidget(table);
QHBoxLayout* buttons = new QHBoxLayout();
QPushButton* showAll = new QPushButton(tr("Show all"), m_resultsDialog.data());
QPushButton* hideAll = new QPushButton(tr("Hide all"), m_resultsDialog.data());
// 明确按钮顺序,避免系统的标准按钮布局把 Apply 排到最后。
QPushButton* apply = new QPushButton(tr("Apply"), m_resultsDialog.data());
QPushButton* ok = new QPushButton(tr("OK"), m_resultsDialog.data());
QPushButton* cancel = new QPushButton(tr("Cancel"), m_resultsDialog.data());
apply->setAutoDefault(false);
cancel->setAutoDefault(false);
ok->setDefault(true);
buttons->addWidget(showAll);
buttons->addWidget(hideAll);
buttons->addStretch();
buttons->addWidget(apply);
buttons->addWidget(ok);
buttons->addWidget(cancel);
layout->addLayout(buttons);
connect(showAll, SIGNAL(clicked()), this, SLOT(onShowAllResults()));
connect(hideAll, SIGNAL(clicked()), this, SLOT(onHideAllResults()));
connect(apply, SIGNAL(clicked()), this, SLOT(onApplyResults()));
connect(ok, SIGNAL(clicked()), this, SLOT(onAcceptResults()));
connect(cancel, SIGNAL(clicked()), m_resultsDialog.data(), SLOT(reject()));
}
onResultsChanged();
hide();
m_resultsDialog->show();
m_resultsDialog->raise();
m_resultsDialog->activateWindow();
}
void nmWxSensitive::onResultsChanged()
{
// 新结果替换旧批次时,已经打开的列表也切到同一份结果。
// 新模型清除旧批次后同步禁用结果入口。
QSharedPointer<nmDataSensitive::BatchResult> results;
if(m_pDataManager && m_pDataManager->getSensitiveData())
results = m_pDataManager->getSensitiveData()->getResults();
resultsButton->setEnabled(!results.isNull());
m_sensitiveData.setResults(results);
if(!m_resultsModel.isNull()) m_resultsModel->setResults(results);
// 新模型清除旧批次后关闭结果列表,不能继续操作上一模型的运行记录。
if(results.isNull()) {
if(!m_resultsDialog.isNull()) m_resultsDialog->close();
return;
}
if(!m_resultsDialog.isNull()) {
const QString status = results.isNull() ? QString() : results->m_bStopped ? tr("Stopped")
: results->m_bCompleted ? tr("Completed") : tr("Failed");
m_resultsDialog->setWindowTitle(tr("Sensitivity Results")
+ (status.isEmpty() ? QString() : " - " + status));
}
}
void nmWxSensitive::onApplyResults()
{
// 应用选择后通知主界面刷新,结果选择窗口保持打开。
if(m_pDataManager && !m_resultsModel.isNull() && m_resultsModel->applyVisibility())
m_pDataManager->publishSensitiveResults(m_pDataManager->getSensitiveDataCopy());
}
void nmWxSensitive::onAcceptResults()
{
// OK 与 Apply 提交相同的选择,随后关闭窗口。
onApplyResults();
if(!m_resultsDialog.isNull()) m_resultsDialog->accept();
}
void nmWxSensitive::onShowAllResults()
{
// 勾选所有成功组,等待 Apply 或 OK 更新曲线。
if(!m_resultsModel.isNull()) m_resultsModel->setAllVisible(true);
}
void nmWxSensitive::onHideAllResults()
{
// 取消所有采样组的勾选,测量曲线和原模型数值解仍作为参考。
if(!m_resultsModel.isNull()) m_resultsModel->setAllVisible(false);
}
void nmWxSensitive::onCalculationTypeChanged(int index)

Loading…
Cancel
Save