|
|
|
|
@ -47,6 +47,7 @@ nmWxWellEditor::nmWxWellEditor(const nmWellEditContext& oContext,
|
|
|
|
|
m_pWellTypeComboBox(nullptr),
|
|
|
|
|
m_pTimeDependentCheckBox(nullptr),
|
|
|
|
|
m_pTimeDependentButton(nullptr),
|
|
|
|
|
m_pFooterHelpButton(nullptr),
|
|
|
|
|
m_pButtonBox(nullptr),
|
|
|
|
|
m_pStatusLabel(nullptr),
|
|
|
|
|
m_pMainSplitter(nullptr),
|
|
|
|
|
@ -445,14 +446,23 @@ QWidget* nmWxWellEditor::createWellInformationWidget(QWidget* pParent)
|
|
|
|
|
pInformationLayout->setHorizontalSpacing(6);
|
|
|
|
|
pInformationLayout->setVerticalSpacing(6);
|
|
|
|
|
pInformationLayout->setColumnStretch(0, 0);
|
|
|
|
|
pInformationLayout->setColumnStretch(1, 1);
|
|
|
|
|
pInformationLayout->setColumnStretch(1, 8);
|
|
|
|
|
pInformationLayout->setColumnStretch(2, 5);
|
|
|
|
|
pInformationLayout->setColumnMinimumWidth(
|
|
|
|
|
1, nmParameterField::editorMinimumWidth());
|
|
|
|
|
pInformationLayout->setColumnMinimumWidth(
|
|
|
|
|
2, nmParameterField::unitMinimumWidth());
|
|
|
|
|
|
|
|
|
|
QLabel* pCodeLabel = new QLabel(tr("Well number"), pInformationGroup);
|
|
|
|
|
QLabel* pNameLabel = new QLabel(tr("Well name"), pInformationGroup);
|
|
|
|
|
QLabel* pTypeLabel = new QLabel(tr("Well type"), pInformationGroup);
|
|
|
|
|
QLabel* pTimeDependentLabel = new QLabel(
|
|
|
|
|
tr("Time-dependent skin"), pInformationGroup);
|
|
|
|
|
pCodeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
|
pNameLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
|
pTypeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
|
pTimeDependentLabel->setAlignment(
|
|
|
|
|
Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
|
|
|
|
|
|
m_pWellCodeLineEdit = new QLineEdit(pInformationGroup);
|
|
|
|
|
m_pWellNameLineEdit = new QLineEdit(pInformationGroup);
|
|
|
|
|
@ -475,12 +485,41 @@ QWidget* nmWxWellEditor::createWellInformationWidget(QWidget* pParent)
|
|
|
|
|
QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 时间变表皮属于井级配置,开关和详情入口共同放在值列。
|
|
|
|
|
QWidget* pTimeDependentEditor = new QWidget(pInformationGroup);
|
|
|
|
|
QHBoxLayout* pTimeDependentLayout = new QHBoxLayout(
|
|
|
|
|
pTimeDependentEditor);
|
|
|
|
|
pTimeDependentLayout->setContentsMargins(0, 0, 0, 0);
|
|
|
|
|
pTimeDependentLayout->setSpacing(4);
|
|
|
|
|
m_pTimeDependentCheckBox = new QCheckBox(pTimeDependentEditor);
|
|
|
|
|
m_pTimeDependentButton = new QToolButton(pTimeDependentEditor);
|
|
|
|
|
QString sIconDir = QCoreApplication::applicationDirPath()
|
|
|
|
|
.section('/', 0, -2) + "/Res/Icon/";
|
|
|
|
|
m_pTimeDependentButton->setIcon(
|
|
|
|
|
QIcon(sIconDir + "NmAnalDesign3.png"));
|
|
|
|
|
m_pTimeDependentButton->setIconSize(QSize(20, 20));
|
|
|
|
|
m_pTimeDependentButton->setFixedSize(26, 26);
|
|
|
|
|
m_pTimeDependentButton->setAutoRaise(true);
|
|
|
|
|
m_pTimeDependentButton->setToolTip(
|
|
|
|
|
tr("Edit time-dependent skin"));
|
|
|
|
|
m_pTimeDependentButton->setEnabled(false);
|
|
|
|
|
pTimeDependentLayout->addWidget(m_pTimeDependentCheckBox);
|
|
|
|
|
pTimeDependentLayout->addWidget(m_pTimeDependentButton);
|
|
|
|
|
pTimeDependentLayout->addStretch(1);
|
|
|
|
|
|
|
|
|
|
pInformationLayout->addWidget(pCodeLabel, 0, 0);
|
|
|
|
|
pInformationLayout->addWidget(m_pWellCodeLineEdit, 0, 1);
|
|
|
|
|
pInformationLayout->addWidget(pNameLabel, 1, 0);
|
|
|
|
|
pInformationLayout->addWidget(m_pWellNameLineEdit, 1, 1);
|
|
|
|
|
pInformationLayout->addWidget(pTypeLabel, 2, 0);
|
|
|
|
|
pInformationLayout->addWidget(m_pWellTypeComboBox, 2, 1);
|
|
|
|
|
pInformationLayout->addWidget(pTimeDependentLabel, 3, 0);
|
|
|
|
|
pInformationLayout->addWidget(pTimeDependentEditor, 3, 1);
|
|
|
|
|
|
|
|
|
|
connect(m_pTimeDependentCheckBox, SIGNAL(toggled(bool)),
|
|
|
|
|
this, SLOT(slotTimeDependentToggled(bool)));
|
|
|
|
|
connect(m_pTimeDependentButton, SIGNAL(clicked()),
|
|
|
|
|
this, SLOT(slotEditTimeDependentSkin()));
|
|
|
|
|
return pInformationGroup;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -491,20 +530,13 @@ QWidget* nmWxWellEditor::createFooter()
|
|
|
|
|
pFooterLayout->setContentsMargins(4, 5, 4, 5);
|
|
|
|
|
pFooterLayout->setSpacing(8);
|
|
|
|
|
|
|
|
|
|
// 左侧保留时间变表皮开关和详情入口。
|
|
|
|
|
m_pTimeDependentCheckBox = new QCheckBox(
|
|
|
|
|
tr("Time-dependent skin"), pFooter);
|
|
|
|
|
m_pTimeDependentButton = new QToolButton(pFooter);
|
|
|
|
|
QString sIconDir = QCoreApplication::applicationDirPath()
|
|
|
|
|
.section('/', 0, -2) + "/Res/Icon/";
|
|
|
|
|
m_pTimeDependentButton->setIcon(
|
|
|
|
|
QIcon(sIconDir + "NmAnalDesign3.png"));
|
|
|
|
|
m_pTimeDependentButton->setIconSize(QSize(20, 20));
|
|
|
|
|
m_pTimeDependentButton->setFixedSize(26, 26);
|
|
|
|
|
m_pTimeDependentButton->setAutoRaise(true);
|
|
|
|
|
m_pTimeDependentButton->setToolTip(
|
|
|
|
|
tr("Edit time-dependent skin"));
|
|
|
|
|
m_pTimeDependentButton->setEnabled(false);
|
|
|
|
|
// 左侧帮助命令与储层特性对话框保持相同样式和行为。
|
|
|
|
|
m_pFooterHelpButton = new QToolButton(pFooter);
|
|
|
|
|
m_pFooterHelpButton->setText(tr("Help"));
|
|
|
|
|
m_pFooterHelpButton->setIcon(zxLoadIcon("Help"));
|
|
|
|
|
m_pFooterHelpButton->setToolButtonStyle(
|
|
|
|
|
Qt::ToolButtonTextBesideIcon);
|
|
|
|
|
m_pFooterHelpButton->setAutoRaise(true);
|
|
|
|
|
|
|
|
|
|
// 中间状态区使用主题调色板,仅将错误文字标红。
|
|
|
|
|
m_pStatusLabel = new QLabel(pFooter);
|
|
|
|
|
@ -533,20 +565,22 @@ QWidget* nmWxWellEditor::createFooter()
|
|
|
|
|
pCancelButton->setText(tr("Cancel"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pFooterLayout->addWidget(m_pTimeDependentCheckBox);
|
|
|
|
|
pFooterLayout->addWidget(m_pTimeDependentButton);
|
|
|
|
|
pFooterLayout->addWidget(m_pFooterHelpButton);
|
|
|
|
|
pFooterLayout->addWidget(m_pStatusLabel, 1);
|
|
|
|
|
pFooterLayout->addWidget(m_pButtonBox);
|
|
|
|
|
|
|
|
|
|
connect(m_pTimeDependentCheckBox, SIGNAL(toggled(bool)),
|
|
|
|
|
this, SLOT(slotTimeDependentToggled(bool)));
|
|
|
|
|
connect(m_pTimeDependentButton, SIGNAL(clicked()),
|
|
|
|
|
this, SLOT(slotEditTimeDependentSkin()));
|
|
|
|
|
connect(m_pFooterHelpButton, SIGNAL(clicked()),
|
|
|
|
|
this, SLOT(slotHelp()));
|
|
|
|
|
connect(m_pButtonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
|
|
|
|
connect(m_pButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
|
|
|
|
return pFooter;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWxWellEditor::slotHelp()
|
|
|
|
|
{
|
|
|
|
|
ZxBaseUtil::startHelp();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWxWellEditor::createController()
|
|
|
|
|
{
|
|
|
|
|
// 控制器持有当前工作副本指针,井型切换后必须销毁并重新绑定。
|
|
|
|
|
|