频率统计图 属性

This commit is contained in:
crqiqi77 2026-03-31 15:50:27 +08:00
parent 0ddd73f8bd
commit 0ad44b528a
4 changed files with 111 additions and 31 deletions

View File

@ -286,7 +286,13 @@ void PropertyWidget::changedYxzpItemProperty(QtProperty *qtProperty, const QVari
void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QVariant &variant, bool isItem)
{
if("例区高度" == m_propertyData[qtProperty])
if("曲线名称" == m_propertyData[qtProperty])
{
QFont newFont = variant.value<QFont>();
m_formInfo->m_curveNameFont = newFont;
m_formInfo->update();
}
else if("例区高度" == m_propertyData[qtProperty])
{
int temp = variant.toInt();
this->m_formInfo->m_headHeight = temp;
@ -456,24 +462,28 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
int temp = variant.toInt();
this->m_tdCorePhysics->setCpOrder(temp);
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("深度" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_tdCorePhysics->setCpDepth(temp);
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("校正深度" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_tdCorePhysics->setRange(temp,temp,this->m_tdCorePhysics->getCpCoreValue());
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("数值" == m_propertyData[qtProperty])
{
double temp = variant.toDouble();
this->m_tdCorePhysics->setCpCoreValue(temp);
this->m_tdCorePhysics->mPlot->saveToSLFCorePhysics();
this->m_tdCorePhysics->update();
}
else if("左刻度" == m_propertyData[qtProperty])
{
@ -484,15 +494,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
QVariantMap variantMap;
variantMap["leftScale"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
// this->m_tdCorePhysics->setCpLeftScale(temp);
// 这个操作需要修改所有对象
// QMap<QString, QObject*> m_mapDraggable_CorePhysics = this->m_tdCorePhysics->mPlot->m_mapDraggable_CorePhysics;
// for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
// {
// TransparentDraggableCorePhysics* pDraggableRect = (TransparentDraggableCorePhysics*)iter.value();
// pDraggableRect->setCpLeftScale(temp);
// }
}
else if("右刻度" == m_propertyData[qtProperty])
{
@ -503,14 +504,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
QVariantMap variantMap;
variantMap["rightScale"] = temp;
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
// this->m_tdCorePhysics->setCpRightScale(temp);
// QMap<QString, QObject*> m_mapDraggable_CorePhysics = this->m_tdCorePhysics->mPlot->m_mapDraggable_CorePhysics;
// for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
// {
// TransparentDraggableCorePhysics* pDraggableRect = (TransparentDraggableCorePhysics*)iter.value();
// pDraggableRect->setCpRightScale(temp);
// }
}
else if("等分刻度数或自定义序列" == m_propertyData[qtProperty])
{
@ -564,12 +557,7 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
{
QFont temp = variant.value<QFont>();
this->m_formInfo->m_cp_curveScale = temp;
this->m_tdCorePhysics->setCpCurveScale(temp);
}
if(isItem)
{
this->m_tdCorePhysics->update();
this->m_formInfo->repaint();
}
}
@ -2807,7 +2795,7 @@ void PropertyWidget::initDepthProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "显示单位", formInfo->m_strUnit, QVariant::String);
_CreateVariantPropertyItem("通常", "标尺颜色", formInfo->m_sdRulerColor, QVariant::Color);
_CreateVariantPropertyItem("字体", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "名称", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "单位", formInfo->m_strUnitFont, QVariant::Font);
_CreateVariantPropertyItem("深度标注", "间隔", formInfo->m_sdInterval, QVariant::Double);
@ -2819,9 +2807,9 @@ void PropertyWidget::initDepthProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("深度标注", "海拔垂深", formInfo->m_sdElevationVerticalDepth, QVariant::Bool);
_CreateVariantPropertyItem("深度标注", "垂深", formInfo->m_sdVerticalDepth, QVariant::Bool);
QStringList listStyle;
listStyle.append("");
listStyle.append("");
listStyle.append("居中");
listStyle.append("");
listStyle.append("");
_CreateEnumPropertyItem("深度标注", "斜深位置", formInfo->m_sdMeasuredDepthPosition, listStyle);
_CreateEnumPropertyItem("深度标注", "垂深位置", formInfo->m_sdVerticalDepthPosition, listStyle);
_CreateEnumPropertyItem("深度标注", "海拔垂深位置", formInfo->m_sdElevationVerticalDepthPosition, listStyle);
@ -2928,6 +2916,12 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
//套管组件
this->initTubingProperty(formInfo);
}
else if (formInfo->m_strType == "plObject")
{
//频率统计图
this->initPlObjectProperty(formInfo);
}
}
void PropertyWidget::initRoseProperty(FormInfo *formInfo)
@ -3420,7 +3414,7 @@ void PropertyWidget::initCorePhysicsProperty(FormInfo *formInfo, bool isItem)
_CreateEnumPropertyItem("显示设置", "刻度类型", formInfo->m_cp_scaleType, listStyle4);
_CreateVariantPropertyItem("显示设置", "显示单位", formInfo->m_strUnit, QVariant::String);
_CreateVariantPropertyItem("字体", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线名称", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线单位", formInfo->m_strUnitFont, QVariant::Font);
_CreateVariantPropertyItem("字体", "曲线刻度", formInfo->m_cp_curveScale, QVariant::Font);
@ -3818,9 +3812,78 @@ void PropertyWidget::initTubingItemProperty(TransparentDraggableGuan* tdGuan, do
_CreateVariantPropertyItem("当前项", "组件类型", strResult, VariantManager::filePathTypeId());
}
void PropertyWidget::initPlObjectProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("数据", "名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("数据", "数据类型", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("数据", "显示单位", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("数据", "井文件名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("数据", "方位曲线", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("数据", "倾角曲线", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("字体", "名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("字体", "单位", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("字体", "刻度", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("字体", "曲线名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("控制曲线", "曲线名", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("控制曲线", "最小值", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("控制曲线", "最大值", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "扇形", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "圆半径(cm)", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "圆线颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "圆线宽度", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "是否填充", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("方位频率", "填充颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "线数", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "统计线高度(cm)", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "线粗细", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "线颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "是否绘制标注?", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("倾角频率", "绘制直方图?", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("基线", "宽度", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("基线", "颜色", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("统计参数", "统计间隔", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("统计参数", "最小倾角", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("统计参数", "最大倾角", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "高导缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "高阻缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "网状缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "诱导缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "层理", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "侵蚀面", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "孔洞", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "气孔", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "砾石", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "结核", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "团块", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "断层", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "垂直缝", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "自定义1", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("分类", "自定义2", formInfo->m_strAliasName, QVariant::String);
}
void PropertyWidget::changedPlObjectProperty(QString strProName, QVariant val)
{
}
void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal)
{
if ("显示单位" == strProperty)
if ("名称" == strProperty)
{
QFont newFont = varVal.value<QFont>();
m_formInfo->m_curveNameFont = newFont;
this->m_formInfo->repaint();
}
else if ("显示单位" == strProperty)
{
this->m_formInfo->m_strUnit = varVal.toString();
this->m_formInfo->repaint();

View File

@ -52,6 +52,7 @@
#define CORE_PHYSICS_ITEM_PROPERTY "CORE_PHYSICS_ITEM_PROPERTY" // 岩心分析item
#define Depth_Property "Depth_Property" // 深度
#define PL_OBJECT_PROPERTY "PL_OBJECT_PROPERTY" // 深度
#define SwallCore_Property "SwallCore_Property" //井壁取心
#define SwallCoreItem_Property "SwallCoreItem_Property" //井壁取心item
@ -228,6 +229,10 @@ public:
void initTubingProperty(FormInfo *formInfo);
void initTubingItemProperty(TransparentDraggableGuan* tdGuan, double lower, double upper, QString strResult);
// 频率统计图
void initPlObjectProperty(FormInfo *formInfo);
void changedPlObjectProperty(QString strProName, QVariant val);
void ChangFillProperty();//填充属性改变
void ChangHeadItemProperty();//图头项改变

View File

@ -205,7 +205,7 @@ public:
QColor m_sdRulerColor; // 标尺颜色
double m_sdInterval = 20; // 间隔
QFont m_sdLabelFont = QFont("微软雅黑", 10); // 标注字体
double m_sdRotationAngle = 0.0; // 旋转(°)
double m_sdRotationAngle = 90.0; // 旋转(°)
bool m_sdDrawStartDepth; // 绘制起点深度
bool m_sdDrawEndDepth; // 绘制终点深度
bool m_sdMeasuredDepth = true; // 斜深

View File

@ -4140,6 +4140,18 @@ void QMyCustomPlot::ClearSelectItems()
pGroup->setSelectRect(false);
}
}
else if (m_strLineName == "CORE_PHYSICS")
{
if(m_SelectShiftLine)
{
TransparentDraggableCorePhysics *tdCorePhysics = (TransparentDraggableCorePhysics*)this->m_SelectShiftLine;
QPen pen = tdCorePhysics->qcpItemLine->pen();
pen.setColor(tdCorePhysics->getCpLineColor());
tdCorePhysics->qcpItemLine->setPen(pen);
this->replot();
m_SelectShiftLine = nullptr;
}
}
//属性清空
PropertyService()->InitCurrentViewInfo();
}
@ -4988,7 +5000,7 @@ void QMyCustomPlot::s_changeDepthProperty(QVariantList vlist)
switch(temp)
{
case 0:
//
//
this->yAxis->setTickLabelPadding(5);
break;
case 1: