|
|
|
|
@ -41,6 +41,27 @@ static bool isNumericalDesignDebugOptionsVisible()
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 显示当前模型类型
|
|
|
|
|
static QString solverModelDisplayName(NM_SOLVER_MODEL_TYPE eType)
|
|
|
|
|
{
|
|
|
|
|
switch(eType) {
|
|
|
|
|
case SMT_Oil_ConstPvt:
|
|
|
|
|
return nmWxNumericalDesign::tr("Oil single-phase constant pvt");
|
|
|
|
|
case SMT_Oil_VariablePvt:
|
|
|
|
|
return nmWxNumericalDesign::tr("Oil single-phase variable pvt");
|
|
|
|
|
case SMT_Water_ConstPvt:
|
|
|
|
|
return nmWxNumericalDesign::tr("Water single-phase constant pvt");
|
|
|
|
|
case SMT_Water_VariablePvt:
|
|
|
|
|
return nmWxNumericalDesign::tr("Water single-phase variable pvt");
|
|
|
|
|
case SMT_Gas_VariablePvt:
|
|
|
|
|
return nmWxNumericalDesign::tr("Gas single-phase variable pvt");
|
|
|
|
|
case SMT_Oil_Water_TwoPhase:
|
|
|
|
|
return nmWxNumericalDesign::tr("Oil-water two-phase");
|
|
|
|
|
default:
|
|
|
|
|
return QString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nmWxNumericalDesign::nmWxNumericalDesign(QWidget *parent)
|
|
|
|
|
: iDlgBase(parent)
|
|
|
|
|
{
|
|
|
|
|
@ -48,6 +69,8 @@ nmWxNumericalDesign::nmWxNumericalDesign(QWidget *parent)
|
|
|
|
|
s_pCurrentInstance = this;
|
|
|
|
|
m_pResultWellGroup = nullptr;
|
|
|
|
|
m_pResultWellCombo = nullptr;
|
|
|
|
|
m_pCurrentModelGroup = nullptr;
|
|
|
|
|
m_pCurrentModelValueLabel = nullptr;
|
|
|
|
|
m_bFillingResultWellCombo = false;
|
|
|
|
|
|
|
|
|
|
// 初始化图标路径
|
|
|
|
|
@ -70,6 +93,7 @@ nmWxNumericalDesign::nmWxNumericalDesign(QWidget *parent)
|
|
|
|
|
// 初始化所有UI组件
|
|
|
|
|
initMainOptionsGroup(); // 初始化主选项组
|
|
|
|
|
initResultWellGroup();
|
|
|
|
|
initCurrentModelGroup();
|
|
|
|
|
initOutputGroup(); // 初始化输出组 (新)
|
|
|
|
|
initAdvancedGroup(); // 初始化高级组 (新)
|
|
|
|
|
initTimeSteppingGroup(); // 初始化时间步进组
|
|
|
|
|
@ -79,6 +103,7 @@ nmWxNumericalDesign::nmWxNumericalDesign(QWidget *parent)
|
|
|
|
|
// 将各个组添加到滚动区域的布局中
|
|
|
|
|
pScrollLayout->addWidget(m_pMainOptionsGroup);
|
|
|
|
|
pScrollLayout->addWidget(m_pResultWellGroup);
|
|
|
|
|
pScrollLayout->addWidget(m_pCurrentModelGroup);
|
|
|
|
|
pScrollLayout->addWidget(m_pOutputGroup);
|
|
|
|
|
pScrollLayout->addWidget(m_pAdvancedGroup);
|
|
|
|
|
pScrollLayout->addWidget(m_pTimeSteppingGroup);
|
|
|
|
|
@ -132,6 +157,7 @@ void nmWxNumericalDesign::activateCurrentInstance()
|
|
|
|
|
s_pCurrentInstance = this;
|
|
|
|
|
// 调用前已经切换到当前成果的数据中心,此处按照当前成果重新填充下拉框。
|
|
|
|
|
fillResultWellCombo();
|
|
|
|
|
updateCurrentModelDisplay();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 外部刷新当前查看井下拉框
|
|
|
|
|
@ -163,6 +189,40 @@ void nmWxNumericalDesign::initResultWellGroup()
|
|
|
|
|
m_pResultWellGroup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 显示当前模型名
|
|
|
|
|
void nmWxNumericalDesign::initCurrentModelGroup()
|
|
|
|
|
{
|
|
|
|
|
m_pCurrentModelGroup = new QGroupBox(tr("Current model"), this);
|
|
|
|
|
QGridLayout* pGridLayout = new QGridLayout(m_pCurrentModelGroup);
|
|
|
|
|
|
|
|
|
|
m_pCurrentModelValueLabel = new QLabel(this);
|
|
|
|
|
m_pCurrentModelValueLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
|
|
|
|
m_pCurrentModelValueLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
|
|
|
|
updateCurrentModelDisplay();
|
|
|
|
|
|
|
|
|
|
pGridLayout->addWidget(m_pCurrentModelValueLabel, 0, 0);
|
|
|
|
|
pGridLayout->setColumnStretch(0, 1);
|
|
|
|
|
|
|
|
|
|
m_pCurrentModelGroup->setLayout(pGridLayout);
|
|
|
|
|
m_pCurrentModelGroup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 按当前成果对应的数据管理器刷新模型名
|
|
|
|
|
void nmWxNumericalDesign::updateCurrentModelDisplay()
|
|
|
|
|
{
|
|
|
|
|
if(m_pCurrentModelValueLabel == nullptr) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nmDataAnalyzeManager* pManager = nmDataAnalyzeManager::getCurrentInstance();
|
|
|
|
|
if(pManager == nullptr) {
|
|
|
|
|
m_pCurrentModelValueLabel->clear();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_pCurrentModelValueLabel->setText(solverModelDisplayName(pManager->getSolverModelType()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 按参与计算井刷新下拉框
|
|
|
|
|
void nmWxNumericalDesign::fillResultWellCombo(const QString& selectedWellName)
|
|
|
|
|
{
|
|
|
|
|
|