|
|
|
|
@ -127,7 +127,71 @@ QString formatGaugeRecordLabel(const QString& sGaugeName,
|
|
|
|
|
return sGaugeCode.isEmpty() ? sGaugeName : sGaugeCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 统一向压力/流量记录下拉框追加一项:身份无效的记录禁用不可选,空/损坏记录仍可选但追加提示后缀。
|
|
|
|
|
QString gaugeMetadataText(const QString& sText)
|
|
|
|
|
{
|
|
|
|
|
return sText.trimmed().isEmpty()
|
|
|
|
|
? nmWellPressureFlowPage::tr("(none)") : sText;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString gaugeNameText(const QString& sGaugeName)
|
|
|
|
|
{
|
|
|
|
|
return sGaugeName.trimmed().isEmpty()
|
|
|
|
|
? nmWellPressureFlowPage::tr("(unnamed)") : sGaugeName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString gaugeRecordToolTip(const QString& sGaugeName,
|
|
|
|
|
const QString& sGaugeCode,
|
|
|
|
|
const QString& sGaugeTime)
|
|
|
|
|
{
|
|
|
|
|
QStringList listLines;
|
|
|
|
|
listLines << nmWellPressureFlowPage::tr("Curve name: %1")
|
|
|
|
|
.arg(gaugeNameText(sGaugeName));
|
|
|
|
|
listLines << nmWellPressureFlowPage::tr("Gauge Code: %1")
|
|
|
|
|
.arg(gaugeMetadataText(sGaugeCode));
|
|
|
|
|
listLines << nmWellPressureFlowPage::tr("Measurement time: %1")
|
|
|
|
|
.arg(gaugeMetadataText(sGaugeTime));
|
|
|
|
|
return listLines.join(QLatin1String("\n"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void disableGaugeComboItem(QComboBox* pCombo, int nItemIndex)
|
|
|
|
|
{
|
|
|
|
|
QStandardItemModel* pModel =
|
|
|
|
|
qobject_cast<QStandardItemModel*>(pCombo->model());
|
|
|
|
|
if (pModel == nullptr)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
QStandardItem* pItem = pModel->item(nItemIndex);
|
|
|
|
|
if (pItem != nullptr)
|
|
|
|
|
{
|
|
|
|
|
pItem->setFlags(pItem->flags() & ~Qt::ItemIsEnabled);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updatePreviewComboToolTip(QComboBox* pCombo)
|
|
|
|
|
{
|
|
|
|
|
if (pCombo == nullptr || pCombo->currentIndex() < 0 ||
|
|
|
|
|
pCombo->itemData(pCombo->currentIndex()).toString().isEmpty())
|
|
|
|
|
{
|
|
|
|
|
if (pCombo != nullptr)
|
|
|
|
|
{
|
|
|
|
|
pCombo->setToolTip(QString());
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString sToolTip = pCombo->itemData(
|
|
|
|
|
pCombo->currentIndex(), Qt::ToolTipRole).toString();
|
|
|
|
|
if (!sToolTip.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
sToolTip += QLatin1Char('\n');
|
|
|
|
|
}
|
|
|
|
|
sToolTip += nmWellPressureFlowPage::tr(
|
|
|
|
|
"Preview only; calculation settings are unchanged.");
|
|
|
|
|
pCombo->setToolTip(sToolTip);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 统一向压力/流量记录下拉框追加一项;异常记录保留状态提示但不可选。
|
|
|
|
|
void appendGaugeComboItem(QComboBox* pCombo,
|
|
|
|
|
const QString& sGaugeName,
|
|
|
|
|
const QString& sGaugeCode,
|
|
|
|
|
@ -151,18 +215,13 @@ void appendGaugeComboItem(QComboBox* pCombo,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pCombo->addItem(sLabel, sGaugeCode);
|
|
|
|
|
if (eStatus == NM_GaugeRecord_InvalidIdentity)
|
|
|
|
|
const int nItemIndex = pCombo->count() - 1;
|
|
|
|
|
pCombo->setItemData(nItemIndex,
|
|
|
|
|
gaugeRecordToolTip(sGaugeName, sGaugeCode, sGaugeTime),
|
|
|
|
|
Qt::ToolTipRole);
|
|
|
|
|
if (eStatus != NM_GaugeRecord_Usable)
|
|
|
|
|
{
|
|
|
|
|
QStandardItemModel* pModel =
|
|
|
|
|
qobject_cast<QStandardItemModel*>(pCombo->model());
|
|
|
|
|
if (pModel != nullptr)
|
|
|
|
|
{
|
|
|
|
|
QStandardItem* pItem = pModel->item(pCombo->count() - 1);
|
|
|
|
|
if (pItem != nullptr)
|
|
|
|
|
{
|
|
|
|
|
pItem->setFlags(pItem->flags() & ~Qt::ItemIsEnabled);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
disableGaugeComboItem(pCombo, nItemIndex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -686,6 +745,10 @@ void nmWellPressureFlowPage::setWell(nmDataWellBase* pWell)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_pWell = pWell;
|
|
|
|
|
m_sPreviewPressureGaugeCode = pWell == nullptr
|
|
|
|
|
? QString() : pWell->getSelectedPressureGaugeCode();
|
|
|
|
|
m_sPreviewFlowGaugeCode = pWell == nullptr
|
|
|
|
|
? QString() : pWell->getSelectedFlowGaugeCode();
|
|
|
|
|
resetDataViews();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -697,17 +760,34 @@ void nmWellPressureFlowPage::refreshData()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 第一步:先刷新记录下拉框,确保当前选中 Code、显示相与后续取点保持一致。
|
|
|
|
|
// 第一步:恢复页面自己的预览记录,不修改井对象保存的计算记录选择。
|
|
|
|
|
populatePressureGaugeCombo();
|
|
|
|
|
populateFlowGaugeCombo();
|
|
|
|
|
populateDisplayPhaseCombo(currentFlowRecord());
|
|
|
|
|
|
|
|
|
|
// 第二步:井数据只复制到页面基准副本,后续显示换算不会回写井对象;
|
|
|
|
|
// 流量点按当前展示相读取,切换展示相不影响井别、m_nIndexF 或求解器输入。
|
|
|
|
|
QVector<QPointF> vecRawPressurePoints =
|
|
|
|
|
m_pWell->getPressurePoints();
|
|
|
|
|
QVector<QPointF> vecRawFlowPoints =
|
|
|
|
|
m_pWell->getFlowPoints(m_eDisplayPhase);
|
|
|
|
|
// 第二步:直接从预览记录复制数据,后续记录、相别和单位切换都不回写井对象。
|
|
|
|
|
const nmPressureGaugeRecord* pPressureRecord = currentPressureRecord();
|
|
|
|
|
const nmFlowGaugeRecord* pFlowRecord = currentFlowRecord();
|
|
|
|
|
QVector<QPointF> vecRawPressurePoints = pPressureRecord == nullptr
|
|
|
|
|
? QVector<QPointF>() : pPressureRecord->vecPressurePoints;
|
|
|
|
|
QVector<QPointF> vecRawFlowPoints;
|
|
|
|
|
if (pFlowRecord != nullptr)
|
|
|
|
|
{
|
|
|
|
|
switch (m_eDisplayPhase)
|
|
|
|
|
{
|
|
|
|
|
case PHASE_Oil:
|
|
|
|
|
vecRawFlowPoints = pFlowRecord->vecOilPoints;
|
|
|
|
|
break;
|
|
|
|
|
case PHASE_Gas:
|
|
|
|
|
vecRawFlowPoints = pFlowRecord->vecGasPoints;
|
|
|
|
|
break;
|
|
|
|
|
case PHASE_Water:
|
|
|
|
|
vecRawFlowPoints = pFlowRecord->vecWaterPoints;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 第三步:单位服务可能晚于页面构造完成,再刷新一次可用单位组。
|
|
|
|
|
initializeUnitSupport();
|
|
|
|
|
@ -750,6 +830,8 @@ void nmWellPressureFlowPage::refreshData()
|
|
|
|
|
void nmWellPressureFlowPage::clearData()
|
|
|
|
|
{
|
|
|
|
|
m_pWell = nullptr;
|
|
|
|
|
m_sPreviewPressureGaugeCode.clear();
|
|
|
|
|
m_sPreviewFlowGaugeCode.clear();
|
|
|
|
|
resetDataViews();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -841,6 +923,47 @@ void nmWellPressureFlowPage::slotFlowChartPointClicked(double dTimePoint)
|
|
|
|
|
findFlowSegmentByTableTime(dTableTimePoint));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWellPressureFlowPage::slotPressureGaugePreviewChanged(int nIndex)
|
|
|
|
|
{
|
|
|
|
|
if (m_pWell == nullptr || nIndex < 0)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const QString sGaugeCode =
|
|
|
|
|
m_pPressureGaugeCombo->itemData(nIndex).toString();
|
|
|
|
|
if (sGaugeCode.isEmpty() ||
|
|
|
|
|
sGaugeCode == m_sPreviewPressureGaugeCode)
|
|
|
|
|
{
|
|
|
|
|
updatePreviewComboToolTip(m_pPressureGaugeCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_sPreviewPressureGaugeCode = sGaugeCode;
|
|
|
|
|
refreshData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWellPressureFlowPage::slotFlowGaugePreviewChanged(int nIndex)
|
|
|
|
|
{
|
|
|
|
|
if (m_pWell == nullptr || nIndex < 0)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const QString sGaugeCode =
|
|
|
|
|
m_pFlowGaugeCombo->itemData(nIndex).toString();
|
|
|
|
|
if (sGaugeCode.isEmpty() || sGaugeCode == m_sPreviewFlowGaugeCode)
|
|
|
|
|
{
|
|
|
|
|
updatePreviewComboToolTip(m_pFlowGaugeCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_sPreviewFlowGaugeCode = sGaugeCode;
|
|
|
|
|
m_eDisplayPhase = defaultDisplayPhase(currentFlowRecord());
|
|
|
|
|
m_nSelectedFlowSegment = -1;
|
|
|
|
|
refreshData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWellPressureFlowPage::slotDisplayPhaseChanged(int nIndex)
|
|
|
|
|
{
|
|
|
|
|
if (m_pWell == nullptr || nIndex < 0)
|
|
|
|
|
@ -1025,16 +1148,14 @@ void nmWellPressureFlowPage::createRecordSelectionBar()
|
|
|
|
|
m_pPressureGaugeCombo = new QComboBox(m_pRecordSelectionBar);
|
|
|
|
|
m_pPressureGaugeCombo->setEnabled(false);
|
|
|
|
|
m_pPressureGaugeCombo->setMinimumWidth(160);
|
|
|
|
|
m_pPressureGaugeCombo->setToolTip(
|
|
|
|
|
tr("This page only displays the selected record."));
|
|
|
|
|
m_pPressureGaugeCombo->setMaxVisibleItems(16);
|
|
|
|
|
|
|
|
|
|
QLabel* pFlowLabel = new QLabel(
|
|
|
|
|
tr("Flow Record"), m_pRecordSelectionBar);
|
|
|
|
|
m_pFlowGaugeCombo = new QComboBox(m_pRecordSelectionBar);
|
|
|
|
|
m_pFlowGaugeCombo->setEnabled(false);
|
|
|
|
|
m_pFlowGaugeCombo->setMinimumWidth(160);
|
|
|
|
|
m_pFlowGaugeCombo->setToolTip(
|
|
|
|
|
tr("This page only displays the selected record."));
|
|
|
|
|
m_pFlowGaugeCombo->setMaxVisibleItems(16);
|
|
|
|
|
|
|
|
|
|
// 显示相是纯展示状态,整体容器随记录是否为多相含数据而隐藏/显示。
|
|
|
|
|
m_pDisplayPhaseContainer = new QWidget(m_pRecordSelectionBar);
|
|
|
|
|
@ -1063,6 +1184,14 @@ void nmWellPressureFlowPage::createRecordSelectionBar()
|
|
|
|
|
pBarLayout->addStretch(1);
|
|
|
|
|
pBarLayout->addWidget(m_pCheckDataButton);
|
|
|
|
|
|
|
|
|
|
connect(m_pPressureGaugeCombo,
|
|
|
|
|
SIGNAL(currentIndexChanged(int)),
|
|
|
|
|
this,
|
|
|
|
|
SLOT(slotPressureGaugePreviewChanged(int)));
|
|
|
|
|
connect(m_pFlowGaugeCombo,
|
|
|
|
|
SIGNAL(currentIndexChanged(int)),
|
|
|
|
|
this,
|
|
|
|
|
SLOT(slotFlowGaugePreviewChanged(int)));
|
|
|
|
|
connect(m_pDisplayPhaseCombo,
|
|
|
|
|
SIGNAL(currentIndexChanged(int)),
|
|
|
|
|
this,
|
|
|
|
|
@ -1090,25 +1219,48 @@ void nmWellPressureFlowPage::populatePressureGaugeCombo()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QVector<nmPressureGaugeRecord> vecRecords =
|
|
|
|
|
m_pWell->getPressureRecords();
|
|
|
|
|
m_pPressureGaugeCombo->setEnabled(false);
|
|
|
|
|
m_pPressureGaugeCombo->addItem(tr("None"), QString());
|
|
|
|
|
m_vecPressureGaugeRecords = m_pWell->getPressureRecords();
|
|
|
|
|
|
|
|
|
|
const QString sSelectedCode = m_pWell->getSelectedPressureGaugeCode();
|
|
|
|
|
int nCurrentIndex = 0;
|
|
|
|
|
for (int nIndex = 0; nIndex < vecRecords.size(); ++nIndex)
|
|
|
|
|
int nPreviewIndex = -1;
|
|
|
|
|
int nCalculationIndex = -1;
|
|
|
|
|
int nFirstUsableIndex = -1;
|
|
|
|
|
const QString sCalculationCode =
|
|
|
|
|
m_pWell->getSelectedPressureGaugeCode();
|
|
|
|
|
for (int nIndex = 0; nIndex < m_vecPressureGaugeRecords.size(); ++nIndex)
|
|
|
|
|
{
|
|
|
|
|
const nmPressureGaugeRecord& oRecord = vecRecords[nIndex];
|
|
|
|
|
const nmPressureGaugeRecord& oRecord =
|
|
|
|
|
m_vecPressureGaugeRecords[nIndex];
|
|
|
|
|
appendGaugeComboItem(m_pPressureGaugeCombo,
|
|
|
|
|
oRecord.sGaugeName, oRecord.sGaugeCode,
|
|
|
|
|
oRecord.sGaugeTime, oRecord.eStatus);
|
|
|
|
|
if (oRecord.sGaugeCode == sSelectedCode)
|
|
|
|
|
const int nItemIndex = m_pPressureGaugeCombo->count() - 1;
|
|
|
|
|
if (oRecord.eStatus != NM_GaugeRecord_Usable)
|
|
|
|
|
{
|
|
|
|
|
nCurrentIndex = nIndex + 1;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (nFirstUsableIndex < 0)
|
|
|
|
|
{
|
|
|
|
|
nFirstUsableIndex = nItemIndex;
|
|
|
|
|
}
|
|
|
|
|
if (oRecord.sGaugeCode == m_sPreviewPressureGaugeCode)
|
|
|
|
|
{
|
|
|
|
|
nPreviewIndex = nItemIndex;
|
|
|
|
|
}
|
|
|
|
|
if (oRecord.sGaugeCode == sCalculationCode)
|
|
|
|
|
{
|
|
|
|
|
nCalculationIndex = nItemIndex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const int nCurrentIndex = nPreviewIndex >= 0
|
|
|
|
|
? nPreviewIndex : (nCalculationIndex >= 0
|
|
|
|
|
? nCalculationIndex : (nFirstUsableIndex >= 0
|
|
|
|
|
? nFirstUsableIndex : -1));
|
|
|
|
|
m_pPressureGaugeCombo->setCurrentIndex(nCurrentIndex);
|
|
|
|
|
m_pPressureGaugeCombo->setEnabled(nFirstUsableIndex >= 0);
|
|
|
|
|
m_sPreviewPressureGaugeCode = nCurrentIndex >= 0
|
|
|
|
|
? m_pPressureGaugeCombo->itemData(nCurrentIndex).toString()
|
|
|
|
|
: QString();
|
|
|
|
|
updatePreviewComboToolTip(m_pPressureGaugeCombo);
|
|
|
|
|
m_pPressureGaugeCombo->blockSignals(bSignalsWereBlocked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1132,23 +1284,45 @@ void nmWellPressureFlowPage::populateFlowGaugeCombo()
|
|
|
|
|
|
|
|
|
|
// 缓存整份记录列表供 currentFlowRecord() 安全返回内部指针,记录内容切换记录时不变。
|
|
|
|
|
m_vecFlowGaugeRecords = m_pWell->getFlowRecords();
|
|
|
|
|
m_pFlowGaugeCombo->setEnabled(false);
|
|
|
|
|
m_pFlowGaugeCombo->addItem(tr("None"), QString());
|
|
|
|
|
|
|
|
|
|
const QString sSelectedCode = m_pWell->getSelectedFlowGaugeCode();
|
|
|
|
|
int nCurrentIndex = 0;
|
|
|
|
|
int nPreviewIndex = -1;
|
|
|
|
|
int nCalculationIndex = -1;
|
|
|
|
|
int nFirstUsableIndex = -1;
|
|
|
|
|
const QString sCalculationCode = m_pWell->getSelectedFlowGaugeCode();
|
|
|
|
|
for (int nIndex = 0; nIndex < m_vecFlowGaugeRecords.size(); ++nIndex)
|
|
|
|
|
{
|
|
|
|
|
const nmFlowGaugeRecord& oRecord = m_vecFlowGaugeRecords[nIndex];
|
|
|
|
|
appendGaugeComboItem(m_pFlowGaugeCombo,
|
|
|
|
|
oRecord.sGaugeName, oRecord.sGaugeCode,
|
|
|
|
|
oRecord.sGaugeTime, oRecord.eStatus);
|
|
|
|
|
if (oRecord.sGaugeCode == sSelectedCode)
|
|
|
|
|
const int nItemIndex = m_pFlowGaugeCombo->count() - 1;
|
|
|
|
|
if (oRecord.eStatus != NM_GaugeRecord_Usable)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (nFirstUsableIndex < 0)
|
|
|
|
|
{
|
|
|
|
|
nFirstUsableIndex = nItemIndex;
|
|
|
|
|
}
|
|
|
|
|
if (oRecord.sGaugeCode == m_sPreviewFlowGaugeCode)
|
|
|
|
|
{
|
|
|
|
|
nPreviewIndex = nItemIndex;
|
|
|
|
|
}
|
|
|
|
|
if (oRecord.sGaugeCode == sCalculationCode)
|
|
|
|
|
{
|
|
|
|
|
nCurrentIndex = nIndex + 1;
|
|
|
|
|
nCalculationIndex = nItemIndex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const int nCurrentIndex = nPreviewIndex >= 0
|
|
|
|
|
? nPreviewIndex : (nCalculationIndex >= 0
|
|
|
|
|
? nCalculationIndex : (nFirstUsableIndex >= 0
|
|
|
|
|
? nFirstUsableIndex : -1));
|
|
|
|
|
m_pFlowGaugeCombo->setCurrentIndex(nCurrentIndex);
|
|
|
|
|
m_pFlowGaugeCombo->setEnabled(nFirstUsableIndex >= 0);
|
|
|
|
|
m_sPreviewFlowGaugeCode = nCurrentIndex >= 0
|
|
|
|
|
? m_pFlowGaugeCombo->itemData(nCurrentIndex).toString()
|
|
|
|
|
: QString();
|
|
|
|
|
updatePreviewComboToolTip(m_pFlowGaugeCombo);
|
|
|
|
|
m_pFlowGaugeCombo->blockSignals(bSignalsWereBlocked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1273,17 +1447,25 @@ NM_PHASE_TYPE nmWellPressureFlowPage::defaultDisplayPhase(
|
|
|
|
|
return PHASE_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const nmFlowGaugeRecord* nmWellPressureFlowPage::currentFlowRecord() const
|
|
|
|
|
const nmPressureGaugeRecord* nmWellPressureFlowPage::currentPressureRecord() const
|
|
|
|
|
{
|
|
|
|
|
if (m_pWell == nullptr)
|
|
|
|
|
for (int nIndex = 0; nIndex < m_vecPressureGaugeRecords.size(); ++nIndex)
|
|
|
|
|
{
|
|
|
|
|
return nullptr;
|
|
|
|
|
if (m_vecPressureGaugeRecords[nIndex].sGaugeCode ==
|
|
|
|
|
m_sPreviewPressureGaugeCode)
|
|
|
|
|
{
|
|
|
|
|
return &m_vecPressureGaugeRecords[nIndex];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const QString sSelectedCode = m_pWell->getSelectedFlowGaugeCode();
|
|
|
|
|
const nmFlowGaugeRecord* nmWellPressureFlowPage::currentFlowRecord() const
|
|
|
|
|
{
|
|
|
|
|
for (int nIndex = 0; nIndex < m_vecFlowGaugeRecords.size(); ++nIndex)
|
|
|
|
|
{
|
|
|
|
|
if (m_vecFlowGaugeRecords[nIndex].sGaugeCode == sSelectedCode)
|
|
|
|
|
if (m_vecFlowGaugeRecords[nIndex].sGaugeCode ==
|
|
|
|
|
m_sPreviewFlowGaugeCode)
|
|
|
|
|
{
|
|
|
|
|
return &m_vecFlowGaugeRecords[nIndex];
|
|
|
|
|
}
|
|
|
|
|
@ -1686,6 +1868,11 @@ void nmWellPressureFlowPage::resetDataViews()
|
|
|
|
|
m_vecRawFlowPoints.clear();
|
|
|
|
|
m_vecTableFlowPoints.clear();
|
|
|
|
|
m_nSelectedFlowSegment = -1;
|
|
|
|
|
if (m_pWell == nullptr)
|
|
|
|
|
{
|
|
|
|
|
m_sPreviewPressureGaugeCode.clear();
|
|
|
|
|
m_sPreviewFlowGaugeCode.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 井绑定切换或清空时先清空并禁用三个记录/相下拉框,等待 refreshData() 重新填充。
|
|
|
|
|
if (m_pPressureGaugeCombo != nullptr)
|
|
|
|
|
@ -1693,6 +1880,7 @@ void nmWellPressureFlowPage::resetDataViews()
|
|
|
|
|
bool bSignalsWereBlocked = m_pPressureGaugeCombo->blockSignals(true);
|
|
|
|
|
m_pPressureGaugeCombo->clear();
|
|
|
|
|
m_pPressureGaugeCombo->setEnabled(false);
|
|
|
|
|
m_pPressureGaugeCombo->setToolTip(QString());
|
|
|
|
|
m_pPressureGaugeCombo->blockSignals(bSignalsWereBlocked);
|
|
|
|
|
}
|
|
|
|
|
if (m_pFlowGaugeCombo != nullptr)
|
|
|
|
|
@ -1700,8 +1888,10 @@ void nmWellPressureFlowPage::resetDataViews()
|
|
|
|
|
bool bSignalsWereBlocked = m_pFlowGaugeCombo->blockSignals(true);
|
|
|
|
|
m_pFlowGaugeCombo->clear();
|
|
|
|
|
m_pFlowGaugeCombo->setEnabled(false);
|
|
|
|
|
m_pFlowGaugeCombo->setToolTip(QString());
|
|
|
|
|
m_pFlowGaugeCombo->blockSignals(bSignalsWereBlocked);
|
|
|
|
|
}
|
|
|
|
|
m_vecPressureGaugeRecords.clear();
|
|
|
|
|
m_vecFlowGaugeRecords.clear();
|
|
|
|
|
if (m_pDisplayPhaseCombo != nullptr)
|
|
|
|
|
{
|
|
|
|
|
|