diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index c9dde42..9091063 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -472,6 +472,7 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV else if("数值" == m_propertyData[qtProperty]) { double temp = variant.toDouble(); +// this->m_formInfo->m_cp_coreValue = temp; this->m_tdCorePhysics->setCpCoreValue(temp); this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics(); } @@ -941,10 +942,24 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant else if("岩性" == m_propertyData[pProperty]) { QString newResult = variant.value(); - m_tdLayer->setLith(newResult); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetLithSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); // - QCPRange currentRange = m_tdLayer->getRange(); - m_tdLayer->setRange(currentRange.lower, currentRange.upper); + if(newResult.contains(strDefaultPath)) + { + m_tdLayer->setLith(newResult); + // + QCPRange currentRange = m_tdLayer->getRange(); + m_tdLayer->setRange(currentRange.lower, currentRange.upper); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } else if (m_strCurrentProperty == JieshiItem_Property) @@ -1021,12 +1036,26 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant if(m_tdGujing) { QString newResult = variant.value(); - m_tdGujing->setResult(newResult); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetGujingSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); // - QCPRange currentRange = m_tdGujing->getRange(); - m_tdGujing->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdGujing->mPlot->SaveToSLF_Gujing(); + if(newResult.contains(strDefaultPath)) + { + m_tdGujing->setResult(newResult); + // + QCPRange currentRange = m_tdGujing->getRange(); + m_tdGujing->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdGujing->mPlot->SaveToSLF_Gujing(); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } } @@ -1076,12 +1105,26 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant if(m_tdSwallCore) { QString newResult = variant.value(); - m_tdSwallCore->setLith(newResult); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetSymbolDir()+"取心岩性符号"; + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); // - QCPRange currentRange = m_tdSwallCore->getRange(); - m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); + if(newResult.contains(strDefaultPath)) + { + m_tdSwallCore->setLith(newResult); + // + QCPRange currentRange = m_tdSwallCore->getRange(); + m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } else if("油气" == m_propertyData[pProperty]) @@ -1090,12 +1133,26 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant if(m_tdSwallCore) { QString newResult = variant.value(); - m_tdSwallCore->setOil(newResult); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetGasSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); // - QCPRange currentRange = m_tdSwallCore->getRange(); - m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); + if(newResult.contains(strDefaultPath)) + { + m_tdSwallCore->setOil(newResult); + // + QCPRange currentRange = m_tdSwallCore->getRange(); + m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } else if("颜色" == m_propertyData[pProperty]) @@ -1105,24 +1162,37 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant { QString ColorImage = variant.value(); - QString name = ""; - int CoreColor = 0; + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetColorSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); ColorImage.replace("\\","/"); - int l=ColorImage.lastIndexOf("/"); - if(l>-1) name=ColorImage.mid(l+1); - - l=name.indexOf("."); - if(l>-1)name=name.left(l); - int ind=m_tdSwallCore->mPlot->colors_SWallCore.indexOf(name); - if(ind<0||ind>=m_tdSwallCore->mPlot->colorinds_SWallCore.size()) CoreColor=0; - else CoreColor=m_tdSwallCore->mPlot->colorinds_SWallCore[ind].toInt(); - - m_tdSwallCore->setTitle(QString::number(CoreColor)); // - QCPRange currentRange = m_tdSwallCore->getRange(); - m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); + if(ColorImage.contains(strDefaultPath)) + { + QString name = ""; + int CoreColor = 0; + ColorImage.replace("\\","/"); + int l=ColorImage.lastIndexOf("/"); + if(l>-1) name=ColorImage.mid(l+1); + + l=name.indexOf("."); + if(l>-1)name=name.left(l); + int ind=m_tdSwallCore->mPlot->colors_SWallCore.indexOf(name); + if(ind<0||ind>=m_tdSwallCore->mPlot->colorinds_SWallCore.size()) CoreColor=0; + else CoreColor=m_tdSwallCore->mPlot->colorinds_SWallCore[ind].toInt(); + + m_tdSwallCore->setTitle(QString::number(CoreColor)); + // + QCPRange currentRange = m_tdSwallCore->getRange(); + m_tdSwallCore->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdSwallCore->mPlot->SaveToSLF_SwallCore(); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } else if("起始位置" == m_propertyData[pProperty]) @@ -1174,12 +1244,26 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant if(m_tdGeoLith) { QString newResult = variant.value(); - m_tdGeoLith->setLith(newResult, m_tdGeoLith->m_Color); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetMudSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); // - QCPRange currentRange = m_tdGeoLith->getRange(); - m_tdGeoLith->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); + if(newResult.contains(strDefaultPath)) + { + m_tdGeoLith->setLith(newResult, m_tdGeoLith->m_Color); + // + QCPRange currentRange = m_tdGeoLith->getRange(); + m_tdGeoLith->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } else if("油气" == m_propertyData[pProperty]) @@ -1188,12 +1272,26 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant if(m_tdGeoLith) { QString newResult = variant.value(); - m_tdGeoLith->setOil(newResult); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetGasSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); // - QCPRange currentRange = m_tdGeoLith->getRange(); - m_tdGeoLith->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); + if(newResult.contains(strDefaultPath)) + { + m_tdGeoLith->setOil(newResult); + // + QCPRange currentRange = m_tdGeoLith->getRange(); + m_tdGeoLith->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } else if("颜色" == m_propertyData[pProperty]) @@ -1202,12 +1300,26 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant if(m_tdGeoLith) { QString newResult = variant.value(); - m_tdGeoLith->setLith(m_tdGeoLith->m_Lith, newResult); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetColorSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); // - QCPRange currentRange = m_tdGeoLith->getRange(); - m_tdGeoLith->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); + if(newResult.contains(strDefaultPath)) + { + m_tdGeoLith->setLith(m_tdGeoLith->m_Lith, newResult); + // + QCPRange currentRange = m_tdGeoLith->getRange(); + m_tdGeoLith->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdGeoLith->mPlot->SaveToSLF_GeoLith(); + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; + } } } else if("含油占比(1~8)" == m_propertyData[pProperty]) @@ -1675,19 +1787,33 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant //-------------------------- QString newResult = variant.value(); - m_tdGuan->setResult(newResult); - // - QCPRange currentRange = m_tdGuan->getRange(); - m_tdGuan->setRange(currentRange.lower, currentRange.upper); - //保存 - m_tdGuan->mPlot->SaveToSLF_Tubing(); - //--------- - bool bReDrawNew = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result); - if(bReDrawOld || bReDrawNew) + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = GetSymbolDir()+"管柱组件"; + //符号统一 + strDefaultPath.replace("\\","/"); + newResult.replace("\\","/"); + // + if(newResult.contains(strDefaultPath)) { - //组件改变后,重绘管柱 - m_tdGuan->mPlot->LoadFromSLF_ReDrawTubing(m_tdGuan->mPlot->m_strSlfName, m_tdGuan->mPlot->m_strLineName); + m_tdGuan->setResult(newResult); + // + QCPRange currentRange = m_tdGuan->getRange(); + m_tdGuan->setRange(currentRange.lower, currentRange.upper); + //保存 + m_tdGuan->mPlot->SaveToSLF_Tubing(); + + //--------- + bool bReDrawNew = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result); + if(bReDrawOld || bReDrawNew) + { + //组件改变后,重绘管柱 + m_tdGuan->mPlot->LoadFromSLF_ReDrawTubing(m_tdGuan->mPlot->m_strSlfName, m_tdGuan->mPlot->m_strLineName); + } + } + else { + QMessageBox::information(nullptr,"提示","所选目录不支持"); + return; } } } @@ -3125,9 +3251,51 @@ void PropertyWidget::initSwallCoreItemProperty(TransparentDraggableSwallCore* td // _CreateVariantPropertyItem("当前项", "深度", -Depth, QVariant::Double); - _CreateVariantPropertyItem("当前项", "岩性", LithologyImage, VariantManager::filePathTypeId()); - _CreateVariantPropertyItem("当前项", "油气", OilGasImage, VariantManager::filePathTypeId()); - _CreateVariantPropertyItem("当前项", "颜色", ColorImage, VariantManager::filePathTypeId()); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetSymbolDir()+"取心岩性符号"; + //符号统一 + strDefaultPath.replace("\\","/"); + LithologyImage.replace("\\","/"); + // + if(LithologyImage.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "岩性", LithologyImage, VariantManager::filePathTypeId()); + } + else{ + _CreateVariantPropertyItem("当前项", "岩性", strDefaultPath, VariantManager::filePathTypeId()); + } + + //只能选择自己的符号,不能选择其他。 + strDefaultPath = ::GetGasSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + OilGasImage.replace("\\","/"); + // + if(OilGasImage.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "油气", OilGasImage, VariantManager::filePathTypeId()); + } + else + { + _CreateVariantPropertyItem("当前项", "油气", strDefaultPath, VariantManager::filePathTypeId()); + } + + //只能选择自己的符号,不能选择其他。 + strDefaultPath = ::GetColorSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + ColorImage.replace("\\","/"); + // + if(ColorImage.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "颜色", ColorImage, VariantManager::filePathTypeId()); + } + else + { + _CreateVariantPropertyItem("当前项", "颜色", strDefaultPath, VariantManager::filePathTypeId()); + } + _CreateVariantPropertyItem("当前项", "起始位置", Sideleft, QVariant::Double); //_CreateVariantPropertyItem("当前项", "宽度", -Depth, QVariant::Double); } @@ -3294,7 +3462,21 @@ void PropertyWidget::initGujingItemProperty(TransparentDraggableGujing* tdGujing // _CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double); _CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double); - _CreateVariantPropertyItem("当前项", "固井结论", strResult, VariantManager::filePathTypeId()); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetGujingSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + strResult.replace("\\","/"); + // + if(strResult.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "固井结论", strResult, VariantManager::filePathTypeId()); + } + else + { + _CreateVariantPropertyItem("当前项", "固井结论", strDefaultPath, VariantManager::filePathTypeId()); + } } void PropertyWidget::initImageProperty(FormInfo *formInfo) @@ -3612,7 +3794,7 @@ void PropertyWidget::initTvdProperty(FormInfo *formInfo) m_strCurrentProperty = Tvd_Property; } -void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, const QString myLith, const QString myOil, const QString myColor) +void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, QString myLith, QString myOil, QString myColor) { //初始化,清空 InitCurrentViewInfo(); @@ -3654,9 +3836,54 @@ void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoL // _CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double); _CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double); - _CreateVariantPropertyItem("当前项", "岩性", myLith, VariantManager::filePathTypeId()); - _CreateVariantPropertyItem("当前项", "油气", myOil, VariantManager::filePathTypeId()); - _CreateVariantPropertyItem("当前项", "颜色", myColor, VariantManager::filePathTypeId()); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = ::GetMudSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + myLith.replace("\\","/"); + // + if(myLith.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "岩性", myLith, VariantManager::filePathTypeId()); + } + else{ + _CreateVariantPropertyItem("当前项", "岩性", strDefaultPath, VariantManager::filePathTypeId()); + } + + //只能选择自己的符号,不能选择其他。 + strDefaultPath = ::GetGasSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + myOil.replace("\\","/"); + // + if(myOil.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "油气", myOil, VariantManager::filePathTypeId()); + } + else + { + _CreateVariantPropertyItem("当前项", "油气", strDefaultPath, VariantManager::filePathTypeId()); + } + + //只能选择自己的符号,不能选择其他。 + strDefaultPath = ::GetColorSymbolDir(); + //符号统一 + strDefaultPath.replace("\\","/"); + myColor.replace("\\","/"); + // + if(myColor.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "颜色", myColor, VariantManager::filePathTypeId()); + } + else + { + _CreateVariantPropertyItem("当前项", "颜色", strDefaultPath, VariantManager::filePathTypeId()); + } + +// _CreateVariantPropertyItem("当前项", "岩性", myLith, VariantManager::filePathTypeId()); +// _CreateVariantPropertyItem("当前项", "油气", myOil, VariantManager::filePathTypeId()); +// _CreateVariantPropertyItem("当前项", "颜色", myColor, VariantManager::filePathTypeId()); } //气测/FMT/射孔/文本 @@ -3815,7 +4042,20 @@ void PropertyWidget::initTubingItemProperty(TransparentDraggableGuan* tdGuan, do // _CreateVariantPropertyItem("当前项", "深度(m)", -(upper+lower)/2.0, QVariant::Double); - _CreateVariantPropertyItem("当前项", "组件类型", strResult, VariantManager::filePathTypeId()); + + //只能选择自己的符号,不能选择其他。 + QString strDefaultPath = GetSymbolDir()+"管柱组件"; + //符号统一 + strDefaultPath.replace("\\","/"); + strResult.replace("\\","/"); + // + if(strResult.contains(strDefaultPath)) + { + _CreateVariantPropertyItem("当前项", "组件类型", strResult, VariantManager::filePathTypeId()); + } + else { + _CreateVariantPropertyItem("当前项", "组件类型", strDefaultPath, VariantManager::filePathTypeId()); + } } void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal) diff --git a/logPlus/PropertyWidget.h b/logPlus/PropertyWidget.h index bf143c0..cf1ead6 100644 --- a/logPlus/PropertyWidget.h +++ b/logPlus/PropertyWidget.h @@ -203,7 +203,7 @@ public: // 录井剖面属性 void initGeoLithProperty(FormInfo *formInfo); - void initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, const QString myLith, const QString myOil, const QString myColor); + void initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, QString myLith, QString myOil, QString myColor); // 文字结论属性 void initTextProperty(FormInfo *formInfo); diff --git a/logPlus/formwell.cpp b/logPlus/formwell.cpp index 5528947..6fdab02 100644 --- a/logPlus/formwell.cpp +++ b/logPlus/formwell.cpp @@ -438,11 +438,11 @@ void FormWell::slot_NewTrack_No_Line(QString strUuid, QJsonObject topObj, QJsonO } } - int nW = 0; + double nW = 0; if (topObj.contains("TrackW")) { QJsonValue value = topObj.value("TrackW"); - nW = value.toInt(); + nW = value.toDouble(); } QStringList listdt; diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 6b63424..78e30dc 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -91,7 +91,7 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) : // 连接信号和槽 connect(ui->tableWidget_2, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint))); - connect(this, SIGNAL(sig_NewTrackChangeWidth(QString, int)), this, SLOT(s_NewTrackChangeWidth(QString, int))); + connect(this, SIGNAL(sig_NewTrackChangeWidth(QString, double)), this, SLOT(s_NewTrackChangeWidth(QString, double))); //connect(this, SIGNAL(sig_NewWell(QString, QString)), this, SLOT(s_NewWell(QString, QString))); connect(CallManage::getInstance(), SIGNAL(sig_mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); @@ -2611,7 +2611,7 @@ void MainWindowCurve::onItemClicked(QTableWidgetItem* item) PropertyService()->initWellProperty(m_strUuid, strSlfName, strWellName, m_iY1, m_iY2); //取消所有选中单元格 - emit CallManage::getInstance()->sig_Raise(m_strUuid, strSlfName, strWellName, "", "", 0, ""); + emit CallManage::getInstance()->sig_Raise(m_strUuid, strSlfName, strWellName, "", "", 1, ""); } @@ -3365,7 +3365,7 @@ void MainWindowCurve::s_NewTDT() emit CallManage::getInstance()->sig_NewCol(dt); } -void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName, int nW) +void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName, double nW) { qDebug() << "MainWindowCurve s_NewTrackChangeWidth"; @@ -3419,7 +3419,7 @@ void MainWindowCurve::s_AddLine_Property(QString strSlfName, QString strWellName //新建井+道+曲线(首条) void MainWindowCurve::NewWellAndTrack(QString strWellName, QString strSlfName, QString strLineName, QString strType) { - int nW = 0; + double nW = 0; if(strType=="SantuyibiaoObject") { //斜井三图一表 @@ -4024,7 +4024,7 @@ void MainWindowCurve::DisplayTracks(QJsonArray tracksArray) QJsonObject trackObj = trackValue.toObject(); // QString strTrackName = ""; - int nTrackW = 0; + double nTrackW = 0; if (trackObj.contains("topinfo") && trackObj.contains("info")) { QJsonValue topVal = trackObj.value("topinfo"); @@ -4037,7 +4037,7 @@ void MainWindowCurve::DisplayTracks(QJsonArray tracksArray) DisplayTrack_Top(id, topObj, infoObj); strTrackName = topObj.value("TrackName").toString(); - nTrackW = topObj.value("TrackW").toInt(); + nTrackW = topObj.value("TrackW").toDouble(); } } // if (trackObj.contains("info")) @@ -4057,7 +4057,7 @@ void MainWindowCurve::DisplayTrack_Top(int id, QJsonObject trackTop, QJsonObject { //新建道+曲线 s_NewTrack_No_Line(trackTop, trackInfo);//新建空白道,没有曲线 - if(id>0) + //if(id>0) { QString strWellName = ""; if (trackTop.contains("WellName")) @@ -4068,14 +4068,22 @@ void MainWindowCurve::DisplayTrack_Top(int id, QJsonObject trackTop, QJsonObject qDebug() << "WellName:" << strWellName; } } - int nW = 0; + double nW = 0; if (trackTop.contains("TrackW")) { QJsonValue value = trackTop.value("TrackW"); - nW = value.toInt(); + nW = value.toDouble(); } //改变井宽 - s_NewTrackChangeWidth(strWellName, nW * static_cast(g_dPixelPerCm)); + if(id==0) + { + //第一道,默认减掉空井宽g_iOneWidth + s_NewTrackChangeWidth(strWellName, nW * g_dPixelPerCm - g_iOneWidth); + } + else + { + s_NewTrackChangeWidth(strWellName, nW * g_dPixelPerCm); + } //mainWindowCurve->s_NewTrackChangeWidth(strWellName); } } diff --git a/logPlus/mainwindowcurve.h b/logPlus/mainwindowcurve.h index cc22bed..f2d361d 100644 --- a/logPlus/mainwindowcurve.h +++ b/logPlus/mainwindowcurve.h @@ -136,7 +136,7 @@ public: QStringList getLineList(QString strWellName, QString strTrackName); signals: - void sig_NewTrackChangeWidth(QString strWellName, int nW=0);//新建道后,改变井宽 + void sig_NewTrackChangeWidth(QString strWellName, double nW=0);//新建道后,改变井宽 void sig_NewWell(QString strWellName); public slots: @@ -168,7 +168,7 @@ public slots: public slots: void s_NewWell(QString strWellName, QString strSlfName);//新建井 - void s_NewTrackChangeWidth(QString strWellName, int nW=0);//新建道后,改变井宽 + void s_NewTrackChangeWidth(QString strWellName, double nW=0);//新建道后,改变井宽 void s_NewTrack_No_Line(QString strWellName, QString strTrackName);//新建空白道,没有曲线 void s_NewTrack_No_Line(QJsonObject topObj, QJsonObject infoObj);//新建空白道,没有曲线 diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 3697218..fa8560a 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -3010,10 +3010,10 @@ void QMyCustomPlot::addItem_SWallCore() int CoreColor=0; if (liths.size()>=CoreLith) { - LithologyImage=::GetSymbolDir()+"/取心岩性符号/"+liths[CoreLith-1]+".svg"; + LithologyImage=::GetSymbolDir()+"取心岩性符号/"+liths[CoreLith-1]+".svg"; QDir ss(LithologyImage); if(!ss.exists()) { - LithologyImage=::GetSymbolDir()+"/取心岩性符号/"+liths[CoreLith-1]+".png"; + LithologyImage=::GetSymbolDir()+"取心岩性符号/"+liths[CoreLith-1]+".png"; } } if (CoreOil>0&&oils.size()>=CoreOil) @@ -3174,10 +3174,10 @@ void QMyCustomPlot::AddItem_SWallCore(QStringList lists) } else if (liths_SWallCore.size()>=m_Result.CoreLith) { - LithologyImage=::GetSymbolDir()+"/取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".svg"; + LithologyImage=::GetSymbolDir()+"取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".svg"; QDir ss(LithologyImage); if(!ss.exists()) { - LithologyImage=::GetSymbolDir()+"/取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".png"; + LithologyImage=::GetSymbolDir()+"取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".png"; } } if (m_Result.CoreOil>0&&oils_SWallCore.size()>=m_Result.CoreOil) @@ -3661,10 +3661,10 @@ bool QMyCustomPlot::LoadFromSLF_SwallCore(QString strSlfName, QString strLineNam } else if (liths_SWallCore.size()>=m_Result.CoreLith) { - LithologyImage=::GetSymbolDir()+"/取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".svg"; + LithologyImage=::GetSymbolDir()+"取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".svg"; QDir ss(LithologyImage); if(!ss.exists()) { - LithologyImage=::GetSymbolDir()+"/取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".png"; + LithologyImage=::GetSymbolDir()+"取心岩性符号/"+liths_SWallCore[m_Result.CoreLith-1]+".png"; } } if (m_Result.CoreOil>0&&oils_SWallCore.size()>=m_Result.CoreOil) @@ -6840,7 +6840,7 @@ void QMyCustomPlot::DrawTubing() } if(m_bDrawTubing_Tubing) { - QString shotimgfile=GetSymbolDir()+"\\管柱组件\\管柱.png"; + QString shotimgfile=GetSymbolDir()+"管柱组件\\管柱.png"; double lY1 = 0;//this->yAxis->range().lower;//+10 double lY2 = m_OutD_Tubing;//this->yAxis->range().upper - this->yAxis->range().lower; //this->yAxis->range().upper; @@ -8998,7 +8998,7 @@ bool QMyCustomPlot::LoadFromSLF_Tubing(QString strSlfName, QString csCurve) { m_pResultList_Tubing.clear(); - cclimgpath_Tubing=GetSymbolDir()+"\\管柱组件\\"; + cclimgpath_Tubing=GetSymbolDir()+"管柱组件\\"; //先删除 if(mPixmap_Tubing) { @@ -9139,7 +9139,7 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result) bool QMyCustomPlot::LoadFromSLF_ReDrawTubing(QString strSlfName, QString csCurve) { - cclimgpath_Tubing=GetSymbolDir()+"\\管柱组件\\"; + cclimgpath_Tubing=GetSymbolDir()+"管柱组件\\"; Slf_JIEGUPOS *m_pResult=NULL; CMemRdWt *logio=new CMemRdWt();