diff --git a/CallManage/CallManage.h b/CallManage/CallManage.h index cfd22e3..19fa70d 100644 --- a/CallManage/CallManage.h +++ b/CallManage/CallManage.h @@ -80,7 +80,7 @@ signals: void sig_AddMCals(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); //沉积相 - void sig_AddLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); + void sig_AddLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0, QStringList listOtherProperty={}); //套管组件 void sig_AddTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); diff --git a/logPlus/DrawFac.cpp b/logPlus/DrawFac.cpp deleted file mode 100644 index 54f7d71..0000000 --- a/logPlus/DrawFac.cpp +++ /dev/null @@ -1,263 +0,0 @@ -#include -#include -#include -#include -#include "MemRdWt.h" -#include "DrawFac.h" -#include -#include "geometryutils.h" - -CDrawFac::CDrawFac(QMyCustomPlot *myCustomPlot, QString strSlfName, QString csCurve) -{ - m_myCustomPlot = myCustomPlot; - - //隐藏刻度 - myCustomPlot->xAxis->setTicks(false); - myCustomPlot->yAxis->setTicks(false); - myCustomPlot->xAxis2->setTicks(false); - myCustomPlot->yAxis2->setTicks(false); - - //画2条竖线 - int iMyWidth = myCustomPlot->axisRect(0)->width(); - QCPItemStraightLine *qcpItemLine = new QCPItemStraightLine(myCustomPlot); - qcpItemLine->point1->setCoords(-1, iMyWidth/2);//位置 - qcpItemLine->point2->setCoords(-2, iMyWidth/2);//位置 - //qcpItemLine->setPen(pPenStraightLine); - - QCPItemStraightLine *qcpItemLine2 = new QCPItemStraightLine(myCustomPlot); - qcpItemLine2->point1->setCoords(-1, 3*iMyWidth/4);//位置 - qcpItemLine2->point2->setCoords(-2, 3*iMyWidth/4);//位置 - - ReadFracDef(); - - ReadData(strSlfName, csCurve); - DrawFac(1);//相 - DrawFac(2);//亚相 -} - -CDrawFac::~CDrawFac(void) -{ - m_FracDef.clear(); - m_ObjList.clear(); -} - -void CDrawFac::ReadFracDef() -{ - m_FracDef.clear(); - - QString fracFilePath = GetConfPath() + "GEoFac.ini"; - - // - FAC_DEF fd; - char str[512],fac[512],phase[64],mFac[64]; - int r,g,b,id; - FILE *fp; - QString qs; - fp = fopen(fracFilePath.toStdString().c_str(), "r"); - if ( fp != nullptr ) - { - fgets(str,256,fp); // 跳过第一行 - while (!feof(fp)) - { - fgets(str,256,fp); - qs = str; - qs.trimmed(); - if (qs.length() < 8) break ; - //代码 微相 亚相 相 - sscanf(str,"%d %s %s %s",&fd.iCode,mFac,phase,fac); - fd.mFac = mFac; - fd.Fac = fac; - fd.Phase = phase; - m_FracDef.append(fd); - if ( feof(fp)) - break; - } - fclose(fp); - } - else - { - sprintf(fac,"打开沉积相参数配置文件错误:%s!",str); - QMessageBox::information(nullptr, "读取文件失败", fac); - } -} - -void CDrawFac::ReadData(QString strSlfName, QString csCurve) -{ - if(strSlfName.isEmpty()) return; - //清空 - m_ObjList.clear(); - - QString cs; - int nLineWidth=2; - int nField; - QColor crColor(255,0,0); - FAC_TABLE frac; - CMemRdWt mrw; - char strFracTable[256]; - int i,j,iIndex,nCount,iType=1; - - if (mrw.Open(strSlfName.toStdString().c_str()) ) // 打开井文件 - { - iIndex=mrw.OpenTable(csCurve.toStdString().c_str()); - if(iIndex>=0) - { - nField=mrw.GetTableFieldCount(iIndex); - nCount=mrw.GetTableRecordCount(iIndex); - cs =""; - if ( nField != 7 ) - nCount = 0; - for(i=0;iaddMFacToPlot(-frac.edep, -frac.sdep, QString::fromLocal8Bit(frac.mFac)); - } - mrw.CloseTable(iIndex); - } - mrw.Close(); //关闭井文件 - } -} - -void CDrawFac::DrawFac(int iType) -{ - int j; - float dep1,dep2; - float top,bottom; - QString str1,str2; - QColor crColor(0,0,0); - QPen qPen(crColor, 1, Qt::SolidLine); - if ( m_ObjList.count()<2 ) - return ; - - //绘制相、亚相 - FAC_TABLE pObj; - pObj =m_ObjList[0]; - if (iType==1) - str1 = QString::fromLocal8Bit(pObj.Fac); - else - str1 = QString::fromLocal8Bit(pObj.Phase); - str1.trimmed(); - top = pObj.sdep; - - for (j=1;jaddFacToPlot(-bottom, -top, str1); - } - else - { - //亚相 - m_myCustomPlot->addPhaseToPlot(-bottom, -top, str1); - } - - top = pObj.sdep; - str1=str2; - } - } -} - -//void CDrawFac::DrawFrac(QPainter* pDC,QRectF mrt) -//{ -// QRectF rt; -// float flDepthScale = m_DepthScale*m_nVertRatio; -// float sdepc,edepc,sdep,edep; -// float temp,temp2; -// CFracObj *pObj; -// QString cs; -// int i,j,n,nCol=2; -// QColor crColor(0,0,0); -// QPen qPen(crColor, 1, Qt::SolidLine); -// rt=mrt; -// flDepthScale = m_DepthScale*m_nVertRatio; -// rt = mrt; -// // 计算显示深度 -// GetDepth(pDC,mrt,rt,sdep,edep,sdepc,edepc); - -// if ( edep > m_PlotEdep ) edep = m_PlotEdep; -// if ( sdep < m_PlotSdep ) sdep = m_PlotSdep; -// if ( sdep > m_PlotEdep ) return ; -// if ( edep < m_PlotSdep ) return ; -// if ( edep > m_PlotEdep ) edep = m_PlotEdep; -// pDC->setBrush(Qt::NoBrush); -// pDC->setFont(m_LabelFont); - -// if ( m_bDrawFac) -// nCol++; -// if ( m_bDrawPhase) -// nCol++; -// n = m_FracDef.count(); -// pDC->setPen(qPen); -// //绘制微相 -// for (j=0;jm_Frac.edep m_Frac.sdep > edep) -// continue; -// rt= pObj->m_Rect; -// temp = mrt.left()+2.*mrt.width()/nCol; -// rt.setRight(temp); -// if (m_bSymbol) //绘制微相符号 -// pObj->Draw(pDC,rt,m_iMode); -// if ( m_bDrawMFac ) -// { -// cs = pObj->m_Frac.mFac; -// pDC->drawText(rt,Qt::AlignCenter| Qt::AlignVCenter,cs); -// } -// pDC->drawLine(QPoint(mrt.left(),rt.top()),QPoint(temp,rt.top())); -// pDC->drawLine(QPoint(mrt.left(),rt.bottom()),QPoint(temp,rt.bottom())); -// } -// if ( m_bDrawFac && m_bDrawPhase) -// { -// temp = mrt.left()+2.*mrt.width()/nCol; -// temp2 = mrt.left()+3.*mrt.width()/nCol; -// DrawFac(pDC,mrt,2,temp,temp2); -// DrawFac(pDC,mrt,1,temp2,mrt.right()); -// pDC->drawLine(QPoint(temp,mrt.top()),QPoint(temp,mrt.bottom())); -// pDC->drawLine(QPoint(temp2,mrt.top()),QPoint(temp2,mrt.bottom())); -// } -// else -// { -// if ( m_bDrawFac || m_bDrawPhase) -// { -// temp = mrt.left()+2.*mrt.width()/nCol; -// if ( m_bDrawFac ) -// DrawFac(pDC,mrt,1,temp,mrt.right()); -// else -// DrawFac(pDC,mrt,2,temp,mrt.right()); -// pDC->drawLine(QPoint(temp,mrt.top()),QPoint(temp,mrt.bottom())); -// } -// } -// // 绘制边框 -// if ( m_selection.count() > 0 ) -// { -// CFracObj *pObj = m_selection[0]; -// if (pObj->m_bSelected !=0 ) -// { -// CalQRectF(pObj,mrt,sdep,flDepthScale); -// pObj->DrawTracker(pDC,selected,1); -// } -// } -//} - diff --git a/logPlus/DrawFac.h b/logPlus/DrawFac.h deleted file mode 100644 index 6070081..0000000 --- a/logPlus/DrawFac.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef DrawFac_H -#define DrawFac_H - -#include -#include "qmycustomplot.h" - -typedef struct -{ - int iCode; //代码 - QString Fac; //相 - QString Phase; //亚相 - QString mFac; //微相 -}FAC_DEF; - -typedef struct -{ - int no; - float sdep; - float edep; - char Fac[32]; - char Phase[32]; - char mFac[32]; - char Dest[32]; -}FAC_TABLE; - -//沉积相 -class CDrawFac:public QObject -{ - Q_OBJECT -public: - CDrawFac(QMyCustomPlot *myCustomPlot, QString strSlfName, QString csCurve); - virtual ~CDrawFac(void); - -public: - QList m_FracDef; - QList m_ObjList; - - QMyCustomPlot *m_myCustomPlot; - -public: - void ReadFracDef(); - void ReadData(QString strSlfName, QString csCurve); - void DrawFac(int iType); - -public slots: - -}; - -#endif diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index 2e0001f..dd67ad1 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -1047,6 +1047,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant m_tdJiegutext->setUpper(-upper); //保存 m_tdJiegutext->mPlot->SaveToSLF_Jiegutext(); + //重新加载数据 + m_tdJiegutext->ReLoadValues(); } } else if("底深(m)" == m_propertyData[pProperty]) @@ -1058,6 +1060,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant m_tdJiegutext->setLower(-lower); //保存 m_tdJiegutext->mPlot->SaveToSLF_Jiegutext(); + //重新加载数据 + m_tdJiegutext->ReLoadValues(); } } else if("显示名称" == m_propertyData[pProperty]) @@ -1176,6 +1180,11 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant } } } + else if (m_strCurrentProperty == Fac_Property)//沉积相 + { + //先处理通用属性 + CommonPropertyChanged(pProperty, variant); + } if("深度比例尺" == m_propertyData[pProperty]) { @@ -2359,6 +2368,11 @@ void PropertyWidget::initProperty(FormInfo *formInfo) //气测/FMT/射孔/文本 this->initJiegutextProperty(formInfo); } + else if (formInfo->m_strType == "LogfaceObject") + { + //沉积相 + this->initFacProperty(formInfo); + } } void PropertyWidget::initRoseProperty(FormInfo *formInfo) @@ -2926,3 +2940,15 @@ void PropertyWidget::initJiegutextItemProperty(TransparentDraggableJiegutext* td _CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double); _CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double); } + +//沉积相 +void PropertyWidget::initFacProperty(FormInfo *formInfo) +{ + _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + + _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); + _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); + _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); + + m_strCurrentProperty = Fac_Property; +} diff --git a/logPlus/PropertyWidget.h b/logPlus/PropertyWidget.h index ee435b2..12f939a 100644 --- a/logPlus/PropertyWidget.h +++ b/logPlus/PropertyWidget.h @@ -62,6 +62,8 @@ #define Jiegutext_Property "Jiegutext_Property" //气测/FMT/射孔/文本 #define JiegutextItem_Property "JiegutextItem_Property" //气测/FMT/射孔/文本item +#define Fac_Property "Fac_Property" //沉积相 + #pragma execution_character_set("utf-8") /** @@ -197,6 +199,8 @@ public: void initJiegutextProperty(FormInfo *formInfo); void initJiegutextItemProperty(TransparentDraggableJiegutext* tdJiegutext, double lower, double upper); + //沉积相 + void initFacProperty(FormInfo *formInfo); void ChangFillProperty();//填充属性改变 void ChangHeadItemProperty();//图头项改变 diff --git a/logPlus/TransparentDraggableJiegutext.cpp b/logPlus/TransparentDraggableJiegutext.cpp index 79175d1..dbd80eb 100644 --- a/logPlus/TransparentDraggableJiegutext.cpp +++ b/logPlus/TransparentDraggableJiegutext.cpp @@ -270,6 +270,8 @@ void TransparentDraggableJiegutext::setItemDepthOffset() //保存 mPlot->SaveToSLF_Jiegutext(); + //重新加载数据 + this->ReLoadValues(); //属性清空 PropertyService()->InitCurrentViewInfo(); @@ -516,6 +518,38 @@ void TransparentDraggableJiegutext::setLower(double lower) setRange(newRange.lower, newRange.upper); } +//重新加载数据 +void TransparentDraggableJiegutext::ReLoadValues() +{ + // + FormInfo* pInfo = mPlot->m_formTrack->getFormInfoByParameters(mPlot->m_strUuid, mPlot->m_strWellName, mPlot->m_strTrackName, mPlot->m_strLineName); + if (pInfo == NULL) + { + return; + } + // + QCPRange tmpRange = getRange(); + QString strAliasName = pInfo->m_strAliasName; + QStringList listAliasName = strAliasName.split("/");//QString字符串分割函数 + if(listAliasName.contains("SDEP") || listAliasName.contains("EDEP")) + { + for(int i=0; isetText(mstrTitle[i]); + } + else if(listAliasName[i]=="EDEP") + { + mstrTitle[i] = QString::number(-tmpRange.lower); + mItemTitle[i]->setText(mstrTitle[i]); + } + } + mPlot->replot(); + } +} + void TransparentDraggableJiegutext::onMouseRelease(QMouseEvent *event) { if(event->button() == Qt::LeftButton && mDragMode != DragNone) { @@ -528,6 +562,8 @@ void TransparentDraggableJiegutext::onMouseRelease(QMouseEvent *event) PropertyService()->initJiegutextItemProperty(this, low, hight); //保存 mPlot->SaveToSLF_Jiegutext(); + //重新加载数据 + this->ReLoadValues(); //取消所有选中单元格 emit CallManage::getInstance()->sig_Raise(mPlot->m_strUuid, "", "", "", "", 0, ""); diff --git a/logPlus/TransparentDraggableJiegutext.h b/logPlus/TransparentDraggableJiegutext.h index 8bdb375..1952a8f 100644 --- a/logPlus/TransparentDraggableJiegutext.h +++ b/logPlus/TransparentDraggableJiegutext.h @@ -40,6 +40,9 @@ public: //设置底深 void setLower(double lower); + //重新加载数据 + void ReLoadValues(); + signals: void rangeChanged(QCPRange newRange); diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index b171ebe..8cf9b19 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -10,7 +10,6 @@ #include #include "Gradient.h" #include "PickFrac.h" -#include "DrawFac.h" #include "ObjTubingstringResult.h" #include "DrawNrad.h" #include "formline.h" @@ -89,7 +88,7 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) : connect(CallManage::getInstance(), SIGNAL(sig_AddJiegutext(QString, QString, QString, QString, QString, int, QStringList)), this, SLOT(s_addJiegutext(QString, QString, QString, QString, QString,int, QStringList))); //沉积相 - connect(CallManage::getInstance(), SIGNAL(sig_AddLogface(QString, QString, QString, QString, QString, int)), this, SLOT(s_addLogface(QString, QString, QString, QString, QString,int))); + connect(CallManage::getInstance(), SIGNAL(sig_AddLogface(QString, QString, QString, QString, QString, int, QStringList)), this, SLOT(s_addLogface(QString, QString, QString, QString, QString,int, QStringList))); //多臂井径 connect(CallManage::getInstance(), SIGNAL(sig_AddMCals(QString, QString, QString, QString, QString, int)), this, SLOT(s_addMCals(QString, QString, QString, QString, QString,int))); @@ -314,6 +313,11 @@ void FormDraw::DisplayLines(QJsonArray linesArray) //气测/FMT/射孔/文本 DisplayJiegutext_One(lineObjInfo); } + else if (strType == "LogfaceObject") + { + //沉积相 + DisplayFac_One(lineObjInfo); + } else { DisplayType_One(lineObjInfo); @@ -623,6 +627,88 @@ void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo) } } +//沉积相 +void FormDraw::DisplayFac_One(QJsonObject lineObjInfo) +{ + QString strSlfName = ""; + QString strWellName = ""; + QString strLineName = ""; + QString strAliasName = "";//显示名称 + QFont curveNameFont("微软雅黑", 10); // 名称字体 + QColor lineColor = QColor(0, 0, 0);//颜色 + + if (lineObjInfo.contains("SlfName")) + { + QJsonValue value = lineObjInfo.value("SlfName"); + if (value.isString()) { + strSlfName = value.toString(); + //qDebug() << "SlfName:" << strSlfName; + + // + QString slffilename = QString(""); + int ind = strSlfName.lastIndexOf('\\'); + int ind2 = strSlfName.lastIndexOf('/'); + if (ind2 > ind) ind = ind2; + if (ind > -1) { + slffilename = strSlfName.mid(ind + 1); + strSlfName = slffilename; + } + } + } + if (lineObjInfo.contains("WellName")) + { + QJsonValue value = lineObjInfo.value("WellName"); + if (value.isString()) { + strWellName = value.toString(); + //qDebug() << "WellName:" << strWellName; + } + } + if (lineObjInfo.contains("LineName")) + { + QJsonValue value = lineObjInfo.value("LineName"); + if (value.isString()) { + strLineName = value.toString(); + //qDebug() << "LineName:" << strLineName; + } + } + if (lineObjInfo.contains("AliasName")) + { + QJsonValue value = lineObjInfo.value("AliasName"); + if (value.isString()) { + strAliasName = value.toString(); + //qDebug() << "strAliasName:" << strAliasName; + } + } + //字体 + if (lineObjInfo.contains("curveNameFont")) + { + QJsonValue value = lineObjInfo.value("curveNameFont"); + if (value.isString()) { + curveNameFont.fromString(value.toString()); + //qDebug() << "strUnit:" << strUnit; + } + } + // + if (lineObjInfo.contains("lineColor")) + { + lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); + } + + QString folderPath = GetLogdataPath(); + folderPath = folderPath + g_prjname; + strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; + + if (strLineName != "") + { + QStringList listOtherProperty; + listOtherProperty.append(strAliasName);//别名 + listOtherProperty.append(lineColor.name());//名称颜色 + listOtherProperty.append(curveNameFont.toString());//名称字体 + //沉积相 + this->s_addLogface(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty); // + } +} + void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) { QString strSlfName = ""; @@ -2233,7 +2319,7 @@ void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString str return; } - if(m_listLineName.contains(strLineName)) + if(m_listTableName.contains(strLineName)) { qDebug() << "FormDraw strLineName already exist! " << strLineName; return; @@ -2269,7 +2355,7 @@ void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString str // connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); // - m_listLineName.push_back(strLineName); + m_listTableName.push_back(strLineName); QString strAliasName = "斜井三图一表"; QString strUnit = ""; @@ -2293,7 +2379,7 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa return; } - if(m_listLineName.contains(strLineName)) + if(m_listTableName.contains(strLineName)) { qDebug() << "FormDraw strLineName already exist! " << strLineName; return; @@ -2360,7 +2446,7 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); // - m_listLineName.push_back(strLineName); + m_listTableName.push_back(strLineName); QString strAliasName = "裂缝描述"; QString strUnit = ""; @@ -2383,7 +2469,7 @@ void FormDraw::s_addJiegutext(QString strUuid, QString strSlfName, QString strWe return; } - if(m_listLineName.contains(strLineName)) + if(m_listTableName.contains(strLineName)) { qDebug() << "FormDraw strLineName already exist! " << strLineName; return; @@ -2476,7 +2562,7 @@ void FormDraw::s_addJiegutext(QString strUuid, QString strSlfName, QString strWe connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); // - m_listLineName.push_back(strLineName); + m_listTableName.push_back(strLineName); QString strUnit = ""; double width=2; @@ -2495,7 +2581,7 @@ void FormDraw::s_addJiegutext(QString strUuid, QString strSlfName, QString strWe } //沉积相 -void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW) +void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW, QStringList listOtherProperty) { //井名&道名不一致 if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName) @@ -2506,7 +2592,7 @@ void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWell return; } - if(m_listLineName.contains(strLineName)) + if(m_listTableName.contains(strLineName)) { qDebug() << "FormDraw strLineName already exist! " << strLineName; return; @@ -2564,22 +2650,28 @@ void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWell curv->yAxis = xAxis; //沉积相 - QString strWaveName = "LITHA"; - CDrawFac *drawFac = new CDrawFac(curv, strSlfName, strWaveName); + //QString strWaveName = "LITHA"; + curv->LoadFromSLF_Fac(strSlfName, strLineName); // connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); // - m_listLineName.push_back(strLineName); + m_listTableName.push_back(strLineName); QString strAliasName = "沉积相"; - QString strUnit = ""; QColor newlineColor=QColor(0,0,0); + if(listOtherProperty.size()>=3) + { + strAliasName = listOtherProperty[0]; + newlineColor.setNamedColor(listOtherProperty[1]); + } + + QString strUnit = ""; double width=2; QString strScaleType = ""; //道-对象 - m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "LogfaceObject"); + m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "LogfaceObject", listOtherProperty); } //多臂井径 @@ -2682,7 +2774,7 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st return; } - if(m_listLineName.contains(strLineName)) + if(m_listTableName.contains(strLineName)) { qDebug() << "FormDraw strLineName already exist! " << strLineName; return; @@ -2754,7 +2846,7 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); // - m_listLineName.push_back(strLineName); + m_listTableName.push_back(strLineName); QString strAliasName = "套管组件"; QString strUnit = ""; diff --git a/logPlus/formdraw.h b/logPlus/formdraw.h index c27cb7d..69c0a82 100644 --- a/logPlus/formdraw.h +++ b/logPlus/formdraw.h @@ -66,6 +66,9 @@ public: //气测/FMT/射孔/文本 void DisplayJiegutext_One(QJsonObject lineObjInfo); + //沉积相 + void DisplayFac_One(QJsonObject lineObjInfo); + // 跨道设置 void crossTrackSetting(); @@ -254,7 +257,7 @@ public slots: void s_addJiegutext(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW, QStringList listOtherProperty); //沉积相 - void s_addLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); + void s_addLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW, QStringList listOtherProperty); //多臂井径 void s_addMCals(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); diff --git a/logPlus/forminfo.cpp b/logPlus/forminfo.cpp index 1c410dc..69a91a5 100644 --- a/logPlus/forminfo.cpp +++ b/logPlus/forminfo.cpp @@ -164,7 +164,13 @@ QJsonObject FormInfo::makeJson() else if (m_strType == "JiegutextObject") { //气测/FMT/射孔/文本 - //rootObj["OilZhan"] = m_dOilZhan;//含油占比 + + //item属性写入slf文件,不需要此次记录 + return rootObj; + } + else if (m_strType == "LogfaceObject") + { + //沉积相 //item属性写入slf文件,不需要此次记录 return rootObj; @@ -1009,6 +1015,14 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event) menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); menu.exec(event->globalPos()); } + else if(m_strType=="LogfaceObject") + { + //沉积相 + QMenu menu(this); + menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable); + menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); + menu.exec(event->globalPos()); + } } //曲线数据查看 diff --git a/logPlus/formtrack.cpp b/logPlus/formtrack.cpp index 27e6a5a..a34367f 100644 --- a/logPlus/formtrack.cpp +++ b/logPlus/formtrack.cpp @@ -99,8 +99,8 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName) this, SLOT(s_addJiegutext(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList))); //沉积相 - connect(this, SIGNAL(sig_AddLogface(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)), - this, SLOT(s_addLogface(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString))); + connect(this, SIGNAL(sig_AddLogface(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)), + this, SLOT(s_addLogface(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList))); //多臂井径 connect(this, SIGNAL(sig_AddMCals(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)), @@ -259,7 +259,7 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam } else if(strType=="LogfaceObject") { - emit sig_AddLogface(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType); + emit sig_AddLogface(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty); } else if(strType=="MCalsObject") { @@ -973,7 +973,7 @@ void FormTrack::s_addJiegutext(QString strSlfName, QString strWellName, QString } //沉积相 -void FormTrack::s_addLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) +void FormTrack::s_addLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty) { qDebug() << "FormTrack s_addLogface"; @@ -998,6 +998,13 @@ void FormTrack::s_addLogface(QString strSlfName, QString strWellName, QString st formInfo->setVMin(vmin); formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); + // + if(listOtherProperty.size()>=3) + { + QFont curveNameFont("微软雅黑", 10); // 名称字体 + curveNameFont.fromString(listOtherProperty[2]); + formInfo->m_curveNameFont = curveNameFont; + } //设置高度 ui->tableWidget->setRowHeight(row, 100); //单元格委托 diff --git a/logPlus/formtrack.h b/logPlus/formtrack.h index d8be071..8093278 100644 --- a/logPlus/formtrack.h +++ b/logPlus/formtrack.h @@ -92,7 +92,7 @@ signals: void sig_AddSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void sig_AddCrack(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void sig_AddJiegutext(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); - void sig_AddLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); + void sig_AddLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); void sig_AddMCals(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void sig_AddTubingstring(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); @@ -114,7 +114,7 @@ public slots: void s_addSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void s_addCrack(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void s_addJiegutext(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); - void s_addLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); + void s_addLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); void s_addMCals(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void s_addTubingstring(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void s_addTDT(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); diff --git a/logPlus/fracsel.cpp b/logPlus/fracsel.cpp new file mode 100644 index 0000000..b55788d --- /dev/null +++ b/logPlus/fracsel.cpp @@ -0,0 +1,82 @@ +#include "fracsel.h" +#include "ui_fracsel.h" +#include +#include + +double g_SDepthFac = 0; +double g_EDepthFac = 0; +QString g_SelectMFac = ""; + +FracSel::FracSel(QWidget *parent) : + QDialog(parent), + ui(new Ui::FracSel) +{ + ui->setupUi(this); + //加载样式 + //setStyleSheet("QDialog { background-color: #FFFFFF; } QComboBox,QLineEdit {border-width:1px; border-radius:0px;}"); + loadStyle(":/qrc/qss/flatgray.css"); + + // + connect(ui->ok, SIGNAL(clicked()), this, SLOT(slotOkClicked())); + connect(ui->cancel, SIGNAL(clicked()), this, SLOT(slotCancelClicked())); +} + +FracSel::~FracSel() +{ + delete ui; +} + +void FracSel::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + QFile file(qssFile); + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + this->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + this->setStyleSheet(qss); + } +} + + +void FracSel::setInfo(double right_Hight, QList FracDef) +{ + ui->doubleSpinBox_1->setValue(-right_Hight); + ui->doubleSpinBox_2->setValue(-right_Hight+1); + for(int i=0; icomboBox->addItem(FracDef[i].mFac); + } +} + +// +void FracSel::slotOkClicked() +{ + g_SDepthFac = ui->doubleSpinBox_1->value(); + g_EDepthFac = ui->doubleSpinBox_2->value(); + g_SelectMFac = ui->comboBox->currentText(); + + //关闭 + accept(); // 让 QDialog::exec() 返回 QDialog::Accepted + //QDialog::close(); +} + +// +void FracSel::slotCancelClicked() +{ + reject(); // 让 QDialog::exec() 返回 QDialog::Rejected + //QDialog::close(); +} diff --git a/logPlus/fracsel.h b/logPlus/fracsel.h new file mode 100644 index 0000000..d98148d --- /dev/null +++ b/logPlus/fracsel.h @@ -0,0 +1,33 @@ +#ifndef FRACSEL_H +#define FRACSEL_H + +#include +#include "qmycustomplot.h" + +namespace Ui { +class FracSel; +} + +class FracSel : public QDialog +{ + Q_OBJECT + +public: + explicit FracSel(QWidget *parent = nullptr); + ~FracSel(); + +private: + Ui::FracSel *ui; + +public: + void loadStyle(const QString &qssFile); + void setInfo(double right_Hight, QList FracDef); + + +public slots: + void slotOkClicked(); + void slotCancelClicked(); + +}; + +#endif // FRACSEL_H diff --git a/logPlus/fracsel.ui b/logPlus/fracsel.ui new file mode 100644 index 0000000..8b5efdb --- /dev/null +++ b/logPlus/fracsel.ui @@ -0,0 +1,136 @@ + + + FracSel + + + + 0 + 0 + 400 + 300 + + + + 添加微相 + + + + + + + + + + 输入微相开始深度(m) + + + + + + + 9999.000000000000000 + + + + + + + + + + + 输入微相结束深度(m) + + + + + + + 9999.000000000000000 + + + + + + + + + + + 选择微相 + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 确定 + + + + + + + 放弃 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + diff --git a/logPlus/logPlus.pro b/logPlus/logPlus.pro index c4e4b00..25b17a3 100644 --- a/logPlus/logPlus.pro +++ b/logPlus/logPlus.pro @@ -33,7 +33,6 @@ SOURCES += \ ConsoleOutputWidget.cpp \ CurveLine.cpp \ DepPairs.cpp \ - DrawFac.cpp \ DrawNrad.cpp \ DrawTvd.cpp \ GeoIndicatorGenerator.cpp \ @@ -71,6 +70,7 @@ SOURCES += \ formtrack.cpp \ formtracktop.cpp \ formwell.cpp \ + fracsel.cpp \ mainwindow.cpp \ main.cpp \ mainwindowcurve.cpp \ @@ -97,7 +97,6 @@ HEADERS += \ CurveLine.h \ DepPairs.h \ DraggablePixmap.h \ - DrawFac.h \ DrawNrad.h \ DrawTvd.h \ GeoIndicatorGenerator.h \ @@ -135,6 +134,7 @@ HEADERS += \ formtrack.h \ formtracktop.h \ formwell.h \ + fracsel.h \ mainwindow.h \ mainwindowcurve.h \ newheaddialog.h \ @@ -162,6 +162,7 @@ FORMS += \ formtrack.ui \ formtracktop.ui \ formwell.ui \ + fracsel.ui \ interfaceWidget.ui \ mainwindow.ui \ mainwindowcurve.ui \ diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index d9a3d6b..e1175a4 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -3240,7 +3240,18 @@ void MainWindowCurve::s_NewJiegutext() //沉积相 void MainWindowCurve::s_NewLogface() { - QStringList sret = this->getSelectWell(); +// QStringList sret = this->getSelectWell(); +// if(sret.length() <= 0) +// return; + + //选中道 + if(m_SelectTableItem.m_iTableType==2) { + //新建表格曲线 + emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "IMAGE_DATA"); + return; + } + + QStringList sret = this->getSelectWell_New(); if(sret.length() <= 0) return; diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 9b6ffca..aca9607 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -22,10 +22,15 @@ #include "MemRdWt.h" #include "PropertyWidget.h" #include "YxzpDialog.h" +#include "fracsel.h" //是否隐藏刻度 extern int g_iShow; extern double g_dPixelPerCm;//每厘米像素数 +//沉积相 +extern double g_SDepthFac; +extern double g_EDepthFac; +extern QString g_SelectMFac; QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName) : QCustomPlot(parent) @@ -1284,6 +1289,14 @@ void QMyCustomPlot::contextMenuEvent(QContextMenuEvent *event) menu.addAction(QIcon(::GetImagePath() + "icon/CopyCoreTxt.png"), "刷新数据", this, &QMyCustomPlot::RefreshItems_Jiegutext); menu.exec(event->globalPos()); } + else if (strType == "LogfaceObject") + { + QMenu menu(this); + //沉积相 + menu.addAction(QIcon(::GetImagePath() + "icon/add_frac.png"), "添加沉积相", this, &QMyCustomPlot::addItem_Fac); + //menu.addAction(QIcon(::GetImagePath() + "icon/Layer.png"), "沉积相自动描述", this, &QMyCustomPlot::ChangeDep); + menu.exec(event->globalPos()); + } } //右键--添加分段线 @@ -5973,6 +5986,8 @@ void QMyCustomPlot::s_changeJiegutextTitle(QString strUuid, QString strSlfName, //重新加载 //QString strAliasName = "气测-FMT-射孔-文本"; LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName); + //属性清空(LoadFromSLF_Jiegutext内部调用) + //PropertyService()->InitCurrentViewInfo(); } //改变录井剖面属性 @@ -6476,6 +6491,9 @@ bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, Q pInfo->m_FieldNameList.append(this->m_FieldNameList); pInfo->update(); + //属性清空 + PropertyService()->InitCurrentViewInfo(); + return true; } @@ -6860,8 +6878,8 @@ void QMyCustomPlot::RefreshItems_Jiegutext() QString strAliasName = pInfo->m_strAliasName; //加载 this->LoadFromSLF_Jiegutext(m_strSlfName, m_strLineName, strAliasName); - //属性清空 - PropertyService()->InitCurrentViewInfo(); + //属性清空(LoadFromSLF_Jiegutext内部调用) + //PropertyService()->InitCurrentViewInfo(); } void QMyCustomPlot::onOpenEditResult() @@ -7442,3 +7460,196 @@ bool QMyCustomPlot::getIsEditor() return true; } +//沉积相 +void QMyCustomPlot::ReadFracDef() +{ + m_FracDef.clear(); + + QString fracFilePath = GetConfPath() + "GEoFac.ini"; + + // + FAC_DEF fd; + char str[512],fac[512],phase[64],mFac[64]; + int r,g,b,id; + FILE *fp; + QString qs; + fp = fopen(fracFilePath.toStdString().c_str(), "r"); + if ( fp != nullptr ) + { + fgets(str,256,fp); // 跳过第一行 + while (!feof(fp)) + { + fgets(str,256,fp); + qs = str; + qs.trimmed(); + if (qs.length() < 8) break ; + //代码 微相 亚相 相 + sscanf(str,"%d %s %s %s",&fd.iCode,mFac,phase,fac); + fd.mFac = mFac; + fd.Fac = fac; + fd.Phase = phase; + m_FracDef.append(fd); + if ( feof(fp)) + break; + } + fclose(fp); + } + else + { + sprintf(fac,"打开沉积相参数配置文件错误:%s!",str); + QMessageBox::information(nullptr, "读取文件失败", fac); + } +} + +void QMyCustomPlot::ReadData_Fac(QString strSlfName, QString csCurve) +{ + if(strSlfName.isEmpty()) return; + //清空 + m_ObjList_Fac.clear(); + + QString cs; + int nLineWidth=2; + int nField; + QColor crColor(255,0,0); + FAC_TABLE frac; + CMemRdWt mrw; + char strFracTable[256]; + int i,j,iIndex,nCount,iType=1; + + if (mrw.Open(strSlfName.toStdString().c_str()) ) // 打开井文件 + { + iIndex=mrw.OpenTable(csCurve.toStdString().c_str()); + if(iIndex>=0) + { + nField=mrw.GetTableFieldCount(iIndex); + nCount=mrw.GetTableRecordCount(iIndex); + cs =""; + if ( nField != 7 ) + nCount = 0; + for(i=0;iaddMFacToPlot(-frac.edep, -frac.sdep, QString::fromLocal8Bit(frac.mFac)); + } + mrw.CloseTable(iIndex); + } + mrw.Close(); //关闭井文件 + } +} + +void QMyCustomPlot::DrawFac(int iType) +{ + int j; + float dep1,dep2; + float top,bottom; + QString str1,str2; + QColor crColor(0,0,0); + QPen qPen(crColor, 1, Qt::SolidLine); + if ( m_ObjList_Fac.count()<2 ) + return ; + + //绘制相、亚相 + FAC_TABLE pObj; + pObj =m_ObjList_Fac[0]; + if (iType==1) + str1 = QString::fromLocal8Bit(pObj.Fac); + else + str1 = QString::fromLocal8Bit(pObj.Phase); + str1.trimmed(); + top = pObj.sdep; + + for (j=1;jaddFacToPlot(-bottom, -top, str1); + } + else + { + //亚相 + this->addPhaseToPlot(-bottom, -top, str1); + } + + top = pObj.sdep; + str1=str2; + } + } +} + +bool QMyCustomPlot::LoadFromSLF_Fac(QString strSlfName, QString csCurve) +{ + //隐藏刻度 + this->xAxis->setTicks(false); + this->yAxis->setTicks(false); + this->xAxis2->setTicks(false); + this->yAxis2->setTicks(false); + + //画2条竖线 + int iMyWidth = this->axisRect(0)->width(); + QCPItemStraightLine *qcpItemLine = new QCPItemStraightLine(this); + qcpItemLine->point1->setCoords(-1, iMyWidth/2);//位置 + qcpItemLine->point2->setCoords(-2, iMyWidth/2);//位置 + //qcpItemLine->setPen(pPenStraightLine); + + QCPItemStraightLine *qcpItemLine2 = new QCPItemStraightLine(this); + qcpItemLine2->point1->setCoords(-1, 3*iMyWidth/4);//位置 + qcpItemLine2->point2->setCoords(-2, 3*iMyWidth/4);//位置 + + ReadFracDef(); + + ReadData_Fac(strSlfName, csCurve); + DrawFac(1);//相 + DrawFac(2);//亚相 + + return true; +} + +//添加沉积相 +void QMyCustomPlot::addItem_Fac() +{ + double right_Hight = xAxis->pixelToCoord(m_event->pos().y());//x轴展示深度 + + // 创建对话框 + FracSel *dlg = new FracSel(this); + dlg->setInfo(right_Hight, m_FracDef); + // + dlg->setAttribute(Qt::WA_DeleteOnClose);//关闭时,自动删除窗口对象 + int result = dlg->exec();//模态对话框 + if (result == QDialog::Accepted) { + // 处理用户点击了确定按钮的逻辑 + qDebug() << "Accepted="; + + //微相 + this->addMFacToPlot(-g_EDepthFac, -g_SDepthFac, g_SelectMFac); + this->replot(); + } + else if (result == QDialog::Rejected) { + // 处理用户点击了取消按钮的逻辑 + qDebug() << "Rejected="; + } + else { + // 处理其他情况的逻辑 + qDebug() << "other="; + } +} diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index 9414a12..ba6eedc 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -28,6 +28,25 @@ struct Slf_JIEGUPOS { char Dest[64]; }; +typedef struct +{ + int iCode; //代码 + QString Fac; //相 + QString Phase; //亚相 + QString mFac; //微相 +}FAC_DEF; + +typedef struct +{ + int no; + float sdep; + float edep; + char Fac[32]; + char Phase[32]; + char mFac[32]; + char Dest[32]; +}FAC_TABLE; + class TransparentGroupResult; class QMyCustomPlot : public QCustomPlot { @@ -236,6 +255,14 @@ public: bool LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, QString strAliasName); bool SaveToSLF_Jiegutext(); + //沉积相 + QList m_FracDef; + QList m_ObjList_Fac; + void ReadFracDef(); + void ReadData_Fac(QString strSlfName, QString csCurve); + void DrawFac(int iType); + bool LoadFromSLF_Fac(QString strSlfName, QString csCurve); + public slots: void slot_time(); @@ -400,6 +427,9 @@ public slots: void DeleteItems_Jiegutext(); //全部清空 void RefreshItems_Jiegutext(); //刷新数据 + //右键--沉积相 + void addItem_Fac(); //添加沉积相 + //右键--解释结论 void onOpenEditResult(); void onCloseEditResult(); @@ -444,6 +474,7 @@ public slots: //改变固井曲线名 void s_changeGujingLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strNewLineName); + //改变曲线名 //气测/FMT/射孔/文本 void s_changeJiegutextLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strNewLineName); void s_changeJiegutextTitle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName); diff --git a/logPlus/qrc/qss/flatgray.css b/logPlus/qrc/qss/flatgray.css index 8224a2e..8a0aa35 100644 --- a/logPlus/qrc/qss/flatgray.css +++ b/logPlus/qrc/qss/flatgray.css @@ -661,12 +661,12 @@ margin:0px; } QTableView QLineEdit,QTableView QComboBox,QTableView QSpinBox,QTableView QDoubleSpinBox,QTableView QDateEdit,QTableView QTimeEdit,QTableView QDateTimeEdit{ -border-width:0px; +border-width:1px; border-radius:0px; } QTableView QLineEdit:focus,QTableView QComboBox:focus,QTableView QSpinBox:focus,QTableView QDoubleSpinBox:focus,QTableView QDateEdit:focus,QTableView QTimeEdit:focus,QTableView QDateTimeEdit:focus{ -border-width:0px; +border-width:1px; border-radius:0px; }