选择井曲线,优化修改名称后的清空逻辑
This commit is contained in:
parent
310ae7f507
commit
bd010069a1
|
|
@ -140,39 +140,39 @@ void PropertyWidget::changedYxzpProperty(QtProperty *qtProperty, const QVariant
|
|||
{
|
||||
if("选择井曲线" == m_propertyData[qtProperty])
|
||||
{
|
||||
QString sFilePath = variant.value<QString>();
|
||||
if(sFilePath.indexOf("@")>-1)
|
||||
{
|
||||
int ind=sFilePath.indexOf("@");
|
||||
QString strLineName = sFilePath.left(ind);
|
||||
sFilePath=sFilePath.mid(ind+1);
|
||||
sFilePath.trimmed();
|
||||
//只支持以下名称
|
||||
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
||||
{
|
||||
QString strOldLineName = m_formInfo->m_strLineName;
|
||||
QString strOldSlfName = m_formInfo->m_strSlfName;
|
||||
//暂时不允许改变slf井次名称,不然不在同一口井绘制
|
||||
if(strOldSlfName != sFilePath)
|
||||
{
|
||||
QMessageBox::information(nullptr,"提示","不允许改变slf井次名称");
|
||||
return;
|
||||
}
|
||||
//名称不变
|
||||
if(strOldLineName == strLineName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// QString sFilePath = variant.value<QString>();
|
||||
// if(sFilePath.indexOf("@")>-1)
|
||||
// {
|
||||
// int ind=sFilePath.indexOf("@");
|
||||
// QString strLineName = sFilePath.left(ind);
|
||||
// sFilePath=sFilePath.mid(ind+1);
|
||||
// sFilePath.trimmed();
|
||||
// //只支持以下名称
|
||||
// if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
||||
// {
|
||||
// QString strOldLineName = m_formInfo->m_strLineName;
|
||||
// QString strOldSlfName = m_formInfo->m_strSlfName;
|
||||
// //暂时不允许改变slf井次名称,不然不在同一口井绘制
|
||||
// if(strOldSlfName != sFilePath)
|
||||
// {
|
||||
// QMessageBox::information(nullptr,"提示","不允许改变slf井次名称");
|
||||
// return;
|
||||
// }
|
||||
// //名称不变
|
||||
// if(strOldLineName == strLineName)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
//
|
||||
m_formInfo->m_strLineName = strLineName;
|
||||
//m_formInfo->m_strSlfName = sFilePath;
|
||||
m_formInfo->update();
|
||||
// //
|
||||
// m_formInfo->m_strLineName = strLineName;
|
||||
// //m_formInfo->m_strSlfName = sFilePath;
|
||||
// m_formInfo->update();
|
||||
|
||||
//改变固井曲线名
|
||||
emit CallManage::getInstance()->sig_changeGujingLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
|
||||
}
|
||||
}
|
||||
// //改变固井曲线名
|
||||
// emit CallManage::getInstance()->sig_changeGujingLine(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, strOldLineName, strLineName);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else if("例区高度(cm)" == m_propertyData[qtProperty])
|
||||
{
|
||||
|
|
@ -720,7 +720,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
sFilePath=sFilePath.mid(ind+1);
|
||||
sFilePath.trimmed();
|
||||
//只支持以下名称
|
||||
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
||||
//if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT")
|
||||
{
|
||||
QString strOldLineName = m_formInfo->m_strLineName;
|
||||
QString strOldSlfName = m_formInfo->m_strSlfName;
|
||||
|
|
|
|||
|
|
@ -4738,10 +4738,19 @@ void QMyCustomPlot::RefreshItems_Gujing()
|
|||
pDraggableRect->deleteRect();
|
||||
}
|
||||
|
||||
//重新加载
|
||||
LoadFromSLF_Gujing(m_strSlfName, m_strLineName);
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
//只支持以下名称
|
||||
if (m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT")
|
||||
{
|
||||
//重新加载
|
||||
LoadFromSLF_Gujing(m_strSlfName, m_strLineName);
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
replot();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//合并结论
|
||||
|
|
@ -4820,7 +4829,8 @@ void QMyCustomPlot::MegResult_Gujing()
|
|||
|
||||
//加载固井slf数据
|
||||
bool QMyCustomPlot::LoadFromSLF_Gujing(QString strSlfName, QString strLineName)
|
||||
{
|
||||
{
|
||||
//
|
||||
CMemRdWt *logio=new CMemRdWt();
|
||||
if(!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
|
||||
{
|
||||
|
|
@ -5517,20 +5527,49 @@ void QMyCustomPlot::s_ReloadPlot(QString strUuid, QString strSlfName, QString st
|
|||
if(m_strSlfName == strSlfName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(strLineName == "")
|
||||
{
|
||||
//先清空
|
||||
m_x.clear();
|
||||
m_y.clear();
|
||||
|
||||
m_showX.clear();
|
||||
m_showX = m_x;
|
||||
m_showY.clear();
|
||||
m_showY = m_y;
|
||||
|
||||
graph(0)->data()->clear();
|
||||
//graph(0)->setData(m_x, m_y);
|
||||
replot(); //刷新曲线
|
||||
return;
|
||||
}
|
||||
|
||||
//读取slf
|
||||
CLogIO *logio=new CLogIO();
|
||||
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
||||
//
|
||||
int index=logio->OpenCurve(strLineName.toStdString().c_str());
|
||||
if(index<0) {
|
||||
delete logio;
|
||||
delete logio;
|
||||
|
||||
//先清空
|
||||
m_x.clear();
|
||||
m_y.clear();
|
||||
|
||||
m_showX.clear();
|
||||
m_showX = m_x;
|
||||
m_showY.clear();
|
||||
m_showY = m_y;
|
||||
|
||||
graph(0)->data()->clear();
|
||||
//graph(0)->setData(m_x, m_y);
|
||||
replot(); //刷新曲线
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -7821,7 +7860,12 @@ void QMyCustomPlot::s_changeJiegutextTitle(QString strUuid, QString strSlfName,
|
|||
|
||||
//重新加载
|
||||
//QString strAliasName = "气测-FMT-射孔-文本";
|
||||
LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
|
||||
bool bRet = LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
|
||||
if(!bRet)
|
||||
{
|
||||
replot();
|
||||
}
|
||||
|
||||
//属性清空(LoadFromSLF_Jiegutext内部调用)
|
||||
//PropertyService()->InitCurrentViewInfo();
|
||||
}
|
||||
|
|
@ -8624,6 +8668,11 @@ void QMyCustomPlot::AddItem_Layer(QStringList lists)
|
|||
|
||||
bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, QString strAliasName)
|
||||
{
|
||||
if(csCurve == "")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Slf_TxtPOS *m_pResult=NULL;
|
||||
CMemRdWt *logio=new CMemRdWt();
|
||||
if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
|
||||
|
|
@ -9107,7 +9156,11 @@ void QMyCustomPlot::RefreshItems_Jiegutext()
|
|||
//
|
||||
QString strAliasName = pInfo->m_strAliasName;
|
||||
//加载
|
||||
this->LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
|
||||
bool bRet = this->LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName);
|
||||
if(!bRet)
|
||||
{
|
||||
replot();
|
||||
}
|
||||
//属性清空(LoadFromSLF_Jiegutext内部调用)
|
||||
//PropertyService()->InitCurrentViewInfo();
|
||||
}
|
||||
|
|
@ -13548,6 +13601,11 @@ void QMyCustomPlot::Draw_MCals(QString strLineName, QString strNewLineName)
|
|||
|
||||
//多臂井径
|
||||
m_strLineName = pInfo->m_strLineName; //"FCA2";
|
||||
if(m_strLineName == "")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CDrawNrad *drawNrad = new CDrawNrad(this);
|
||||
//属性
|
||||
drawNrad->m_LeftVal = pInfo->m_MinVal;//最小井径
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user