From 131a68222d5c2ceb2fa1e54ba25da4381222309d Mon Sep 17 00:00:00 2001 From: zhaolei <353719554@qq.com> Date: Tue, 19 May 2026 12:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E8=A7=86=E8=A7=A3=E9=87=8A=E5=9B=BA?= =?UTF-8?q?=E4=BA=95=E5=90=8D=E6=B1=89=E5=AD=97=E5=8F=AF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EditPlotHeader/src/wellloginformation.cpp | 4 +- logPlus/qmycustomplot.cpp | 52 +++++++++++------------ 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/EditPlotHeader/src/wellloginformation.cpp b/EditPlotHeader/src/wellloginformation.cpp index 4d4018d..e934a4f 100644 --- a/EditPlotHeader/src/wellloginformation.cpp +++ b/EditPlotHeader/src/wellloginformation.cpp @@ -426,8 +426,10 @@ void WellLogInformation::OnSave() } WriteTable(pLogio,nTableFlag); - delete pLogio; + QStringList Names; + Names.append("测井信息表"); + emit CallGlobalManage::getInstance()->sig_Notice_AddObject("WellLogModule",szWellName,Names); // GetObjectEvent().OnRefreshMessage(szWellName,"Message",this); QMessageBox::information(nullptr,("提示"),("存储成功!")); } diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 53b296b..a11f25a 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -3197,7 +3197,7 @@ bool QMyCustomPlot::SaveToSLF_SwallCore() return false; } bool isfirst=false; - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if (iIndex < 0) { if(!m_mapDraggable_SwallCore.size()) { @@ -3399,7 +3399,7 @@ bool QMyCustomPlot::SaveToSLF_GeoLith() return false; } bool isfirst=false; - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if (iIndex < 0) { if(!m_mapDraggable_GeoLith.size()) { @@ -3525,7 +3525,7 @@ bool QMyCustomPlot::SaveToSLF_Text() } QString name=m_strLineName; bool isfirst=false; - int iIndex=logio->OpenTable(name.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(name)); if (iIndex < 0) { if(!m_mapDraggable_Rect.size()) { @@ -3638,7 +3638,7 @@ bool QMyCustomPlot::SaveToSLF_Layer() return false; } bool isfirst=false; - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if(iIndex<0) { iIndex=logio->OpenTable("LAYER_DATA"); if(iIndex<0) { @@ -3764,7 +3764,7 @@ bool QMyCustomPlot::SaveToSLF_Gujing() return false; } - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); bool isfirst=false; if (iIndex < 0) { @@ -3857,7 +3857,7 @@ bool QMyCustomPlot::SaveToSLFImage() } //QString ssss = m_strLineName.toStdString().c_str(); - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); bool isfirst=false; if (iIndex < 0) { @@ -3956,7 +3956,7 @@ bool QMyCustomPlot::saveToSLFCorePhysics() } //QString ssss = m_strLineName.toStdString().c_str(); - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); bool isfirst=false; if (iIndex < 0) { @@ -4538,7 +4538,7 @@ bool QMyCustomPlot::LoadFromSLF_GeoLith(QString strSlfName, QString strLineName) delete logio; return false; } - int iIndex=logio->OpenTable(strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(strLineName)); if(iIndex>-1) { int len=logio->GetTableRecordLength(iIndex); int sl=sizeof(GeoLith_DATA); @@ -4679,7 +4679,7 @@ bool QMyCustomPlot::LoadFromIMAGE_SLF(QString strSlfName, QString strLineName) // QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes); return false; } - int iIndex=logio->OpenTable(strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(strLineName)); if(iIndex>-1) { int len=logio->GetTableRecordLength(iIndex); if(lenOpenTable(strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(strLineName)); if(iIndex>-1) { int FieldNo=0; int count=logio->GetTableRecordCount(iIndex); @@ -4845,7 +4845,7 @@ bool QMyCustomPlot::LoadFromSLF_SwallCore(QString strSlfName, QString strLineNam } // - int iIndex=logio->OpenTable(strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(strLineName)); if(iIndex>-1) { int count=logio->GetTableRecordCount(iIndex); for(int i=0;iOpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if(iIndex<=0){ delete logio; QMessageBox::information(NULL,"提示","缺失表"+m_strLineName+",请检查!!",QMessageBox::Yes); @@ -5300,7 +5300,7 @@ bool QMyCustomPlot::LoadFromSLF_Gujing(QString strSlfName, QString strLineName) zoneOrder_Gujing.insert(lines[i],QString::number(i)); } - int iIndex=logio->OpenTable(strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(strLineName)); if(iIndex>-1) { //------------------------------------// //判断 @@ -8925,7 +8925,7 @@ bool QMyCustomPlot::LoadFromSLF_Layer(QString strSlfName, QString strLineName) return false; } - int iIndex=logio->OpenTable(strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(strLineName)); if (iIndex <0) { iIndex=logio->OpenTable("LAYER_DATA"); } @@ -8981,7 +8981,7 @@ bool QMyCustomPlot::LoadFromSLF_Text(QString strSlfName, QString strLineName) // QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes); return false; } - int iIndex=logio->OpenTable(strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(strLineName)); if(iIndex>-1) { int len=logio->GetTableRecordLength(iIndex); if(lenOpenTable(csCurve.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(csCurve)); if(iIndex<0) { delete logio; return false; @@ -9390,7 +9390,7 @@ void QMyCustomPlot::addItems_Jiegutext() int k=0; QStringList coredat=line[0].split(" "); if((istab==-1||isd==-1)&&isspace>=0) coredat.removeAll(""); - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if(iIndex>=0) { int count=logio->GetTableFieldCount(iIndex); if(count!=coredat.size()) { @@ -9594,7 +9594,7 @@ bool QMyCustomPlot::SaveToSLF_Jiegutext() return false; } bool isfirst=false; - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if (iIndex < 0) { if(!m_mapDraggable_Jiegutext.size()) { @@ -9829,7 +9829,7 @@ bool QMyCustomPlot::SaveToSLF_Result() } int resultGroupSize = m_mapDragGroup.size(); bool isfirst = false; - int iIndex = logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex = logio->OpenTable(UTF8ToGBK(m_strLineName)); if (iIndex < 0) { if (!resultGroupSize) { @@ -10418,7 +10418,7 @@ void QMyCustomPlot::ReadData_Fac(QString strSlfName, QString csCurve, bool bAdd) if (mrw.Open(strSlfName.toStdString().c_str()) ) // 打开井文件 { - iIndex=mrw.OpenTable(csCurve.toStdString().c_str()); + iIndex=mrw.OpenTable(UTF8ToGBK(csCurve)); if(iIndex>=0) { nField=mrw.GetTableFieldCount(iIndex); @@ -10908,7 +10908,7 @@ bool QMyCustomPlot::LoadFromSLF_Tubing(QString strSlfName, QString csCurve) return false; } - int iIndex=logio->OpenTable(csCurve.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(csCurve)); if(iIndex<0) { delete logio; @@ -11043,7 +11043,7 @@ bool QMyCustomPlot::LoadFromSLF_ReDrawTubing(QString strSlfName, QString csCurve return false; } - int iIndex=logio->OpenTable(csCurve.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(csCurve)); if(iIndex<0) { delete logio; @@ -11120,7 +11120,7 @@ bool QMyCustomPlot::SaveToSLF_Tubing() return false; } bool isfirst=false; - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if (iIndex < 0) { if(!m_mapDraggable_Guan.size()) { @@ -11276,7 +11276,7 @@ void QMyCustomPlot::addItems_Tubing() int k=0; QStringList coredat=line[0].split(" "); if((istab==-1||isd==-1)&&isspace>=0) coredat.removeAll(""); - int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str()); + int iIndex=logio->OpenTable(UTF8ToGBK(m_strLineName)); if(iIndex>=0) { int count=logio->GetTableFieldCount(iIndex); if(count!=coredat.size()) { @@ -12453,7 +12453,7 @@ void QMyCustomPlot::drawDipAngle(double centerX, double centerY, float ifdir[360 for (int i = 0; i < lineNumber; ++i) { double currY = startX - i * step; - // 🔥🔥🔥 核心:每个刻度单独计算长度(和你GDI完全一样,每个长度不同) + // 核心:每个刻度单独计算长度(和你GDI完全一样,每个长度不同) double dynamicLen = 0.1 * ifdir[i] / dirmax + lineHeight; QCPItemLine *scaleLine = new QCPItemLine(this); @@ -12601,7 +12601,7 @@ bool QMyCustomPlot::ReadData(QString strSlfName, QString strLineName) if ( mrw.Open(strSlfName.toStdString().c_str()) ) // 打开井文件 { //CString strFracTable(m_qsTable); - iIndex = mrw.OpenTable(m_qsTable.toStdString().c_str()); + iIndex = mrw.OpenTable(UTF8ToGBK(m_qsTable)); if (iIndex >= 0) { nField = mrw.GetTableFieldCount(iIndex);