Compare commits

...

2 Commits

Author SHA1 Message Date
8ef9a84e8f Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
# Conflicts:
#	logPlus/forminfo.cpp
#	logPlus/forminfo.h
2026-02-13 23:00:22 +08:00
5d860bd16b 解释结论,显示名称,字体,颜色,结论占比等数据编辑。 2026-02-13 22:56:10 +08:00
7 changed files with 384 additions and 284 deletions

View File

@ -94,8 +94,38 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
{
if(m_strCurrentProperty == "")
return;
if (m_strCurrentProperty == Table_Property)
{
bool bDraw = false;
QStringList slist;
slist << "显示名称" << "垂向绘制" << "旋转角度(°)" << "字体" << "颜色"
<< "结论占比%" << "显示位置(cm)" << "显示层号" << "层号字体" << "层号旋转";
for (int i = 0; i < slist.length(); i++)
{
if (slist.at(i) == m_propertyData[pProperty])
{
bDraw = m_formInfo->setInfoProperty(m_propertyData[pProperty], variant);
break;
}
}
if(m_strCurrentProperty == Track_Property)
if (!slist.contains(m_propertyData[pProperty]))
bDraw = true;
if (bDraw)
{
QVariantList listCond;
listCond << m_strUuid;
listCond << m_strSlfName;
listCond << m_strWellName;
listCond << m_strTrackName;
listCond << m_strLineName;
listCond << m_propertyData[pProperty];
listCond << variant;
emit CallManage::getInstance()->sig_changeDrawProperty(listCond);
}
}
else if(m_strCurrentProperty == Track_Property)
{
if(m_fromTop == NULL)
return;
@ -1238,6 +1268,25 @@ void PropertyWidget::initHeadProperty(FormHead *formHead, QTableWidget *tableWid
}
void PropertyWidget::initTableProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("名称", "显示名称", formInfo->m_strLineName, 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_nConclusionProportion, QVariant::Int);
_CreateVariantPropertyItem("显示", "显示位置(cm)", formInfo->m_nShowPos, QVariant::Int);
_CreateVariantPropertyItem("显示", "显示层号", formInfo->m_bShowLayerNo, QVariant::Bool);
_CreateVariantPropertyItem("显示", "层号字体", formInfo->m_layerFont, QVariant::Font);
_CreateVariantPropertyItem("显示", "层号旋转", formInfo->m_fLayerRotate, QVariant::Double);
m_strCurrentProperty = Table_Property;
}
void PropertyWidget::initDepthProperty(FormInfo *formInfo)
{
//
@ -1266,7 +1315,11 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
if (formInfo->m_strType == "depthObject")
if (formInfo->m_strType == "tableObject")
{
this->initTableProperty(formInfo);
}
else if (formInfo->m_strType == "depthObject")
{
this->initDepthProperty(formInfo);
}

View File

@ -32,6 +32,8 @@
#define Head_Property "Head_Property" //图头,单元格
#define GujingItem_Property "GujingItem_Property" //固井item
#define Table_Property "Table_Property" //解释结论
#pragma execution_character_set("utf-8")
/**
@ -118,6 +120,8 @@ public:
//图头
void initHeadProperty(FormHead *formHead, QTableWidget *tableWidget, QTableWidgetItem* item, int row, int col);
void initTableProperty(FormInfo *formInfo);
void initDepthProperty(FormInfo *formInfo);
void initProperty(FormInfo *formInfo);

View File

@ -156,7 +156,7 @@ void TransparentGroupResult::initRect()
mDragRect->setVisible(false);
mDragLine = new QCPItemStraightLine(mPlot);
mDragLine->setPen(QPen(Qt::red, 1, Qt::DashDotDotLine));
mDragLine->setPen(QPen(Qt::red, 1));
mDragLine->setVisible(false);
// 创建透明矩形

View File

@ -602,7 +602,7 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
//
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
curv->initGeometry(m_strUuid, m_iScale, g_iOneWidth);
curv->initGeometry(m_strUuid, m_iScale, m_nTrackW);
curv->show();
if (strLineName == "FRAC_HOLE.TABLE")

View File

@ -66,6 +66,7 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
m_curveNameFont = font1; // 曲线名称
m_curveUnitFont = font2; // 曲线单位
m_curveScaleFont = font2; // 曲线刻度
m_layerFont = font1;
m_bShowScale = true;
}
@ -598,7 +599,7 @@ bool FormInfo::setInfoProperty(QString strProName, QVariant val)
{
this->m_strUnit = val.toString();
}
else if ("曲线名称" == strProName)
else if ("曲线名称" == strProName || "字体" == strProName)
{
this->m_curveNameFont = val.value<QFont>();
}
@ -692,6 +693,40 @@ bool FormInfo::setInfoProperty(QString strProName, QVariant val)
this->m_nColorNum = val.toInt();
return true;
}
else if ("垂向绘制" == strProName)
{
this->m_bVerticaDrawing = val.toBool();
}
else if ("旋转角度(°)" == strProName)
{
this->m_nRotationAngle = val.toInt();
}
else if ("结论占比%" == strProName)
{
bDraw = true;
this->m_nConclusionProportion = val.toInt();
}
else if ("显示位置(cm)" == strProName)
{
bDraw = true;
this->m_nShowPos = val.toInt();
}
else if ("显示层号" == strProName)
{
bDraw = true;
this->m_bShowLayerNo = val.toBool();
}
else if ("层号字体" == strProName)
{
bDraw = true;
this->m_layerFont = val.value<QFont>();
}
else if ("层号旋转" == strProName)
{
bDraw = true;
this->m_fLayerRotate = val.toFloat();
}
this->update();
return bDraw;
}

View File

@ -67,6 +67,8 @@ public:
QString m_strAliasName;//显示名称
QString m_strUnit;//单位
bool m_bVerticaDrawing = false; // 垂向绘制
int m_nRotationAngle = 0; // 旋转角度
int m_iSelect=0; //iSelect=0未知1标准曲线2主曲线3从曲线
bool m_bMerge = false;//是拼接状态,否代表校深状态。为了切换时做数据清理
QString m_strType;//类型curve, wave
@ -116,7 +118,13 @@ public:
int m_nColorNum = 256; // 调色板参数设置-变密度颜色级数
int m_nSchemeIndex = 1; // 调色板参数设置-色板
//固井
// 解释结论
int m_nConclusionProportion = 50; // 结论占比%
int m_nShowPos = 0; // 显示位置(cm)
bool m_bShowLayerNo = true; // 显示层号
QFont m_layerFont; // 层号字体
float m_fLayerRotate = 0.0f; // 层号旋转
public:
void setLineWidth(double dWidth);

View File

@ -129,7 +129,7 @@ void QMyCustomPlot::initGeometry(QString strUuid, int nscale, int nW)
//curv->setMaximumHeight((int)dHight);
//curv->setViewport(QRect(0, 0, g_iOneWidth, (int)dHight));//7500-3184
this->setGeometry(0, 0, nW-20, (int)dHight);//7500-3184
this->setGeometry(0, 0, nW-1, (int)dHight);//7500-3184
}
void QMyCustomPlot::changePropertyWaveUpdate()