1.录井剖面,新增含油性居中属性。2.文字旋转,垂直显示。 3.记录属性到json模板

This commit is contained in:
jiayulong 2026-03-11 14:23:23 +08:00
parent b030ca5387
commit f1e6f3e19f
9 changed files with 383 additions and 76 deletions

View File

@ -114,6 +114,16 @@ void PropertyWidget::CommonPropertyChanged( QtProperty *pProperty, const QVarian
m_formInfo->m_lineColor = newColor;
m_formInfo->update();
}
else if ("垂向绘制" == m_propertyData[pProperty])
{
m_formInfo->m_bVerticaDrawing = variant.toBool();
m_formInfo->update();
}
else if ("旋转角度(°)" == m_propertyData[pProperty])
{
m_formInfo->m_nRotationAngle = variant.toInt();
m_formInfo->update();
}
}
void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant &variant )
@ -309,6 +319,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
{
m_formInfo->m_bShowOil = bShow;
}
else if(m_propertyData[pProperty] == "含油性居中")
{
m_formInfo->m_bCenterOil = bShow;
}
else if(m_propertyData[pProperty] == "显示颜色")
{
m_formInfo->m_bShowColor = bShow;
@ -726,6 +740,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
{
m_formInfo->m_bShowOil = bShow;
}
else if(m_propertyData[pProperty] == "含油性居中")
{
m_formInfo->m_bCenterOil = bShow;
}
else if(m_propertyData[pProperty] == "显示颜色")
{
m_formInfo->m_bShowColor = bShow;
@ -2060,6 +2078,8 @@ void PropertyWidget::initSwallCoreProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2086,6 +2106,8 @@ void PropertyWidget::initSwallCoreItemProperty(TransparentDraggableSwallCore* td
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
@ -2108,6 +2130,8 @@ void PropertyWidget::initTextProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2135,6 +2159,8 @@ void PropertyWidget::initTextItemProperty(TransparentDraggableRect* tdText, doub
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
@ -2162,6 +2188,8 @@ void PropertyWidget::initLayerProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2188,6 +2216,8 @@ void PropertyWidget::initLayerItemProperty(TransparentDraggableLayer* tdLayer, d
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
@ -2216,6 +2246,8 @@ void PropertyWidget::initGujingProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2242,6 +2274,8 @@ void PropertyWidget::initGujingItemProperty(TransparentDraggableGujing* tdGujing
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
}
@ -2261,6 +2295,8 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2268,6 +2304,7 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8);
@ -2296,12 +2333,15 @@ void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoL
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
//显示
_CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8);

View File

@ -116,21 +116,37 @@ void TransparentDraggableGeoLith::drawLith(double left_Low, double right_Hight,
{
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{
y1 = mPlot->yAxis->coordToPixel(lY1+2*(lY2-lY1)/mPlot->m_dOilZhan);
if(mPlot->m_bCenterOil)//含油性居中
{
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
}
else
{
y1 = mPlot->yAxis->coordToPixel(lY1+2*(lY2-lY1)/mPlot->m_dOilZhan);
}
}
else
{
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
if(mPlot->m_bCenterOil)//含油性居中
{
y1 = mPlot->yAxis->coordToPixel(lY1);
}
else
{
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
}
}
}
else
{
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{
//不绘制含油性
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
}
else
{
//不绘制含油性,左侧颜色
y1 = mPlot->yAxis->coordToPixel(lY1);
}
}
@ -225,7 +241,60 @@ void TransparentDraggableGeoLith::drawLith(double left_Low, double right_Hight,
}
mPixmap_Lith->topLeft->setCoords(mPlot->xAxis->pixelToCoord(x2+1), mPlot->yAxis->pixelToCoord(y1+1));//right_Hight
mPixmap_Lith->bottomRight->setCoords(mPlot->xAxis->pixelToCoord(x1-1), mPlot->yAxis->pixelToCoord(y2-1));//left_Low
}
void TransparentDraggableGeoLith::drawColorLeft(double left_Low, double right_Hight, double lY1, double lY2)
{
//不显示
if(m_Color=="" || !mPlot->m_bShowColor)
{
mPixmap_Color->topLeft->setCoords(0, 0);//right_Hight
mPixmap_Color->bottomRight->setCoords(0, 0);//left_Low
return;
}
QString path,filename;
GetWellNameAndPath(m_Color, filename, path);
QString basename = filename;
double x1 = mPlot->xAxis->coordToPixel(left_Low);
double x2 = mPlot->xAxis->coordToPixel(right_Hight);
double y1 = mPlot->yAxis->coordToPixel(lY1);
double y2 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
double newWidth = y2-y1;
double newHeight = x1-x2;
QString val="";
QImage image(newWidth, newHeight, QImage::Format_RGB32);
QPainter painter(&image);
QRectF fillRect(0,0,newWidth, newHeight);
painter.fillRect(fillRect,Qt::white);
//
if(mPlot->m_bShowColor)
{
//颜色
QString strLastColor = m_Color.right(4);
if(strLastColor.toLower()==".svg")
{
//拉伸
DrawSVGSteched(&painter,m_Color,fillRect,0);
}
}
//
val=GetImagePath()+"TempNew";
QDir ss;
if(!ss.exists(val)) {
ss.mkdir(val);
}
val+=QDir::separator();
val+=basename+".png";
image.save(val);
//
mPixmap_Color->setPixmap(QPixmap(val)); // 设置图片
mPixmap_Color->topLeft->setCoords(right_Hight, lY1);//right_Hight
mPixmap_Color->bottomRight->setCoords(left_Low, lY1+(lY2-lY1)/mPlot->m_dOilZhan);//left_Low
}
//设置m_Oil
@ -238,6 +307,8 @@ void TransparentDraggableGeoLith::drawOil(double left_Low, double right_Hight, d
{
if(m_Oil=="" || !mPlot->m_bShowOil)
{
mPixmap_Oil->topLeft->setCoords(0, 0); //right_Hight, lY1
mPixmap_Oil->bottomRight->setCoords(0, 0); //left_Low
return;
}
@ -311,56 +382,20 @@ void TransparentDraggableGeoLith::drawOil(double left_Low, double right_Hight, d
mPixmap_Oil->setPixmap(QPixmap(filePath)); // 设置图片
}
mPixmap_Oil->topLeft->setCoords(xNewRight, mPlot->yAxis->pixelToCoord(y1+1)); //right_Hight, lY1
mPixmap_Oil->bottomRight->setCoords(xNewLeft, mPlot->yAxis->pixelToCoord(y2-1)); //left_Low
if(mPlot->m_bCenterOil)//含油性居中
{
mPixmap_Oil->topLeft->setCoords(xNewRight, lY1+ (lY2-lY1 -(lY2-lY1)/mPlot->m_dOilZhan) / 2.0); //right_Hight, lY1
mPixmap_Oil->bottomRight->setCoords(xNewLeft, lY2- (lY2-lY1 -(lY2-lY1)/mPlot->m_dOilZhan) / 2.0); //left_Low
}
else
{
mPixmap_Oil->topLeft->setCoords(xNewRight, mPlot->yAxis->pixelToCoord(y1+1)); //right_Hight, lY1
mPixmap_Oil->bottomRight->setCoords(xNewLeft, mPlot->yAxis->pixelToCoord(y2-1)); //left_Low
}
//mPlot->replot();
}
////设置Color
//void TransparentDraggableGeoLith::setColor(QString filePath)
//{
// m_Color = filePath;
// //
// QString strLast = filePath.right(4);
// if(strLast.toLower()==".svg")
// {
// QString path,filename;
// GetWellNameAndPath(filePath, filename, path);
// QString basename = filename;
// QString val=filePath;
// QImage image(320,160,QImage::Format_RGB32);
// QPainter painter(&image);
// QRectF fillRect(0,0,320,160);
// painter.fillRect(fillRect,Qt::white);
// //拉伸
// DrawSVGSteched(&painter,filePath,fillRect,0);
// //平铺
// //DrawSVGTiled(&painter,filePath,fillRect,0);
// //正常
// //DrawSVGNormal(&painter,filePath,fillRect,0);
// val=GetImagePath()+"TempNew";
// QDir ss;
// if(!ss.exists(val)) {
// ss.mkdir(val);
// }
// val+=QDir::separator();
// val+=basename+".png";
// image.save(val);
// //
// mPixmap_Color->setPixmap(QPixmap(val)); // 设置图片
// }
// else
// {
// mPixmap_Color->setPixmap(QPixmap(filePath)); // 设置图片
// }
// //mPlot->replot();
//}
// 设置矩形范围
void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight, bool bRefresh)
{
@ -378,17 +413,20 @@ void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight,
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{
// 设置父锚点,定位点
mItemTitle->setText(mstrTitle);
if(mPlot->m_bShowColorNum)
{
mItemTitle->setText(mstrTitle);
}
else{
mItemTitle->setText("");
}
float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15;
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
lY1+(lY2-lY1)/mPlot->m_dOilZhan/2);
mPixmap_Color->topLeft->setCoords(right_Hight, lY1+2*(lY2-lY1)/mPlot->m_dOilZhan);
}
else
{
mItemTitle->setText("");
mPixmap_Color->topLeft->setCoords(right_Hight, lY1+(lY2-lY1)/mPlot->m_dOilZhan);
}
}
else
@ -396,26 +434,31 @@ void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight,
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{
// 设置父锚点,定位点
mItemTitle->setText(mstrTitle);
if(mPlot->m_bShowColorNum)
{
mItemTitle->setText(mstrTitle);
}
else{
mItemTitle->setText("");
}
float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15;
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
lY1+(lY2-lY1)/mPlot->m_dOilZhan/2);
mPixmap_Color->topLeft->setCoords(right_Hight, lY1+(lY2-lY1)/mPlot->m_dOilZhan);
}
else
{
mItemTitle->setText("");
mPixmap_Color->topLeft->setCoords(right_Hight, lY1);
}
}
mPixmap_Color->bottomRight->setCoords(left_Low, lY2);
//
drawLith(left_Low, right_Hight, lY1, lY2);
//位置与rect不一样否则图像反转
drawOil(left_Low, right_Hight, lY1, lY2);
//左侧颜色
drawColorLeft(left_Low, right_Hight, lY1, lY2);
updateHandles();
if(bRefresh)

View File

@ -30,11 +30,12 @@ public:
//设置标题
void setTitle(QString strTitle);
//设置解释结论
//设置岩性
void setLith(QString filePath, QString colorPath);
void drawLith(double left_Low, double right_Hight, double lY1, double lY2);
// void setColor(QString filePath);
// void setColor(QString filePath);
void drawColorLeft(double left_Low, double right_Hight, double lY1, double lY2);
//设置m_Oil
void setOil(QString filePath);

View File

@ -380,6 +380,56 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
lineColor.setNamedColor(lineObjInfo.value("lineColor").toString());
}
bool bLithColor = true; // 岩性配色显示
bool bLithOne = true; // 单岩性显示
bool bShowOil = true; // 显示含油性
bool bCenterOil = false; // 含油性居中
bool bShowColor = false; // 显示颜色
bool bShowColorNum = false; // 绘制颜色号
//
if (lineObjInfo.contains("LithColor"))
{
QJsonValue value = lineObjInfo.value("LithColor");
if (value.isBool()) {
bLithColor = value.toBool();
}
}
if (lineObjInfo.contains("LithOne"))
{
QJsonValue value = lineObjInfo.value("LithOne");
if (value.isBool()) {
bLithOne = value.toBool();
}
}
if (lineObjInfo.contains("ShowOil"))
{
QJsonValue value = lineObjInfo.value("ShowOil");
if (value.isBool()) {
bShowOil = value.toBool();
}
}
if (lineObjInfo.contains("CenterOil"))
{
QJsonValue value = lineObjInfo.value("CenterOil");
if (value.isBool()) {
bCenterOil = value.toBool();
}
}
if (lineObjInfo.contains("ShowColor"))
{
QJsonValue value = lineObjInfo.value("ShowColor");
if (value.isBool()) {
bShowColor = value.toBool();
}
}
if (lineObjInfo.contains("ShowColorNum"))
{
QJsonValue value = lineObjInfo.value("ShowColorNum");
if (value.isBool()) {
bShowColorNum = value.toBool();
}
}
QString folderPath = GetLogdataPath();
folderPath = folderPath + g_prjname;
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
@ -395,7 +445,53 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
{
listOtherProperty.append(QString::number(lineObjInfo.value("OilZhan").toInt()));
}
if(bLithColor)
{
listOtherProperty.append("LithColor");
}
else{
listOtherProperty.append("0");
}
//
if(bLithOne)
{
listOtherProperty.append("LithOne");
}
else{
listOtherProperty.append("0");
}
//
if(bShowOil)
{
listOtherProperty.append("ShowOil");
}
else{
listOtherProperty.append("0");
}
//
if(bCenterOil)
{
listOtherProperty.append("CenterOil");
}
else{
listOtherProperty.append("0");
}
//
if(bShowColor)
{
listOtherProperty.append("ShowColor");
}
else{
listOtherProperty.append("0");
}
//
if(bShowColorNum)
{
listOtherProperty.append("ShowColorNum");
}
else{
listOtherProperty.append("0");
}
//结论
this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty);
}
@ -3973,9 +4069,64 @@ void FormDraw::initGeoLith(QMyCustomPlot *widget, QString strSlfName, QString st
widget->yAxis2->setTicks(false);
//含油占比
if(listOtherProperty.size()>=4)
if(listOtherProperty.size()>=10)
{
widget->m_dOilZhan = listOtherProperty[3].toDouble();
//
if(listOtherProperty[4]=="LithColor")
{
widget->m_bLithColor = true;
}
else
{
widget->m_bLithColor = false;
}
//
if(listOtherProperty[5]=="LithOne")
{
widget->m_bLithOne = true;
}
else
{
widget->m_bLithOne = false;
}
//
if(listOtherProperty[6]=="ShowOil")
{
widget->m_bShowOil = true;
}
else
{
widget->m_bShowOil = false;
}
//
if(listOtherProperty[7]=="CenterOil")
{
widget->m_bCenterOil = true;
}
else
{
widget->m_bCenterOil = false;
}
//
if(listOtherProperty[8]=="ShowColor")
{
widget->m_bShowColor = true;
}
else
{
widget->m_bShowColor = false;
}
//
if(listOtherProperty[9]=="ShowColorNum")
{
widget->m_bShowColorNum = true;
}
else
{
widget->m_bShowColorNum = false;
}
}
//加载
widget->LoadFromSLF_GeoLith(strSlfName, strLineName);

View File

@ -157,7 +157,13 @@ QJsonObject FormInfo::makeJson()
rootObj["curveNameFont"] = m_curveNameFont.toString();
rootObj["lineColor"] = m_lineColor.name();
rootObj["OilZhan"] = m_dOilZhan;//含油占比
rootObj["OilZhan"] = m_dOilZhan;//含油占比
rootObj["LithColor"] = m_bLithColor;
rootObj["LithOne"] = m_bLithOne;
rootObj["ShowOil"] = m_bShowOil;
rootObj["CenterOil"] = m_bCenterOil;
rootObj["ShowColor"] = m_bShowColor;
rootObj["ShowColorNum"] = m_bShowColorNum;
//item属性写入slf文件不需要此次记录
return rootObj;
}
@ -286,6 +292,7 @@ void FormInfo::paintEvent(QPaintEvent* event)
//painter.drawRoundRect(rectRound);//利用画刷(颜色/岩性图片),画框
painter.drawRect(rectRound);
QString strShowTxt = "";
painter.setBrush(Qt::NoBrush); // 确保文字不被填充色遮挡
painter.setFont(m_curveNameFont);
painter.setPen(m_lineColor); // fontColor QColor(220, 220, 220)
@ -365,7 +372,8 @@ void FormInfo::paintEvent(QPaintEvent* event)
strAliasNameTmp = strAliasNameTmp + "-从校";
}
}
painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, strAliasNameTmp);
strShowTxt = strAliasNameTmp;
//painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, strAliasNameTmp);
}
if(m_strType=="waveObject")
@ -426,12 +434,7 @@ void FormInfo::paintEvent(QPaintEvent* event)
}
}
painter.setFont(m_curveUnitFont);
painter.setPen(m_lineColor);
//painter.drawText(rect.left() + 20, 55, m_strUnit);
//painter.drawText(rect.left() + 20, 80, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
QString strShowTxt = "";
if(m_strLineName=="RESULT")
{
//解释结论,不绘制左右范围
@ -447,12 +450,6 @@ void FormInfo::paintEvent(QPaintEvent* event)
//蝌蚪图,不绘制左右范围
strShowTxt = "蝌蚪图";
}
else if(m_strLineName=="井眼垮塌矢量图"
|| m_strLineName=="井斜方位图")
{
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit);
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
}
if (strShowTxt.length()>0)
{
@ -501,6 +498,12 @@ void FormInfo::paintEvent(QPaintEvent* event)
}
}
//单位------------------------------
painter.setFont(m_curveUnitFont);
painter.setPen(m_lineColor);
//painter.drawText(rect.left() + 20, 55, m_strUnit);
//painter.drawText(rect.left() + 20, 80, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
//
if(m_strType=="tableObject" && (m_strLineName=="WORDS_RELUST" || m_strLineName == "RESULT"
|| m_strLineName == "GEO_LITH"|| m_strLineName == "SWALL_CORE"
@ -528,6 +531,13 @@ void FormInfo::paintEvent(QPaintEvent* event)
}
}
if(m_strLineName=="井眼垮塌矢量图"
|| m_strLineName=="井斜方位图")
{
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit);
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
}
QWidget::paintEvent(event);
}

View File

@ -149,6 +149,7 @@ public:
bool m_bLithColor = true; // 岩性配色显示
bool m_bLithOne = true; // 单岩性显示
bool m_bShowOil = true; // 显示含油性
bool m_bCenterOil = false; // 含油性居中
bool m_bShowColor = false; // 显示颜色
bool m_bShowColorNum = false; // 绘制颜色号
double m_dOilZhan = 8; //含油占比

View File

@ -585,10 +585,66 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString
//录井剖面
if(strLineName == "GEO_LITH")
{
if(listOtherProperty.size()>=4)
if(listOtherProperty.size()>=10)
{
formInfo->m_dOilZhan = listOtherProperty[3].toDouble();
//
if(listOtherProperty[4]=="LithColor")
{
formInfo->m_bLithColor = true;
}
else
{
formInfo->m_bLithColor = false;
}
//
if(listOtherProperty[5]=="LithOne")
{
formInfo->m_bLithOne = true;
}
else
{
formInfo->m_bLithOne = false;
}
//
if(listOtherProperty[6]=="ShowOil")
{
formInfo->m_bShowOil = true;
}
else
{
formInfo->m_bShowOil = false;
}
//
if(listOtherProperty[7]=="CenterOil")
{
formInfo->m_bCenterOil = true;
}
else
{
formInfo->m_bCenterOil = false;
}
//
if(listOtherProperty[8]=="ShowColor")
{
formInfo->m_bShowColor = true;
}
else
{
formInfo->m_bShowColor = false;
}
//
if(listOtherProperty[9]=="ShowColorNum")
{
formInfo->m_bShowColorNum = true;
}
else
{
formInfo->m_bShowColorNum = false;
}
}
}
}
//设置高度

View File

@ -5415,6 +5415,10 @@ void QMyCustomPlot::s_changeGeoLithShow(QString strUuid, QString strSlfName, QSt
{
m_bShowOil = bShow;
}
else if(propertyData == "含油性居中")
{
m_bCenterOil = bShow;
}
else if(propertyData == "显示颜色")
{
m_bShowColor = bShow;

View File

@ -187,6 +187,7 @@ public:
bool m_bLithColor = true; // 岩性配色显示
bool m_bLithOne = true; // 单岩性显示
bool m_bShowOil = true; // 显示含油性
bool m_bCenterOil = false; // 含油性居中
bool m_bShowColor = false; // 显示颜色
bool m_bShowColorNum = false; // 绘制颜色号
double m_dOilZhan = 8; //含油占比