This commit is contained in:
DESKTOP-450PEFP\mainc 2026-05-27 18:04:49 +08:00
commit 34484fae27
5 changed files with 47 additions and 132 deletions

View File

@ -602,7 +602,7 @@ void FormDraw::displayCorePhysics(QJsonObject jsonObject)
// 例区高度 // 例区高度
if (jsonObject.contains("headHeight")) if (jsonObject.contains("headHeight"))
{ {
int value = jsonObject.value("headHeight").toInt(); double value = jsonObject.value("headHeight").toDouble();
listOtherProperty.append(QString::number(value)); listOtherProperty.append(QString::number(value));
} }
@ -1227,64 +1227,6 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
} }
} }
//
double dOilZhan = 8; //含油占比
bool bLithColor = true; // 岩性配色显示
bool bLithOne = true; // 单岩性显示
bool bShowOil = true; // 显示含油性
bool bCenterOil = false; // 含油性居中
bool bShowColor = false; // 显示颜色
bool bShowColorNum = false; // 绘制颜色号
//
if (lineObjInfo.contains("OilZhan"))//含油占比
{
dOilZhan = lineObjInfo.value("OilZhan").toInt();
}
//
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(); QString folderPath = GetLogdataPath();
folderPath = folderPath + g_prjname; folderPath = folderPath + g_prjname;
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
@ -1305,56 +1247,6 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo)
// //
listOtherProperty.append(QString::number(nRotationAngle));//旋转角度 listOtherProperty.append(QString::number(nRotationAngle));//旋转角度
//
listOtherProperty.append(QString::number(dOilZhan));//含油占比
//
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");
}
//FormInfo高度 //FormInfo高度
listOtherProperty.append(QString::number(headHeight)); listOtherProperty.append(QString::number(headHeight));
@ -2761,8 +2653,6 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
QString strOtherScaleType;//其他目标曲线,刻度类型(线性,对数) QString strOtherScaleType;//其他目标曲线,刻度类型(线性,对数)
QColor frontColor(0, 0, 0);//岩性前景色 QColor frontColor(0, 0, 0);//岩性前景色
QColor backColor(255, 255, 255);//岩性背景色 QColor backColor(255, 255, 255);//岩性背景色
// 头部高度
double headHeight = 2.0; //2cm
if (lineObjInfo.contains("SlfName")) if (lineObjInfo.contains("SlfName"))
{ {
@ -2879,6 +2769,7 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); lineColor.setNamedColor(lineObjInfo.value("lineColor").toString());
} }
//FormInfo高度 //FormInfo高度
double headHeight = 2.0; //2cm
if (lineObjInfo.contains("headHeight")) if (lineObjInfo.contains("headHeight"))
{ {
QJsonValue value = lineObjInfo.value("headHeight"); QJsonValue value = lineObjInfo.value("headHeight");

View File

@ -171,7 +171,15 @@ void FormInfo::initProperty_Kedou(QJsonObject obj)
// 刻度 // 刻度
this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString());
// 头部高度 // 头部高度
this->m_headHeight = obj["headHeight"].toDouble(); if(obj.contains("headHeight"))
{
this->m_headHeight = obj["headHeight"].toDouble();
}
//特殊处理。早期默认值100
if(this->m_headHeight == 100)
{
this->m_headHeight = 2.0;
}
// 数据类型选择 // 数据类型选择
this->m_pl_dataType = obj["m_pl_dataType"].toInt(); // 数据类型 this->m_pl_dataType = obj["m_pl_dataType"].toInt(); // 数据类型
@ -255,8 +263,10 @@ void FormInfo::initProperty_Ganzhuang(QJsonObject obj)
// 字体 // 字体
// 名称 // 名称
this->m_curveNameFont.fromString(obj["curveNameFont"].toString()); this->m_curveNameFont.fromString(obj["curveNameFont"].toString());
// 头部高度 if(obj.contains("headHeight"))
this->m_headHeight = obj["headHeight"].toDouble(); {
this->m_headHeight = obj["headHeight"].toDouble();
}
// 曲线选择 // 曲线选择
this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线 this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线
@ -319,7 +329,10 @@ void FormInfo::initProperty_Jykt(QJsonObject obj)
this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString());
// 头部高度 // 头部高度
this->m_headHeight = obj["headHeight"].toDouble(); if(obj.contains("headHeight"))
{
this->m_headHeight = obj["headHeight"].toDouble();
}
// 曲线选择 // 曲线选择
this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线 this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线
@ -381,7 +394,10 @@ void FormInfo::initProperty_Denv(QJsonObject obj)
// 刻度 // 刻度
this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString());
// 头部高度 // 头部高度
this->m_headHeight = obj["headHeight"].toDouble(); if(obj.contains("headHeight"))
{
this->m_headHeight = obj["headHeight"].toDouble();
}
// 曲线选择 // 曲线选择
this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线 this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线
@ -437,7 +453,10 @@ void FormInfo::initProperty_MCals(QJsonObject obj)
// 刻度 // 刻度
this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString());
// 头部高度 // 头部高度
this->m_headHeight = obj["headHeight"].toDouble(); if(obj.contains("headHeight"))
{
this->m_headHeight = obj["headHeight"].toDouble();
}
m_MinVal = obj["m_MinVal"].toDouble();//最小井径 m_MinVal = obj["m_MinVal"].toDouble();//最小井径
m_MaxVal = obj["m_MaxVal"].toDouble();//最大井径 m_MaxVal = obj["m_MaxVal"].toDouble();//最大井径
@ -468,7 +487,15 @@ void FormInfo::initProperty(QJsonObject obj)
m_vmax = obj.value("vmax").toDouble(); m_vmax = obj.value("vmax").toDouble();
m_strUnit = obj.value("Unit").toString(); m_strUnit = obj.value("Unit").toString();
// 头部高度 // 头部高度
this->m_headHeight = obj["headHeight"].toDouble(); if(obj.contains("headHeight"))
{
this->m_headHeight = obj["headHeight"].toDouble();
}
//特殊处理。早期默认值100
if(this->m_headHeight == 100.0)
{
this->m_headHeight = 2.0;
}
QString strType = obj.value("Type").toString(); QString strType = obj.value("Type").toString();
if ("waveObject" == strType) if ("waveObject" == strType)
@ -491,7 +518,7 @@ void FormInfo::initProperty(QJsonObject obj)
{ {
m_bVerticaDrawing = obj["bVerticaDrawing"].toBool(); // 垂向绘制 m_bVerticaDrawing = obj["bVerticaDrawing"].toBool(); // 垂向绘制
m_nRotationAngle = obj["nRotationAngle"].toInt(); // 旋转角度 m_nRotationAngle = obj["nRotationAngle"].toInt(); // 旋转角度
m_headHeight = obj["headHeight"].toDouble();
m_strUnit = obj["strUnit"].toString(); // 单位 m_strUnit = obj["strUnit"].toString(); // 单位
{ {
QStringList fontParts = obj["curveNameFont"].toString().split(","); // 按逗号拆分 QStringList fontParts = obj["curveNameFont"].toString().split(","); // 按逗号拆分
@ -582,7 +609,6 @@ void FormInfo::initProperty(QJsonObject obj)
this->m_crack_inclinationCurveName = obj["m_crack_inclinationCurveName"].toString(); // 井斜角曲线名 this->m_crack_inclinationCurveName = obj["m_crack_inclinationCurveName"].toString(); // 井斜角曲线名
this->m_crack_azimuthCurveName = obj["m_crack_azimuthCurveName"].toString(); // 方位角曲线名 this->m_crack_azimuthCurveName = obj["m_crack_azimuthCurveName"].toString(); // 方位角曲线名
// 通常 // 通常
// 例区高度 m_headHeight
// 字体 // 字体
{ {
// 名称 // 名称
@ -615,8 +641,6 @@ void FormInfo::initProperty(QJsonObject obj)
{ {
this->m_dca_azimuth_curve = obj["m_dca_azimuth_curve"].toString(); this->m_dca_azimuth_curve = obj["m_dca_azimuth_curve"].toString();
this->m_dca_amplitude_curve = obj["m_dca_amplitude_curve"].toString(); this->m_dca_amplitude_curve = obj["m_dca_amplitude_curve"].toString();
// 通常
this->m_headHeight = obj["m_headHeight"].toDouble(); // 例区高度
// 控制曲线 // 控制曲线
this->m_dca_left_azimuth_curve = obj["m_dca_left_azimuth_curve"].toInt(); // 方位曲线左刻度 this->m_dca_left_azimuth_curve = obj["m_dca_left_azimuth_curve"].toInt(); // 方位曲线左刻度
this->m_dca_right_azimuth_curve = obj["m_dca_right_azimuth_curve"].toInt(); this->m_dca_right_azimuth_curve = obj["m_dca_right_azimuth_curve"].toInt();
@ -642,8 +666,6 @@ void FormInfo::initProperty(QJsonObject obj)
if ("plObject" == strType || "roseObject" == strType || "CrackObject" == strType) if ("plObject" == strType || "roseObject" == strType || "CrackObject" == strType)
{ {
// 通常
this->m_headHeight = obj["m_headHeight"].toDouble(); // 例区高度
// 分类 // 分类
this->m_pl_highGap = obj["m_pl_highGap"].toBool(); // 高导缝 this->m_pl_highGap = obj["m_pl_highGap"].toBool(); // 高导缝
this->m_pl_highReservoir = obj["m_pl_highReservoir"].toBool(); // 高阻缝 this->m_pl_highReservoir = obj["m_pl_highReservoir"].toBool(); // 高阻缝
@ -1141,8 +1163,6 @@ QJsonObject FormInfo::makeJson()
// 名称 // 名称
rootObj["m_dca_azimuth_curve"] = this->m_dca_azimuth_curve; rootObj["m_dca_azimuth_curve"] = this->m_dca_azimuth_curve;
rootObj["m_dca_amplitude_curve"] = this->m_dca_amplitude_curve; rootObj["m_dca_amplitude_curve"] = this->m_dca_amplitude_curve;
// 通常
rootObj["m_headHeight"] = this->m_headHeight; // 例区高度
// 控制曲线 // 控制曲线
rootObj["m_dca_left_azimuth_curve"] = this->m_dca_left_azimuth_curve; // 方位曲线左刻度 rootObj["m_dca_left_azimuth_curve"] = this->m_dca_left_azimuth_curve; // 方位曲线左刻度
rootObj["m_dca_right_azimuth_curve"] = this->m_dca_right_azimuth_curve; rootObj["m_dca_right_azimuth_curve"] = this->m_dca_right_azimuth_curve;
@ -1154,8 +1174,6 @@ QJsonObject FormInfo::makeJson()
if(m_strType == "CrackObject" || m_strType == "plObject" || m_strType == "roseObject") if(m_strType == "CrackObject" || m_strType == "plObject" || m_strType == "roseObject")
{ {
// 通常
rootObj["m_headHeight"] = this->m_headHeight; // 例区高度
// 分类 // 分类
rootObj["m_pl_highGap"] = this->m_pl_highGap; // 高导缝 rootObj["m_pl_highGap"] = this->m_pl_highGap; // 高导缝
rootObj["m_pl_highReservoir"] = this->m_pl_highReservoir; // 高阻缝 rootObj["m_pl_highReservoir"] = this->m_pl_highReservoir; // 高阻缝

View File

@ -1528,9 +1528,9 @@ void FormTrack::s_addTubingstring(QString strSlfName, QString strWellName, QStri
formInfo->m_OutD_Tubing = listOtherProperty[13].toDouble(); formInfo->m_OutD_Tubing = listOtherProperty[13].toDouble();
} }
// 头部高度 // 头部高度
if(listOtherProperty.size()>=15) if(listOtherProperty.size()>=17)
{ {
formInfo->m_headHeight = listOtherProperty[14].toDouble(); formInfo->m_headHeight = listOtherProperty[16].toDouble();
} }
//设置高度 //设置高度
ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm);

View File

@ -1141,7 +1141,7 @@ void FormWell::getTableSize_Head_Biggest(int &iHight)
{ {
int iHight_Tmp = 0; int iHight_Tmp = 0;
formTrack->getTableSize_Head_Biggest(iHight_Tmp); formTrack->getTableSize_Head_Biggest(iHight_Tmp);
if(iHight_Tmp>iHight) if(iHight_Tmp>iHight_Big)
{ {
iHight_Big = iHight_Tmp; iHight_Big = iHight_Tmp;
} }

View File

@ -260,7 +260,10 @@ void MainWindowCurve::s_setRangeVScrollBar2(QString strUuid)
{ {
return; return;
} }
if(g_iLoadingJson==1)//针对模板加载,不处理滚动条,避免多次冲突
{
return;
}
//自定义滚动条(头) //自定义滚动条(头)
int iTableSize_Head_Biggest = 0; int iTableSize_Head_Biggest = 0;
getTableSize_Head_Biggest(iTableSize_Head_Biggest); getTableSize_Head_Biggest(iTableSize_Head_Biggest);
@ -5066,6 +5069,9 @@ void MainWindowCurve::Open(QString fileFull)
//展示所有井 //展示所有井
DisplayWells(wellsArray); DisplayWells(wellsArray);
g_iLoadingJson = 0; g_iLoadingJson = 0;
//统一处理头部滚动条
s_setRangeVScrollBar2(m_strUuid);
} }
} }
// //