岩心分析属性
This commit is contained in:
parent
f22a3bc415
commit
67aa780e4d
|
|
@ -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,9 +3325,67 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
|
|||
}
|
||||
|
||||
|
||||
void PropertyWidget::initCorePhysicsProperty(FormInfo *formInfo)
|
||||
void PropertyWidget::initCorePhysicsProperty(FormInfo *formInfo, bool isItem)
|
||||
{
|
||||
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
|
||||
_CreateVariantPropertyItem("通常", "例区高度", formInfo->m_headHeight, QVariant::Int);
|
||||
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
|
||||
|
||||
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
||||
|
||||
_CreateVariantPropertyItem("曲线线型", "线宽", formInfo->m_cp_lineWidth, QVariant::Int);
|
||||
_CreateVariantPropertyItem("曲线线型", "颜色", formInfo->m_cp_lineColor, QVariant::Color);
|
||||
QStringList listStyle;
|
||||
listStyle.append("无");
|
||||
listStyle.append("实线");
|
||||
listStyle.append("虚线");
|
||||
listStyle.append("点线");
|
||||
listStyle.append("虚点线");
|
||||
listStyle.append("虚点点线");
|
||||
_CreateEnumPropertyItem("曲线线型", "线型", (int)formInfo->m_cp_lineStyle, listStyle);
|
||||
|
||||
_CreateVariantPropertyItem("显示设置", "左刻度", formInfo->m_cp_leftScale, QVariant::Double);
|
||||
_CreateVariantPropertyItem("显示设置", "右刻度", formInfo->m_cp_rightScale, QVariant::Double);
|
||||
_CreateVariantPropertyItem("显示设置", "等分刻度数或自定义序列", formInfo->m_cp_scaleDivisionsOrCustom, QVariant::Int);
|
||||
QStringList listStyle4;
|
||||
listStyle4.append("线性");
|
||||
listStyle4.append("对数");
|
||||
listStyle4.append("倾角");
|
||||
_CreateEnumPropertyItem("显示设置", "刻度类型", formInfo->m_cp_scaleType, listStyle4);
|
||||
_CreateVariantPropertyItem("显示设置", "显示单位", formInfo->m_strUnit, QVariant::String);
|
||||
|
||||
_CreateVariantPropertyItem("字体", "字体", formInfo->m_curveNameFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("字体", "曲线单位", formInfo->m_strUnitFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("字体", "曲线刻度", formInfo->m_cp_curveScale, QVariant::Font);
|
||||
|
||||
_CreateVariantPropertyItem("绘制方式", "杆状", formInfo->m_cp_drawAsBar, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "左界", formInfo->m_cp_leftBoundary, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "不绘零等无效值", formInfo->m_cp_skipZeroInvalidValues, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "绘制包络线", formInfo->m_cp_drawEnvelope, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "点状", formInfo->m_cp_drawAsDot, QVariant::Bool);
|
||||
|
||||
QStringList listStyle2;
|
||||
listStyle2.append("圆形");
|
||||
listStyle2.append("矩形");
|
||||
listStyle2.append("三角");
|
||||
listStyle2.append("菱形");
|
||||
_CreateEnumPropertyItem("数据点", "符号类型", formInfo->m_cp_symbolType, listStyle2);
|
||||
_CreateVariantPropertyItem("数据点", "边框颜色", formInfo->m_cp_symbolBorderColor, QVariant::Color);
|
||||
_CreateVariantPropertyItem("数据点", "大小", formInfo->m_cp_symbolSize, QVariant::Int);
|
||||
_CreateVariantPropertyItem("数据点", "填充颜色", formInfo->m_cp_symbolFillColor, QVariant::Color);
|
||||
|
||||
QStringList listStyle3;
|
||||
listStyle3.append("圆形");
|
||||
listStyle3.append("矩形");
|
||||
listStyle3.append("三角");
|
||||
listStyle3.append("菱形");
|
||||
_CreateEnumPropertyItem("表格数据", "字段名称", formInfo->m_cp_fieldName, listStyle3);
|
||||
|
||||
if(!isItem)
|
||||
{
|
||||
// 赋值会触发 SlotPropertyChanged
|
||||
m_strCurrentProperty = CORE_PHYSICS_PROPERTY;
|
||||
}
|
||||
}
|
||||
void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics* tdImage)
|
||||
{
|
||||
|
|
@ -3341,66 +3404,13 @@ void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics
|
|||
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);
|
||||
|
||||
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
||||
|
||||
_CreateVariantPropertyItem("曲线线型", "线宽", formInfo->m_cp_lineWidth, QVariant::Int);
|
||||
_CreateVariantPropertyItem("曲线线型", "颜色", formInfo->m_cp_lineColor, QVariant::Color);
|
||||
QStringList listStyle;
|
||||
listStyle.append("无");
|
||||
listStyle.append("实线");
|
||||
listStyle.append("虚线");
|
||||
listStyle.append("点线");
|
||||
listStyle.append("虚点线");
|
||||
listStyle.append("虚点点线");
|
||||
_CreateEnumPropertyItem("曲线线型", "线型", (int)formInfo->m_cp_lineStyle, listStyle);
|
||||
|
||||
_CreateVariantPropertyItem("显示设置", "左刻度", formInfo->m_cp_leftScale, QVariant::Double);
|
||||
_CreateVariantPropertyItem("显示设置", "右刻度", formInfo->m_cp_rightScale, QVariant::Double);
|
||||
_CreateVariantPropertyItem("显示设置", "等分刻度数或自定义序列", formInfo->m_cp_scaleDivisionsOrCustom, QVariant::Int);
|
||||
QStringList listStyle4;
|
||||
listStyle4.append("线性");
|
||||
listStyle4.append("对数");
|
||||
listStyle4.append("倾角");
|
||||
_CreateEnumPropertyItem("显示设置", "刻度类型", formInfo->m_cp_scaleType, listStyle4);
|
||||
_CreateVariantPropertyItem("显示设置", "显示单位", formInfo->m_strUnit, QVariant::String);
|
||||
|
||||
_CreateVariantPropertyItem("字体", "字体", formInfo->m_curveNameFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("字体", "曲线单位", formInfo->m_strUnitFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("字体", "曲线刻度", formInfo->m_cp_curveScale, QVariant::Font);
|
||||
|
||||
_CreateVariantPropertyItem("绘制方式", "杆状", formInfo->m_cp_drawAsBar, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "左界", formInfo->m_cp_leftBoundary, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "不绘零等无效值", formInfo->m_cp_skipZeroInvalidValues, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "绘制包络线", formInfo->m_cp_drawEnvelope, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("绘制方式", "点状", formInfo->m_cp_drawAsDot, QVariant::Bool);
|
||||
|
||||
QStringList listStyle2;
|
||||
listStyle2.append("圆形");
|
||||
listStyle2.append("矩形");
|
||||
listStyle2.append("三角");
|
||||
listStyle2.append("菱形");
|
||||
_CreateEnumPropertyItem("数据点", "符号类型", formInfo->m_cp_symbolType, listStyle2);
|
||||
_CreateVariantPropertyItem("数据点", "边框颜色", formInfo->m_cp_symbolBorderColor, QVariant::Color);
|
||||
_CreateVariantPropertyItem("数据点", "大小", formInfo->m_cp_symbolSize, QVariant::Int);
|
||||
_CreateVariantPropertyItem("数据点", "填充颜色", formInfo->m_cp_symbolFillColor, QVariant::Color);
|
||||
|
||||
QStringList listStyle3;
|
||||
listStyle3.append("圆形");
|
||||
listStyle3.append("矩形");
|
||||
listStyle3.append("三角");
|
||||
listStyle3.append("菱形");
|
||||
_CreateEnumPropertyItem("表格数据", "字段名称", tdImage->getCpOrder(), listStyle3);
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
// 井壁取心属性
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; // 深度
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user