|
|
|
@ -18,11 +18,14 @@
|
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QDialogButtonBox>
|
|
|
|
#include <QDialogButtonBox>
|
|
|
|
#include <QFrame>
|
|
|
|
#include <QFrame>
|
|
|
|
|
|
|
|
#include <QGridLayout>
|
|
|
|
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QIcon>
|
|
|
|
#include <QIcon>
|
|
|
|
#include <QKeyEvent>
|
|
|
|
#include <QKeyEvent>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QPalette>
|
|
|
|
#include <QPalette>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QRegExp>
|
|
|
|
#include <QRegExp>
|
|
|
|
@ -39,6 +42,7 @@ nmWxWellEditor::nmWxWellEditor(const nmWellEditContext& oContext,
|
|
|
|
m_pParameterPanel(nullptr),
|
|
|
|
m_pParameterPanel(nullptr),
|
|
|
|
m_pTrajectoryDisplay(nullptr),
|
|
|
|
m_pTrajectoryDisplay(nullptr),
|
|
|
|
m_pWellEditorController(nullptr),
|
|
|
|
m_pWellEditorController(nullptr),
|
|
|
|
|
|
|
|
m_pWellCodeLineEdit(nullptr),
|
|
|
|
m_pWellNameLineEdit(nullptr),
|
|
|
|
m_pWellNameLineEdit(nullptr),
|
|
|
|
m_pWellTypeComboBox(nullptr),
|
|
|
|
m_pWellTypeComboBox(nullptr),
|
|
|
|
m_pTimeDependentCheckBox(nullptr),
|
|
|
|
m_pTimeDependentCheckBox(nullptr),
|
|
|
|
@ -88,6 +92,7 @@ bool nmWxWellEditor::initialize(QString& sError)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 第一步:同步井信息和时间变表皮控件。
|
|
|
|
// 第一步:同步井信息和时间变表皮控件。
|
|
|
|
|
|
|
|
m_pWellCodeLineEdit->setText(pWell->getWellCode());
|
|
|
|
m_pWellNameLineEdit->setText(pWell->getWellName());
|
|
|
|
m_pWellNameLineEdit->setText(pWell->getWellName());
|
|
|
|
int nWellTypeIndex = m_pWellTypeComboBox->findData(
|
|
|
|
int nWellTypeIndex = m_pWellTypeComboBox->findData(
|
|
|
|
static_cast<int>(pWell->getWellType()));
|
|
|
|
static_cast<int>(pWell->getWellType()));
|
|
|
|
@ -380,21 +385,21 @@ void nmWxWellEditor::createUi()
|
|
|
|
pMainLayout->setContentsMargins(12, 10, 12, 0);
|
|
|
|
pMainLayout->setContentsMargins(12, 10, 12, 0);
|
|
|
|
pMainLayout->setSpacing(8);
|
|
|
|
pMainLayout->setSpacing(8);
|
|
|
|
|
|
|
|
|
|
|
|
// 第一步:左侧全部信息进入同一滚动参数面板,右侧保持常驻轨迹视图。
|
|
|
|
// 第一步:左侧固定井信息并滚动参数分组,右侧保持常驻轨迹视图。
|
|
|
|
m_pMainSplitter = new QSplitter(Qt::Horizontal, this);
|
|
|
|
m_pMainSplitter = new QSplitter(Qt::Horizontal, this);
|
|
|
|
m_pMainSplitter->setChildrenCollapsible(false);
|
|
|
|
m_pMainSplitter->setChildrenCollapsible(false);
|
|
|
|
|
|
|
|
|
|
|
|
QWidget* pParameterContainer = new QWidget(m_pMainSplitter);
|
|
|
|
QWidget* pParameterContainer = new QWidget(m_pMainSplitter);
|
|
|
|
QVBoxLayout* pParameterLayout = new QVBoxLayout(pParameterContainer);
|
|
|
|
QVBoxLayout* pParameterLayout = new QVBoxLayout(pParameterContainer);
|
|
|
|
pParameterLayout->setContentsMargins(0, 0, 0, 0);
|
|
|
|
pParameterLayout->setContentsMargins(0, 0, 0, 0);
|
|
|
|
pParameterLayout->setSpacing(0);
|
|
|
|
pParameterLayout->setSpacing(8);
|
|
|
|
|
|
|
|
|
|
|
|
QScrollArea* pScrollArea = new QScrollArea(pParameterContainer);
|
|
|
|
QScrollArea* pScrollArea = new QScrollArea(pParameterContainer);
|
|
|
|
pScrollArea->setWidgetResizable(true);
|
|
|
|
pScrollArea->setWidgetResizable(true);
|
|
|
|
pScrollArea->setFrameShape(QFrame::NoFrame);
|
|
|
|
pScrollArea->setFrameShape(QFrame::NoFrame);
|
|
|
|
m_pParameterPanel = new nmWellParameterPanel(this, pScrollArea);
|
|
|
|
m_pParameterPanel = new nmWellParameterPanel(this, pScrollArea);
|
|
|
|
m_pWellNameLineEdit = m_pParameterPanel->wellNameEditor();
|
|
|
|
pParameterLayout->addWidget(
|
|
|
|
m_pWellTypeComboBox = m_pParameterPanel->wellTypeEditor();
|
|
|
|
createWellInformationWidget(pParameterContainer));
|
|
|
|
m_pWellTypeComboBox->addItem(
|
|
|
|
m_pWellTypeComboBox->addItem(
|
|
|
|
tr("Vertical well"), static_cast<int>(Vertical_Well));
|
|
|
|
tr("Vertical well"), static_cast<int>(Vertical_Well));
|
|
|
|
m_pWellTypeComboBox->addItem(
|
|
|
|
m_pWellTypeComboBox->addItem(
|
|
|
|
@ -431,6 +436,54 @@ void nmWxWellEditor::createUi()
|
|
|
|
this, SLOT(slotPanelValidationMessageChanged(QString)));
|
|
|
|
this, SLOT(slotPanelValidationMessageChanged(QString)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QWidget* nmWxWellEditor::createWellInformationWidget(QWidget* pParent)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QGroupBox* pInformationGroup = new QGroupBox(
|
|
|
|
|
|
|
|
tr("Well information"), pParent);
|
|
|
|
|
|
|
|
QGridLayout* pInformationLayout = new QGridLayout(pInformationGroup);
|
|
|
|
|
|
|
|
pInformationLayout->setContentsMargins(8, 15, 8, 10);
|
|
|
|
|
|
|
|
pInformationLayout->setHorizontalSpacing(6);
|
|
|
|
|
|
|
|
pInformationLayout->setVerticalSpacing(6);
|
|
|
|
|
|
|
|
pInformationLayout->setColumnStretch(0, 0);
|
|
|
|
|
|
|
|
pInformationLayout->setColumnStretch(1, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QLabel* pCodeLabel = new QLabel(tr("Well number"), pInformationGroup);
|
|
|
|
|
|
|
|
QLabel* pNameLabel = new QLabel(tr("Well name"), pInformationGroup);
|
|
|
|
|
|
|
|
QLabel* pTypeLabel = new QLabel(tr("Well type"), pInformationGroup);
|
|
|
|
|
|
|
|
pCodeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
|
|
|
|
pNameLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
|
|
|
|
pTypeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_pWellCodeLineEdit = new QLineEdit(pInformationGroup);
|
|
|
|
|
|
|
|
m_pWellNameLineEdit = new QLineEdit(pInformationGroup);
|
|
|
|
|
|
|
|
m_pWellTypeComboBox = new QComboBox(pInformationGroup);
|
|
|
|
|
|
|
|
m_pWellCodeLineEdit->setReadOnly(true);
|
|
|
|
|
|
|
|
m_pWellCodeLineEdit->setToolTip(
|
|
|
|
|
|
|
|
tr("Project-level unique well identifier"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QList<QWidget*> listEditors;
|
|
|
|
|
|
|
|
listEditors << m_pWellCodeLineEdit
|
|
|
|
|
|
|
|
<< m_pWellNameLineEdit
|
|
|
|
|
|
|
|
<< m_pWellTypeComboBox;
|
|
|
|
|
|
|
|
for (int nIndex = 0; nIndex < listEditors.size(); ++nIndex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
listEditors[nIndex]->setFixedHeight(
|
|
|
|
|
|
|
|
nmParameterField::editorHeight());
|
|
|
|
|
|
|
|
listEditors[nIndex]->setMinimumWidth(
|
|
|
|
|
|
|
|
nmParameterField::editorMinimumWidth());
|
|
|
|
|
|
|
|
listEditors[nIndex]->setSizePolicy(
|
|
|
|
|
|
|
|
QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
return pInformationGroup;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QWidget* nmWxWellEditor::createFooter()
|
|
|
|
QWidget* nmWxWellEditor::createFooter()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QWidget* pFooter = new QWidget(this);
|
|
|
|
QWidget* pFooter = new QWidget(this);
|
|
|
|
|