岩心分析属性

This commit is contained in:
crqiqi77 2026-03-27 11:29:35 +08:00
parent f22a3bc415
commit 67aa780e4d
6 changed files with 109 additions and 80 deletions

View File

@ -517,7 +517,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
this->m_tdCorePhysics->setCpCurveScale(temp);
}
this->m_tdCorePhysics->update();
}
@ -984,7 +983,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
CommonPropertyChanged(pProperty, variant);
changedYxzpItemProperty(pProperty, variant);
}
else if (m_strCurrentProperty == CORE_PHYSICS_ITEM_PROPERTY) // 岩心分析
else if (m_strCurrentProperty == CORE_PHYSICS_ITEM_PROPERTY || m_strCurrentProperty == CORE_PHYSICS_PROPERTY) // 岩心分析
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
@ -2821,7 +2820,13 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
//地质分层
this->initLayerProperty(formInfo);
}
else{
else if (m_strLineName == "CORE_PHYSICS")
{
// 岩心分析
this->initCorePhysicsProperty(formInfo);
}
else
{
this->initTableProperty(formInfo);
}
}
@ -3320,27 +3325,8 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
}
void PropertyWidget::initCorePhysicsProperty(FormInfo *formInfo)
void PropertyWidget::initCorePhysicsProperty(FormInfo *formInfo, bool isItem)
{
}
void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics* tdImage)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdImage->mPlot->m_formTrack->getFormInfoByParameters(tdImage->mPlot->m_strUuid, tdImage->mPlot->m_strWellName,
tdImage->mPlot->m_strTrackName, tdImage->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "例区高度", formInfo->m_headHeight, QVariant::Int);
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
@ -3393,14 +3379,38 @@ void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics
listStyle3.append("矩形");
listStyle3.append("三角");
listStyle3.append("菱形");
_CreateEnumPropertyItem("表格数据", "字段名称", tdImage->getCpOrder(), listStyle3);
_CreateEnumPropertyItem("表格数据", "字段名称", formInfo->m_cp_fieldName, listStyle3);
if(!isItem)
{
// 赋值会触发 SlotPropertyChanged
m_strCurrentProperty = CORE_PHYSICS_PROPERTY;
}
}
void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics* tdImage)
{
//初始化,清空
InitCurrentViewInfo();
FormInfo* formInfo = tdImage->mPlot->m_formTrack->getFormInfoByParameters(tdImage->mPlot->m_strUuid, tdImage->mPlot->m_strWellName,
tdImage->mPlot->m_strTrackName, tdImage->mPlot->m_strLineName);
if (formInfo != NULL)
{
m_formInfo = formInfo;
m_strUuid = formInfo->m_strUuid;
m_strTrackUuid = formInfo->m_strTrackUuid;
m_strSlfName = formInfo->m_strSlfName;
m_strWellName = formInfo->m_strWellName;
m_strTrackName = formInfo->m_strTrackName;
m_strLineName = formInfo->m_strLineName;
this->initCorePhysicsProperty(formInfo, true);
_CreateVariantPropertyItem("当前项", "序号", tdImage->getCpOrder(), QVariant::Int);
_CreateVariantPropertyItem("当前项", "深度", tdImage->getCpDepth(), QVariant::Double);
_CreateVariantPropertyItem("当前项", "校正深度", tdImage->getCpCorrDepth(), QVariant::Double);
_CreateVariantPropertyItem("当前项", "数值", tdImage->getCpCoreValue(), QVariant::Double);
}
// 当前属性类型
m_strCurrentProperty = CORE_PHYSICS_ITEM_PROPERTY;
m_tdCorePhysics = tdImage;

View File

@ -193,8 +193,8 @@ public:
void initImageProperty(FormInfo *formInfo);
void initImageItemProperty(TransparentDraggableImage* tdImage, double lower, double upper, QString strResult, double left, double width, QColor borderColor, Qt::PenStyle borderStyle, int borderWidth);
// 岩心分析属性
void initCorePhysicsProperty(FormInfo *formInfo);
// 岩心分析属性 isItem用来判断是不是item 默认false
void initCorePhysicsProperty(FormInfo *formInfo, bool isItem = false);
void initCorePhysicsItemProperty(TransparentDraggableCorePhysics* tdImage);
// 井壁取心属性

View File

@ -380,15 +380,6 @@ void TransparentDraggableCorePhysics::setCpLeftScale(double value)
this->m_cp_leftScale = value;
this->mPlot->yAxis2->setRange(value, this->mPlot->yAxis2->range().upper);
QList<QCPItemLine*> tracers = this->mPlot->findChildren<QCPItemLine*>();
foreach (QCPItemLine *tracer, tracers) {
// tracer->setVisible(value);
}
// 重新绘制图形
this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false);
}
@ -672,12 +663,12 @@ void TransparentDraggableCorePhysics::setCpSymbolFillColor(QColor value)
}
}
QString TransparentDraggableCorePhysics::getCpFieldName() const
int TransparentDraggableCorePhysics::getCpFieldName() const
{
return this->m_cp_fieldName;
}
void TransparentDraggableCorePhysics::setCpFieldName(const QString &value)
void TransparentDraggableCorePhysics::setCpFieldName(const int &value)
{
this->m_cp_fieldName = value;
}

View File

@ -117,8 +117,8 @@ public:
QColor getCpSymbolFillColor() const;
void setCpSymbolFillColor(QColor value);
QString getCpFieldName() const;
void setCpFieldName(const QString &value);
int getCpFieldName() const;
void setCpFieldName(const int &value);
signals:
void rangeChanged(QCPRange newRange);
@ -147,7 +147,7 @@ private:
QColor m_cp_symbolBorderColor; // 边框颜色
int m_cp_symbolSize; // 大小
QColor m_cp_symbolFillColor; // 填充颜色
QString m_cp_fieldName; // 字段名称
int m_cp_fieldName; // 字段名称
// 这四个是slf文件保存读取的
int m_cp_order; // 序号
double m_cp_depth; // 深度

View File

@ -331,6 +331,33 @@ QJsonObject FormInfo::makeJson()
rootObj["sdMinorTickLineLength"] = m_sdMinorTickLineLength; // 次刻度线长度
rootObj["sdMinorTickLineWidth"] = m_sdMinorTickLineWidth; // 次刻度线宽度
}
else if (m_strType == "tableObject" && m_strLineName == "CORE_PHYSICS")
{
rootObj["lineWidth"] = m_cp_lineWidth; // 线宽
rootObj["lineColor"] = m_cp_lineColor.name(); // 线条颜色
rootObj["lineStyle"] = m_cp_lineStyle; // 线型
rootObj["drawAsBar"] = m_cp_drawAsBar = true; // 杆状
rootObj["leftBoundary"] = m_cp_leftBoundary = true; // 左界
rootObj["skipZeroInvalidValues"] = m_cp_skipZeroInvalidValues = false; // 不绘零等无效值
rootObj["drawEnvelope"] = m_cp_drawEnvelope = false; // 绘制包络线
rootObj["drawAsDot"] = m_cp_drawAsDot = false; // 点状
rootObj["symbolType"] = m_cp_symbolType = 0; // 符号类型
rootObj["symbolBorderColor"] = m_cp_symbolBorderColor.name(); // 边框颜色
rootObj["symbolSize"] = m_cp_symbolSize = 3; // 大小
rootObj["symbolFillColor"] = m_cp_symbolFillColor.name(); // 填充颜色
rootObj["order"] = m_cp_order; // 序号
rootObj["depth"] = m_cp_depth; // 深度
rootObj["corrDepth"] = m_cp_corrDepth; // 校正深度
rootObj["coreValue"] = m_cp_coreValue; // 数值
rootObj["leftScale"] = m_cp_leftScale = 0; // 左刻度
rootObj["rightScale"] = m_cp_rightScale = 100; // 右刻度
rootObj["scaleDivisionsOrCustom"] = m_cp_scaleDivisionsOrCustom = 2; // 等分刻度数或自定序列
rootObj["scaleType"] = m_cp_scaleType = 0; // 刻度类型
rootObj["curveUnit"] = m_cp_curveUnit.toString(); // 曲线单位
rootObj["curveScale"] = m_cp_curveScale.toString(); // 曲线刻度
}
return rootObj;
}

View File

@ -223,6 +223,12 @@ public:
int m_cp_lineWidth = 1; // 线宽
QColor m_cp_lineColor; // 线条颜色
Qt::PenStyle m_cp_lineStyle; // 线型
double m_cp_leftScale = 0; // 左刻度
double m_cp_rightScale = 100; // 右刻度
int m_cp_scaleDivisionsOrCustom = 2; // 等分刻度数或自定序列
int m_cp_scaleType = 0; // 刻度类型
QFont m_cp_curveUnit; // 曲线单位
QFont m_cp_curveScale; // 曲线刻度
bool m_cp_drawAsBar = true; // 杆状
bool m_cp_leftBoundary = true; // 左界
bool m_cp_skipZeroInvalidValues = false; // 不绘零等无效值
@ -236,12 +242,7 @@ public:
double m_cp_depth; // 深度
double m_cp_corrDepth; // 校正深度
double m_cp_coreValue; // 数值
double m_cp_leftScale = 0; // 左刻度
double m_cp_rightScale = 100; // 右刻度
int m_cp_scaleDivisionsOrCustom = 2; // 等分刻度数或自定序列
int m_cp_scaleType = 0; // 刻度类型
QFont m_cp_curveUnit; // 曲线单位
QFont m_cp_curveScale; // 曲线刻度
QString m_cp_fieldName; // 字段名称
public:
void setLineWidth(double dWidth);