From 97aaad7462a5a660e473af1757c9b7532de7f683 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Wed, 27 May 2026 16:09:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E2=80=9C=E4=BE=8B=E5=8C=BA?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E2=80=9D=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/CallManage.h | 5 +- logPlus/PropertyWidget.cpp | 125 +++++++++++++++++-------- logPlus/formdraw.cpp | 121 +++++++++++++++++++++++-- logPlus/formdraw.h | 2 +- logPlus/forminfo.cpp | 54 ++++++++++- logPlus/forminfo.h | 12 +-- logPlus/formtrack.cpp | 176 ++++++++++++++++++++++++++++-------- logPlus/formtrack.h | 8 +- logPlus/formwell.cpp | 15 +++ logPlus/mainwindowcurve.cpp | 21 +++++ logPlus/mainwindowcurve.h | 3 + 11 files changed, 442 insertions(+), 100 deletions(-) diff --git a/logPlus/CallManage.h b/logPlus/CallManage.h index 3946cca..58a9e11 100644 --- a/logPlus/CallManage.h +++ b/logPlus/CallManage.h @@ -81,7 +81,7 @@ signals: void sig_AddDrawImage(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); //斜井三图一表 - void sig_AddSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); + void sig_AddSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0, QStringList listOtherProperty={}); //裂痕 void sig_AddCrack(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); @@ -334,6 +334,9 @@ signals: //加载视图(重新打开) void sig_ReOpen(QString fileFull, QString fileName); + //重新设置滚动条范围(头) + void sig_setRangeVScrollBar2(QString strUuid); + // //void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath); diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index 182d6b9..9aba943 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -110,6 +110,11 @@ void PropertyWidget::CommonPropertyChanged( QtProperty *pProperty, const QVarian m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); } + else if("例区高度(cm)" == m_propertyData[pProperty]) + { + double temp = variant.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); + } else if("字体" == m_propertyData[pProperty]) { //字体 @@ -143,9 +148,8 @@ void PropertyWidget::changedYxzpProperty(QtProperty *qtProperty, const QVariant } else if("例区高度(cm)" == m_propertyData[qtProperty]) { - int temp = variant.toInt(); - this->m_formInfo->m_headHeight = temp; - this->m_formInfo->setFixedHeight(temp); + double temp = variant.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); } } @@ -272,9 +276,8 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV } else if("例区高度(cm)" == m_propertyData[qtProperty]) { - int temp = variant.toInt(); - this->m_formInfo->m_headHeight = temp; - this->m_formInfo->setFixedHeight(temp); + double temp = variant.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); } else if("线宽" == m_propertyData[qtProperty]) { @@ -541,7 +544,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant bool bDraw = false; QStringList slist; slist << "显示名称" << "垂向绘制" << "旋转角度(°)" << "字体" << "颜色" - << "结论占比%" << "显示位置(cm)" << "显示层号" << "层号字体" << "层号旋转"; + << "结论占比%" << "显示位置(cm)" << "显示层号" << "层号字体" << "层号旋转" << "例区高度(cm)"; for (int i = 0; i < slist.length(); i++) { if (slist.at(i) == m_propertyData[pProperty]) @@ -625,7 +628,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant slist << "显示名称" << "显示单位" << "曲线名称" << "曲线单位" << "曲线刻度" << "类型" << "方式" << "左刻度" << "右刻度" << "幅度刻度" << "最大振幅" << "颜色" << "线宽" << "绘制波深度" << "绘制波基线" << "奇偶配色" - << "波列基值" << "波形间隔" << "波形高度" << "显示刻度" << "色板" << "变密度颜色级数"; + << "波列基值" << "波形间隔" << "波形高度" << "显示刻度" << "色板" << "变密度颜色级数" << "例区高度(cm)"; for (int i = 0; i < slist.length(); i++) { if (slist.at(i) == m_propertyData[pProperty]) @@ -1381,6 +1384,11 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant QString newAliasName = variant.value(); m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); + } + else if("例区高度(cm)" == m_propertyData[pProperty]) + { + double temp = variant.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); } else if("字体" == m_propertyData[pProperty]) { @@ -1529,6 +1537,11 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant QString newAliasName = variant.value(); m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); + } + else if("例区高度(cm)" == m_propertyData[pProperty]) + { + double temp = variant.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); } else if("字体" == m_propertyData[pProperty]) { @@ -2062,6 +2075,11 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant QString newAliasName = variant.value(); m_formInfo->m_strAliasName = newAliasName; m_formInfo->update(); + } + else if("例区高度(cm)" == m_propertyData[pProperty]) + { + double temp = variant.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); } else if("显示单位" == m_propertyData[pProperty]) { @@ -3025,6 +3043,7 @@ void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOt //_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("通常", "显示单位", formInfo->m_strUnit, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); // _CreateVariantPropertyItem("刻度设置", "左刻度", formInfo->m_vmin, QVariant::Double); _CreateVariantPropertyItem("刻度设置", "右刻度", formInfo->m_vmax, QVariant::Double); @@ -3157,12 +3176,13 @@ void PropertyWidget::initHeadProperty(FormHead *formHead, QTableWidget *tableWid void PropertyWidget::initTableProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _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_lineColor, QVariant::Color); _CreateVariantPropertyItem("显示", "结论占比%", formInfo->m_nConclusionProportion, QVariant::Int); _CreateVariantPropertyItem("显示", "显示位置(cm)", formInfo->m_nShowPos, QVariant::Int); @@ -3195,7 +3215,7 @@ void PropertyWidget::loadClassifyProperty(FormInfo *formInfo) void PropertyWidget::initDepthProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String); - _CreateVariantPropertyItem("通常", "头部高度", formInfo->m_headHeight, QVariant::Double); + _CreateVariantPropertyItem("通常", "头部高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("通常", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); _CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("通常", "显示单位", formInfo->m_strUnit, QVariant::String); @@ -3376,7 +3396,7 @@ void PropertyWidget::initWaveProperty(FormInfo *formInfo, int nType) _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strLineName, QVariant::String); - //_CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_strUnit, QVariant::Double); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); QStringList lineType; lineType.append("线性"); lineType.append("对数"); @@ -3492,6 +3512,7 @@ void PropertyWidget::initJieshiItemProperty(TransparentGroupResult* tdJieshi, do void PropertyWidget::initSwallCoreProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); @@ -3521,6 +3542,8 @@ void PropertyWidget::initSwallCoreItemProperty(TransparentDraggableSwallCore* td m_strLineName = formInfo->m_strLineName; _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); @@ -3586,6 +3609,7 @@ void PropertyWidget::initSwallCoreItemProperty(TransparentDraggableSwallCore* td void PropertyWidget::initTextProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); @@ -3616,6 +3640,7 @@ void PropertyWidget::initTextItemProperty(TransparentDraggableRect* tdText, doub m_strLineName = formInfo->m_strLineName; _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); @@ -3644,6 +3669,7 @@ void PropertyWidget::initTextItemProperty(TransparentDraggableRect* tdText, doub void PropertyWidget::initLayerProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); @@ -3673,6 +3699,8 @@ void PropertyWidget::initLayerItemProperty(TransparentDraggableLayer* tdLayer, d m_strLineName = formInfo->m_strLineName; _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); @@ -3708,6 +3736,7 @@ void PropertyWidget:: initGujingProperty(FormInfo *formInfo) m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@gujingObject"); //_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); @@ -3743,9 +3772,11 @@ void PropertyWidget::initGujingItemProperty(TransparentDraggableGujing* tdGujing m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@gujingObject"); //_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); - _CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); - _CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); + _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); + _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); } @@ -3778,11 +3809,12 @@ void PropertyWidget::initImageProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String); - _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _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("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("当前项", "标注字体", formInfo->m_yxzpLabelFont, QVariant::Font); _CreateVariantPropertyItem("当前项", "标注旋转", formInfo->m_yxzpLabelRotation, QVariant::Int); @@ -3812,11 +3844,12 @@ void PropertyWidget::initImageItemProperty(TransparentDraggableImage* tdImage, d _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String); - _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _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("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("当前项", "标注字体", formInfo->m_yxzpLabelFont, QVariant::Font); _CreateVariantPropertyItem("当前项", "标注旋转", formInfo->m_yxzpLabelRotation, QVariant::Int); @@ -3848,6 +3881,7 @@ void PropertyWidget::initImageItemProperty(TransparentDraggableImage* tdImage, d void PropertyWidget::initGeoLithProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); @@ -3871,7 +3905,7 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo) void PropertyWidget::initCorePhysicsProperty(FormInfo *formInfo, bool isItem) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); - _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); @@ -3973,6 +4007,7 @@ void PropertyWidget::initTvdProperty(FormInfo *formInfo) if (!formInfo->m_pTvd) return; _CreateVariantPropertyItem("通常", "选择井斜数据", m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("通常", "显示井名", formInfo->m_strWellName, QVariant::String); @@ -4109,6 +4144,8 @@ void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoL m_strLineName = formInfo->m_strLineName; _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); @@ -4188,6 +4225,7 @@ void PropertyWidget::initJiegutextProperty(FormInfo *formInfo) m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@JiegutextObject"); //_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); @@ -4231,6 +4269,8 @@ void PropertyWidget::initJiegutextItemProperty(TransparentDraggableJiegutext* td m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@JiegutextObject"); //_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); @@ -4260,6 +4300,7 @@ void PropertyWidget::initJiegutextItemProperty(TransparentDraggableJiegutext* td void PropertyWidget::initFacProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); @@ -4276,6 +4317,7 @@ void PropertyWidget::initFacProperty(FormInfo *formInfo) void PropertyWidget::initTubingProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); @@ -4319,6 +4361,8 @@ void PropertyWidget::initTubingItemProperty(TransparentDraggableGuan* tdGuan, do m_strLineName = formInfo->m_strLineName; _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool); _CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int); @@ -4421,11 +4465,10 @@ void PropertyWidget::changedDepthProperty(QString strProperty, QVariant varVal) this->m_formInfo->m_strUnitFont = temp; this->m_formInfo->repaint(); } - else if ("头部高度" == strProperty) + else if ("头部高度(cm)" == strProperty) { - int temp = varVal.toInt(); - this->m_formInfo->m_headHeight = temp; - this->m_formInfo->setFixedHeight(temp); + double temp = varVal.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); } else if ("斜深位置" == strProperty) { @@ -4467,7 +4510,7 @@ void PropertyWidget::initCrackProperty(FormInfo *formInfo) _CreateVariantPropertyItem("数据", "井斜角曲线名", formInfo->m_crack_inclinationCurveName, QVariant::String); _CreateVariantPropertyItem("数据", "方位角曲线名", formInfo->m_crack_azimuthCurveName, QVariant::String); - _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("字体", "名称", formInfo->m_strAliasNameFont, QVariant::Font); _CreateVariantPropertyItem("字体", "刻度", formInfo->m_crack_fontScaleSize, QVariant::Font); @@ -4514,9 +4557,8 @@ void PropertyWidget::changedCrackProperty(QString strProperty, QVariant varVal) // 通常 else if ("例区高度(cm)" == strProperty) { - int temp = varVal.toInt(); - this->m_formInfo->m_headHeight = temp; - this->m_formInfo->setFixedHeight(temp); + double temp = varVal.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); this->m_formInfo->repaint(); } // 字体 @@ -4652,7 +4694,7 @@ void PropertyWidget::initPlObjectProperty(FormInfo *formInfo) _CreateVariantPropertyItem("数据", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String); _CreateVariantPropertyItem("数据", "倾角曲线", formInfo->m_pl_inclinationCurve, QVariant::String); - _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("字体", "名称", formInfo->m_strAliasNameFont, QVariant::Font); _CreateVariantPropertyItem("字体", "单位", formInfo->m_strUnitFont, QVariant::Font); @@ -4720,9 +4762,8 @@ void PropertyWidget::changedPlObjectProperty(QString strProperty, QVariant varVa } else if ("例区高度(cm)" == strProperty) { - int temp = varVal.toInt(); - this->m_formInfo->m_headHeight = temp; - this->m_formInfo->setFixedHeight(temp); + double temp = varVal.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); this->m_formInfo->repaint(); } else if ("名称" == strProperty || "曲线名称" == strProperty) @@ -4922,7 +4963,7 @@ void PropertyWidget::initRoseProperty(FormInfo *formInfo) _CreateVariantPropertyItem("数据", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String); _CreateVariantPropertyItem("数据", "倾角曲线", formInfo->m_pl_inclinationCurve, QVariant::String); - _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("表数据", "深度字段", formInfo->m_rose_depth_field, QVariant::String); _CreateVariantPropertyItem("表数据", "方位字段", formInfo->m_rose_azimuth_field, QVariant::String); @@ -4992,9 +5033,8 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal) // 通常 else if ("例区高度(cm)" == strProperty) { - int temp = varVal.toInt(); - this->m_formInfo->m_headHeight = temp; - this->m_formInfo->setFixedHeight(temp); + double temp = varVal.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); this->m_formInfo->repaint(); } // 字体 @@ -5206,6 +5246,8 @@ void PropertyWidget::initKedouProperty(FormInfo *formInfo) _CreateVariantPropertyItem("井文件名", "井文件名称", m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + QStringList listType; listType.append("曲线型数据"); listType.append("表格型数据"); @@ -5449,6 +5491,8 @@ void PropertyWidget::initGanzhuangProperty(FormInfo *formInfo) _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("井文件名", "井文件名称", m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + // _CreateVariantPropertyItem("曲线选择", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String); _CreateVariantPropertyItem("曲线选择", "倾角曲线", formInfo->m_pl_inclinationCurve, QVariant::String); @@ -5549,6 +5593,9 @@ void PropertyWidget::initJyktProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("井文件名", "井文件名称", m_strSlfName, QVariant::String); + + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + // _CreateVariantPropertyItem("曲线选择", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String); _CreateVariantPropertyItem("曲线选择", "井径差曲线", formInfo->m_pl_deltaCurve, QVariant::String); @@ -5660,6 +5707,9 @@ void PropertyWidget::initDenvProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("井文件名", "井文件名称", m_strSlfName, QVariant::String); + + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); + // _CreateVariantPropertyItem("曲线选择", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String); _CreateVariantPropertyItem("曲线选择", "井斜曲线", formInfo->m_pl_deviCurve, QVariant::String); @@ -5766,6 +5816,7 @@ void PropertyWidget::initMCalsProperty(FormInfo *formInfo) { _CreateVariantPropertyItem("曲线图名", "显示名称", formInfo->m_strAliasName, QVariant::String); + // QtVariantProperty* pItem = _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@"+m_strSlfName, VariantManager::filePathTypeId()); //m_pVariantManager->setAttribute(pItem, "filepath", m_strLineName + "@"+m_strSlfName); @@ -5773,6 +5824,7 @@ void PropertyWidget::initMCalsProperty(FormInfo *formInfo) m_pVariantManager->setAttribute(pItem, "filter", "slf.Line@@"+ m_strSlfName+"@@"+m_strWellName+"@@MCalsObject"); //_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); // _CreateVariantPropertyItem("网格图", "最小井径", formInfo->m_MinVal, QVariant::Double); @@ -5934,7 +5986,7 @@ void PropertyWidget::initDrawImageProperty(FormInfo *formInfo) _CreateVariantPropertyItem("数据", "最小值", formInfo->m_ImgMinVal, QVariant::String); _CreateVariantPropertyItem("数据", "最大值", formInfo->m_ImgMaxVal, QVariant::String); - //_CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_strUnit, QVariant::String); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); _CreateVariantPropertyItem("字体", "曲线名称", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("字体", "曲线单位", formInfo->m_strUnitFont, QVariant::Font); @@ -6003,7 +6055,7 @@ void PropertyWidget::initDcaProperty(FormInfo *formInfo) _CreateVariantPropertyItem("数据", "异常方位曲线", formInfo->m_dca_azimuth_curve, QVariant::String); _CreateVariantPropertyItem("数据", "异常幅度曲线", formInfo->m_dca_amplitude_curve, QVariant::String); // 通常 - _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int); + _CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Double); // 控制曲线 _CreateVariantPropertyItem("控制曲线", "方位曲线左刻度", formInfo->m_dca_left_azimuth_curve, QVariant::Int); _CreateVariantPropertyItem("控制曲线", "方位曲线右刻度", formInfo->m_dca_right_azimuth_curve, QVariant::Int); @@ -6039,9 +6091,8 @@ void PropertyWidget::changedDcaProperty(QString strProperty, QVariant varVal) // 通常 else if ("例区高度(cm)" == strProperty) { - int temp = varVal.toInt(); - this->m_formInfo->m_headHeight = temp; - this->m_formInfo->setFixedHeight(temp); + double temp = varVal.toDouble(); + this->m_formInfo->ChangeHeadHeight(temp); this->m_formInfo->repaint(); } // 控制曲线 diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 315c64e..b60db6b 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -75,7 +75,7 @@ FormDraw::FormDraw(QWidget *parent, QString strSlfName, QString strWellName, QSt connect(CallManage::getInstance(), SIGNAL(sig_AddDrawImage(QString, QString, QString, QString, QString, int)), this, SLOT(s_addDrawImage(QString, QString, QString, QString, QString,int))); //斜井三图一表 - connect(CallManage::getInstance(), SIGNAL(sig_AddSantuyibiao(QString, QString, QString, QString, QString, int)), this, SLOT(s_addSantuyibiao(QString, QString, QString, QString, QString,int))); + connect(CallManage::getInstance(), SIGNAL(sig_AddSantuyibiao(QString, QString, QString, QString, QString, int, QStringList)), this, SLOT(s_addSantuyibiao(QString, QString, QString, QString, QString,int, QStringList))); //裂缝 connect(CallManage::getInstance(), SIGNAL(sig_AddCrack(QString, QString, QString, QString, QString, int)), this, SLOT(s_addCrack(QString, QString, QString, QString, QString,int))); @@ -203,7 +203,7 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) pInfo->m_strUnitFont = QFont("微软雅黑", 8); } // 头部高度 - pInfo->setFixedHeight(pInfo->m_headHeight); + pInfo->setFixedHeight(pInfo->m_headHeight*g_dPixelPerCm); // 标尺颜色 curv->yAxis->setTickLabelColor(pInfo->m_sdRulerColor); // 间隔 @@ -319,7 +319,7 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) pInfo->m_strUnitFont = QFont("微软雅黑", 8); } // 通常 - pInfo->setFixedHeight(pInfo->m_headHeight); // 例区高度 + pInfo->setFixedHeight(pInfo->m_headHeight*g_dPixelPerCm); // 例区高度 this->initFgrq(curv); emit CallManage::getInstance()->sig_changePlObjectProperty(pInfo->m_strObjUuid); @@ -869,6 +869,17 @@ void FormDraw::displayImageData(QJsonObject lineObjInfo) nRotationAngle = value.toInt(); } } + // 头部高度 + double headHeight = 2.0; //2cm + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } + QString folderPath = GetLogdataPath(); folderPath = folderPath + g_prjname; strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; @@ -885,6 +896,8 @@ void FormDraw::displayImageData(QJsonObject lineObjInfo) listOtherProperty.append("0"); } listOtherProperty.append(QString::number(nRotationAngle));//旋转角度 + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty); } @@ -1030,7 +1043,16 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo) bShowColorNum = value.toBool(); } } - + // 头部高度 + double headHeight = 2.0; //2cm + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } QString folderPath = GetLogdataPath(); folderPath = folderPath + g_prjname; @@ -1102,6 +1124,8 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo) else{ listOtherProperty.append("0"); } + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); //结论 this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty); @@ -1192,6 +1216,16 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo) nRotationAngle = value.toInt(); } } + // 头部高度 + double headHeight = 2.0; //2cm + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } // double dOilZhan = 8; //含油占比 @@ -1321,6 +1355,8 @@ void FormDraw::DisplayGujing_One(QJsonObject lineObjInfo) else{ listOtherProperty.append("0"); } + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); //结论 this->addGujing(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty); @@ -1539,6 +1575,16 @@ void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo) { lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); } + // 头部高度 + double headHeight = 2.0; //2cm + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } QString folderPath = GetLogdataPath(); folderPath = folderPath + g_prjname; @@ -1550,6 +1596,8 @@ void FormDraw::DisplayJiegutext_One(QJsonObject lineObjInfo) listOtherProperty.append(strAliasName);//别名 listOtherProperty.append(lineColor.name());//名称颜色 listOtherProperty.append(curveNameFont.toString());//名称字体 + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); //气测/FMT/射孔/文本 this->s_addJiegutext(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty); // } @@ -1622,6 +1670,17 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo) lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); } + // 头部高度 + double headHeight = 2.0; //2cm + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } + //沉积相 bool bDrawFac = true; // 绘制相 bool bDrawPhase = true; // 绘制亚相 @@ -1683,6 +1742,9 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo) else{ listOtherProperty.append("0"); } + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); + //沉积相 this->s_addLogface(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty); // } @@ -1781,8 +1843,18 @@ void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo) nRotationAngle = value.toInt(); } } + // 头部高度 + double headHeight = 2.0; //2cm + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } - //套管組件 + //套管组件 bool bDrawStruct_Tubing = true; //绘制结构 bool bDrawTubing_Tubing = true; //绘制管柱 bool bDrawTools_Tubing = true; //绘制工具 @@ -1947,7 +2019,10 @@ void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo) // listOtherProperty.append(QString::number(newLeftScale));//左刻度 listOtherProperty.append(QString::number(newRightScale));//右刻度 - //套管組件 + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); + + //套管组件 this->s_addTubingstring(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty); // } } @@ -2018,13 +2093,29 @@ void FormDraw::DisplayTvd_One(QJsonObject lineObjInfo) { lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); } + + // 头部高度 + double headHeight = 2.0; //2cm + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } + QString folderPath = GetLogdataPath(); folderPath = folderPath + g_prjname; strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; + QStringList listOtherProperty; + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); + if (strLineName != "") { - FormLine* pFormL = this->s_addSantuyibiao(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0); + FormLine* pFormL = this->s_addSantuyibiao(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty); if (pFormL && pFormL->m_drawTvd) { GetTvdProperty(pFormL->m_drawTvd, lineObjInfo); @@ -2670,6 +2761,8 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) QString strOtherScaleType;//其他目标曲线,刻度类型(线性,对数) QColor frontColor(0, 0, 0);//岩性前景色 QColor backColor(255, 255, 255);//岩性背景色 + // 头部高度 + double headHeight = 2.0; //2cm if (lineObjInfo.contains("SlfName")) { @@ -2785,6 +2878,14 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) { lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); } + //FormInfo高度 + if (lineObjInfo.contains("headHeight")) + { + QJsonValue value = lineObjInfo.value("headHeight"); + if (value.isDouble()) { + headHeight = value.toDouble(); + } + } // bool bDrawLine = true; // 曲线 @@ -2877,6 +2978,8 @@ void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) } // listOtherProperty.append(QString::number(pointStyle)); + //FormInfo高度 + listOtherProperty.append(QString::number(headHeight)); //新建曲线 s_AddLine_Property(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, @@ -4263,7 +4366,7 @@ void FormDraw::s_addDrawImage(QString strUuid, QString strSlfName, QString strWe } //斜井三图一表 -FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW) +FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW, QStringList listOtherProperty) { //井名&道名不一致 if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName) @@ -4322,7 +4425,7 @@ FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QStrin double width=2; QString strScaleType = ""; //道-对象 - m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "SantuyibiaoObject"); + m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "SantuyibiaoObject", listOtherProperty); emit CallManage::getInstance()->sig_ChangeTvdProperty(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, "Santuyibiao", (QObject *)(curv->m_drawTvd)); diff --git a/logPlus/formdraw.h b/logPlus/formdraw.h index 8052902..31109a5 100644 --- a/logPlus/formdraw.h +++ b/logPlus/formdraw.h @@ -282,7 +282,7 @@ public slots: //图像 成像 void s_addDrawImage(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); //斜井三图一表 - FormLine* s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); + FormLine* s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW, QStringList listOtherProperty); // 裂缝 void s_addCrack(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); diff --git a/logPlus/forminfo.cpp b/logPlus/forminfo.cpp index b1cd004..8ea03f0 100644 --- a/logPlus/forminfo.cpp +++ b/logPlus/forminfo.cpp @@ -13,6 +13,9 @@ #include "DrawTvd.h" #include "formwave.h" #include "formimage.h" +#include "formtrack.h" + +extern double g_dPixelPerCm;//每厘米像素数 //曲线名称(单个) FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor) : @@ -20,6 +23,8 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt ui(new Ui::FormInfo) { ui->setupUi(this); + m_parent = parent; + // setAcceptDrops(true); @@ -165,6 +170,8 @@ void FormInfo::initProperty_Kedou(QJsonObject obj) this->m_strUnitFont.fromString(obj["m_strUnitFont"].toString()); // 刻度 this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); + // 头部高度 + this->m_headHeight = obj["headHeight"].toDouble(); // 数据类型选择 this->m_pl_dataType = obj["m_pl_dataType"].toInt(); // 数据类型 @@ -248,6 +255,8 @@ void FormInfo::initProperty_Ganzhuang(QJsonObject obj) // 字体 // 名称 this->m_curveNameFont.fromString(obj["curveNameFont"].toString()); + // 头部高度 + this->m_headHeight = obj["headHeight"].toDouble(); // 曲线选择 this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线 @@ -309,6 +318,8 @@ void FormInfo::initProperty_Jykt(QJsonObject obj) // 刻度 this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); + // 头部高度 + this->m_headHeight = obj["headHeight"].toDouble(); // 曲线选择 this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线 @@ -369,6 +380,8 @@ void FormInfo::initProperty_Denv(QJsonObject obj) this->m_strUnitFont.fromString(obj["m_strUnitFont"].toString()); // 刻度 this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); + // 头部高度 + this->m_headHeight = obj["headHeight"].toDouble(); // 曲线选择 this->m_pl_azimuthCurve = obj["m_pl_azimuthCurve"].toString(); // 方位曲线 @@ -423,6 +436,8 @@ void FormInfo::initProperty_MCals(QJsonObject obj) this->m_strUnitFont.fromString(obj["m_strUnitFont"].toString()); // 刻度 this->m_pl_fontScale.fromString(obj["m_pl_fontScale"].toString()); + // 头部高度 + this->m_headHeight = obj["headHeight"].toDouble(); m_MinVal = obj["m_MinVal"].toDouble();//最小井径 m_MaxVal = obj["m_MaxVal"].toDouble();//最大井径 @@ -445,9 +460,15 @@ void FormInfo::initProperty_MCals(QJsonObject obj) void FormInfo::initProperty(QJsonObject obj) { + if(obj.isEmpty()) + { + return; + } m_vmin = obj.value("vmin").toDouble(); m_vmax = obj.value("vmax").toDouble(); m_strUnit = obj.value("Unit").toString(); + // 头部高度 + this->m_headHeight = obj["headHeight"].toDouble(); QString strType = obj.value("Type").toString(); if ("waveObject" == strType) @@ -470,7 +491,7 @@ void FormInfo::initProperty(QJsonObject obj) { m_bVerticaDrawing = obj["bVerticaDrawing"].toBool(); // 垂向绘制 m_nRotationAngle = obj["nRotationAngle"].toInt(); // 旋转角度 - m_headHeight = obj["headHeight"].toInt(); + m_headHeight = obj["headHeight"].toDouble(); m_strUnit = obj["strUnit"].toString(); // 单位 { QStringList fontParts = obj["curveNameFont"].toString().split(","); // 按逗号拆分 @@ -486,7 +507,6 @@ void FormInfo::initProperty(QJsonObject obj) m_strUnitFont.setPointSize(fontParts[1].toInt()); // 设置字号 } } - m_headHeight = obj["headHeight"].toInt(); m_sdRulerColor = obj["sdRulerColor"].toString(); // 标尺颜色 m_sdInterval = obj["sdInterval"].toDouble(); // 间隔 // 标注字体 @@ -596,7 +616,7 @@ void FormInfo::initProperty(QJsonObject obj) this->m_dca_azimuth_curve = obj["m_dca_azimuth_curve"].toString(); this->m_dca_amplitude_curve = obj["m_dca_amplitude_curve"].toString(); // 通常 - this->m_headHeight = obj["m_headHeight"].toInt(); // 例区高度 + this->m_headHeight = obj["m_headHeight"].toDouble(); // 例区高度 // 控制曲线 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(); @@ -623,7 +643,7 @@ void FormInfo::initProperty(QJsonObject obj) if ("plObject" == strType || "roseObject" == strType || "CrackObject" == strType) { // 通常 - this->m_headHeight = obj["m_headHeight"].toInt(); // 例区高度 + this->m_headHeight = obj["m_headHeight"].toDouble(); // 例区高度 // 分类 this->m_pl_highGap = obj["m_pl_highGap"].toBool(); // 高导缝 this->m_pl_highReservoir = obj["m_pl_highReservoir"].toBool(); // 高阻缝 @@ -708,6 +728,7 @@ QJsonObject FormInfo::makeJson() // rootObj["TrackName"] = m_strTrackName; rootObj["LineName"] = m_strLineName; rootObj["AliasName"] = m_strAliasName; + rootObj["headHeight"] = m_headHeight; // rootObj["Type"] = m_strType; rootObj["curveNameFont"] = m_curveNameFont.toString(); @@ -2800,6 +2821,11 @@ bool FormInfo::setInfoProperty(QString strProName, QVariant val, QString strGp) m_pImage->setSchemIndex(this->m_nSchemeIndex); } } + else if ("例区高度(cm)" == strProName) + { + double temp = val.toDouble(); + ChangeHeadHeight(temp); + } // else if ("背景值" == strProName) // { // @@ -3114,6 +3140,8 @@ void FormInfo::onDeleteCurv() { //删除曲线 emit CallManage::getInstance()->sig_delLine(m_strUuid, m_strWellName, m_strTrackName, m_strLineName); + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //表格查看 @@ -3126,6 +3154,8 @@ void FormInfo::onDeleteTable() { //删除表格 emit CallManage::getInstance()->sig_delTableLine(m_strUuid, m_strWellName, m_strTrackName, m_strLineName); + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //波列查看 @@ -3138,6 +3168,8 @@ void FormInfo::onDeleteWave() { //删除Wave emit CallManage::getInstance()->sig_delWave(m_strUuid, m_strWellName, m_strTrackName, m_strLineName); + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //黑白图 @@ -3154,3 +3186,17 @@ void FormInfo::s_changeBlack(QString strUuid, bool bBlack) m_bBlack = bBlack; update(); } + +//修改FormInfo高度 +void FormInfo::ChangeHeadHeight(double headHeight) +{ + m_headHeight = headHeight; + setFixedHeight(m_headHeight * g_dPixelPerCm); + repaint(); + + FormTrack *parent = (FormTrack *)m_parent; + parent->ChangeHeadHeight(m_strLineName, headHeight); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); +} diff --git a/logPlus/forminfo.h b/logPlus/forminfo.h index 6e53ae4..cde8076 100644 --- a/logPlus/forminfo.h +++ b/logPlus/forminfo.h @@ -124,7 +124,8 @@ public: QString m_strUnit = "(米)";//单位 QFont m_strUnitFont = QFont("微软雅黑", 8);//单位字体 // 头部高度 - int m_headHeight = 100; + double m_headHeight = 2.0; //2cm + QWidget *m_parent; bool m_bVerticaDrawing = false; // 垂向绘制 int m_nRotationAngle = 0; // 旋转角度 @@ -439,12 +440,6 @@ public: int m_dca_right_azimuth_curve = 360; // 方位曲线右刻度 int m_dca_maximum_amplitude = 5000; // 最大异常幅度 - - - - - - //多臂井径 float m_MinVal = 30; //最小井径 float m_MaxVal = 65; //最大井径 @@ -499,6 +494,9 @@ public: //右键菜单响应函数 virtual void contextMenuEvent(QContextMenuEvent *event); + //FormInfo高度 + void ChangeHeadHeight(double headHeight); + private: QPoint startPosition; diff --git a/logPlus/formtrack.cpp b/logPlus/formtrack.cpp index d313e00..4605a00 100644 --- a/logPlus/formtrack.cpp +++ b/logPlus/formtrack.cpp @@ -6,6 +6,7 @@ #include "formwell.h" extern int g_iOneWidth; //道宽 +extern double g_dPixelPerCm;//每厘米像素数 //曲线名称栏(表格) FormTrack::FormTrack(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName) : @@ -89,8 +90,8 @@ FormTrack::FormTrack(QWidget *parent, QString strSlfName, QString strWellName, Q this, SLOT(s_addCrack(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QString))); //斜井三图一表 - connect(this, SIGNAL(sig_AddSantuyibiao(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)), - this, SLOT(s_addSantuyibiao(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString))); + connect(this, SIGNAL(sig_AddSantuyibiao(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)), + this, SLOT(s_addSantuyibiao(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList))); //气测/FMT/射孔/文本 connect(this, SIGNAL(sig_AddJiegutext(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)), @@ -304,7 +305,7 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam } else if(strType=="SantuyibiaoObject") { - emit sig_AddSantuyibiao(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType); + emit sig_AddSantuyibiao(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty); } else if(strType=="JiegutextObject") { @@ -381,9 +382,12 @@ FormInfo* FormTrack::AddKedouAndOthers(QString strSlfName, QString strWellName, formInfo->setBackColor(QColor(255,255,255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); return formInfo; } @@ -411,9 +415,11 @@ FormInfo* FormTrack::AddMCals(QString strSlfName, QString strWellName, QString s formInfo->setBackColor(QColor(255,255,255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); // ui->tableWidget->setCellWidget(row, 0, formInfo); + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); return formInfo; } @@ -465,7 +471,7 @@ FormInfo* FormTrack::setDrawDt(QStringList listdt, QJsonObject obj) //曲线信息栏 FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, m_strTrackName, strLineName, lineColor); m_formInfo = formInfo; - formInfo->initProperty(obj); + formInfo->initProperty(obj);//JSon数据解释属性 formInfo->m_strUuid = m_strUuid; formInfo->m_strTrackUuid = m_strTrackUuid; formInfo->m_strAliasName = strAliasName; @@ -474,11 +480,13 @@ FormInfo* FormTrack::setDrawDt(QStringList listdt, QJsonObject obj) formInfo->m_nJg = 2; formInfo->setLineWidth(width); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); return formInfo; } @@ -563,25 +571,20 @@ void FormTrack::s_addLine(QString strSlfName, QString strWellName, QString strTr pointStyle = (QCPScatterStyle::ScatterShape)listOtherProperty[7].toInt(); formInfo->m_pointStyle = pointStyle; } + if(listOtherProperty.size()>=9) + { + formInfo->m_headHeight = listOtherProperty[8].toDouble(); + } //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); - - //------------------------------------ -// QFont font("微软雅黑", 10, QFont::Bold, false); -// // -// QTableWidgetItem* item = new QTableWidgetItem(strLineName); -// item->setFlags(item->flags() & (~Qt::ItemIsEditable)); -// item->setForeground(QBrush(lineColor));// 设置字体颜色 -// item->setFont(font); // 应用新的字体 -// item->setTextAlignment(Qt::AlignCenter);//居中 -// // -// ui->tableWidget->setItem(row, 0, item); + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName) @@ -679,12 +682,14 @@ void FormTrack::s_addWave(QString strSlfName, QString strWellName, QString strTr formInfo->m_fMaxAmp = 1023.0f; //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_delWave(QString strUuid, QString strWellName, QString strTrackName, QString strLineName) @@ -855,7 +860,10 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString formInfo->m_bShowColorNum = false; } } - + } + if(listOtherProperty.size()>=13) + { + formInfo->m_headHeight = listOtherProperty[12].toDouble(); } } @@ -865,8 +873,8 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString { formInfo->m_strSlfName = listOtherProperty[0]; // 例区高度 - formInfo->m_headHeight = listOtherProperty[1].toInt(); - formInfo->setFixedHeight(formInfo->m_headHeight); + formInfo->m_headHeight = listOtherProperty[1].toDouble(); + formInfo->setFixedHeight(formInfo->m_headHeight*g_dPixelPerCm); // 旋转角度 formInfo->m_nRotationAngle = listOtherProperty[2].toInt(); // 显示名称 @@ -991,14 +999,20 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString if(strLineName == "IMAGE_DATA") { -\ + if(listOtherProperty.size()>=6) + { + formInfo->m_headHeight = listOtherProperty[5].toDouble(); + } } //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //固井 @@ -1048,13 +1062,20 @@ void FormTrack::s_AddGujing(QString strSlfName, QString strWellName, QString str // formInfo->m_nRotationAngle = listOtherProperty[4].toInt(); } + if(listOtherProperty.size()>=6) + { + formInfo->m_headHeight = listOtherProperty[5].toDouble(); + } //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) @@ -1083,11 +1104,14 @@ void FormTrack::s_addDepth(QString strSlfName, QString strWellName, QString strT formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_addYanXinImage(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) @@ -1116,11 +1140,14 @@ void FormTrack::s_addYanXinImage(QString strSlfName, QString strWellName, QStrin formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_addDrawImage(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) @@ -1149,15 +1176,18 @@ void FormTrack::s_addDrawImage(QString strSlfName, QString strWellName, QString formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //斜井三图一表 -void FormTrack::s_addSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) +void FormTrack::s_addSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty) { qDebug() << "FormTrack s_addSantuyibiao"; @@ -1182,12 +1212,19 @@ void FormTrack::s_addSantuyibiao(QString strSlfName, QString strWellName, QStrin formInfo->setVMin(vmin); formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); + if(listOtherProperty.size()>=1) + { + formInfo->m_headHeight = listOtherProperty[0].toDouble(); + } //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_addCrack(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strObjUuid) @@ -1220,11 +1257,14 @@ void FormTrack::s_addCrack(QString strSlfName, QString strWellName, QString strT formInfo->m_strObjUuid = strObjUuid; } //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_addJiegutext(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty) @@ -1259,12 +1299,20 @@ void FormTrack::s_addJiegutext(QString strSlfName, QString strWellName, QString curveNameFont.fromString(listOtherProperty[2]); formInfo->m_curveNameFont = curveNameFont; } + if(listOtherProperty.size()>=4) + { + formInfo->m_headHeight = listOtherProperty[3].toDouble(); + } + //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //沉积相 @@ -1330,12 +1378,20 @@ void FormTrack::s_addLogface(QString strSlfName, QString strWellName, QString st formInfo->m_bDrawMFacName = false; } } + // 头部高度 + if(listOtherProperty.size()>=7) + { + formInfo->m_headHeight = listOtherProperty[6].toDouble(); + } //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //多臂井径 @@ -1365,11 +1421,14 @@ void FormTrack::s_addMCals(QString strSlfName, QString strWellName, QString strT formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //套管 @@ -1468,12 +1527,20 @@ void FormTrack::s_addTubingstring(QString strSlfName, QString strWellName, QStri formInfo->m_inD_Tubing = listOtherProperty[12].toDouble(); formInfo->m_OutD_Tubing = listOtherProperty[13].toDouble(); } + // 头部高度 + if(listOtherProperty.size()>=15) + { + formInfo->m_headHeight = listOtherProperty[14].toDouble(); + } //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_addTDT(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) @@ -1502,11 +1569,14 @@ void FormTrack::s_addTDT(QString strSlfName, QString strWellName, QString strTra formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); //单元格委托 //ui->tableWidget->setItemDelegateForRow(row, m_delegate); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void FormTrack::s_addLogMud(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) @@ -1535,9 +1605,12 @@ void FormTrack::s_addLogMud(QString strSlfName, QString strWellName, QString str formInfo->setFrontColor(QColor(0, 0, 0)); formInfo->setBackColor(QColor(255, 255, 255)); //设置高度 - ui->tableWidget->setRowHeight(row, 100); + ui->tableWidget->setRowHeight(row, formInfo->m_headHeight * g_dPixelPerCm); // ui->tableWidget->setCellWidget(row, 0, formInfo); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } //展开FormIndo后,获取真正的高度最大值 @@ -1554,7 +1627,7 @@ void FormTrack::getTableSize_Head_Biggest(int &iHight) FormInfo *formInfo = qobject_cast(myWidget);//获得widget if(formInfo) { - iHight += formInfo->m_headHeight; + iHight += formInfo->m_headHeight * g_dPixelPerCm; } } } @@ -1626,3 +1699,28 @@ QStringList FormTrack::getLineList(QString strWellName, QString strTrackName) } return listLine; } + + +//修改FormInfo高度 +void FormTrack::ChangeHeadHeight(QString strLineName, double headHeight) +{ + // + int rowCount = ui->tableWidget->rowCount(); + for(int i=0; itableWidget->cellWidget(i, 0) != nullptr ) + { + auto myWidget = ui->tableWidget->cellWidget(i, 0); + // + FormInfo *formInfo = (FormInfo*)myWidget;//获得widget + if(formInfo) + { + if(formInfo->m_strLineName==strLineName) + { + ui->tableWidget->setRowHeight(i, headHeight * g_dPixelPerCm); + break; + } + } + } + } +} diff --git a/logPlus/formtrack.h b/logPlus/formtrack.h index f0a7091..b607c16 100644 --- a/logPlus/formtrack.h +++ b/logPlus/formtrack.h @@ -28,6 +28,10 @@ public: QString strTrackName, QString strLineName); FormInfo* getFormInfoByParametersObjUuid(QString strObjUuid); + + //修改FormInfo高度 + void ChangeHeadHeight(QString strLineName, double headHeight); + private: Ui::FormTrack *ui; @@ -70,7 +74,7 @@ signals: void sig_AddDenv(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void sig_AddYanXinImage(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void sig_AddDrawImage(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); - void sig_AddSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); + void sig_AddSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); void sig_AddCrack(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strObjUuid); void sig_AddJiegutext(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); void sig_AddGujing(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); @@ -92,7 +96,7 @@ public slots: void s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void s_addYanXinImage(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void s_addDrawImage(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); - void s_addSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); + void s_addSantuyibiao(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); void s_addCrack(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strObjUuid); void s_addJiegutext(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); void s_AddGujing(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); diff --git a/logPlus/formwell.cpp b/logPlus/formwell.cpp index 70f8728..0065c5b 100644 --- a/logPlus/formwell.cpp +++ b/logPlus/formwell.cpp @@ -317,6 +317,18 @@ QVector FormWell::new_track(QStringList listdt, QString strTrackName) listCond << "1.2"; emit CallManage::getInstance()->sig_changeTrackProperty(listCond); } + + if(strType=="SantuyibiaoObject") + { + QVariantList listCond; + listCond << strUuid; + listCond << strSlfName; + listCond << strWellName; + listCond << columnCount; + listCond << "道宽(cm)"; + listCond << QString::number(dW); + emit CallManage::getInstance()->sig_changeTrackProperty(listCond); + } return vec; } @@ -1030,6 +1042,9 @@ void FormWell::slotDeleteSelectTrack() //取消所有选中单元格 emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, ""); + + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } } diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 93ee770..05d17ed 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -178,6 +178,9 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) : //执行压缩/拉伸 connect(CallManage::getInstance(), SIGNAL(sig_EShiftDepth(QString, QString, int, QList, QList)), this, SLOT(s_EShiftDepth(QString, QString, int, QList, QList))); + //重新设置滚动条范围(头) + connect(CallManage::getInstance(), SIGNAL(sig_setRangeVScrollBar2(QString)), this, SLOT(s_setRangeVScrollBar2(QString))); + //图头---------- m_dock1=new QDockWidget(tr(""),this); m_dock1->setFeatures(QDockWidget::NoDockWidgetFeatures);//QDockWidget::DockWidgetMovable @@ -251,6 +254,22 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) : }); } +void MainWindowCurve::s_setRangeVScrollBar2(QString strUuid) +{ + if(strUuid != m_strUuid) + { + return; + } + + //自定义滚动条(头) + int iTableSize_Head_Biggest = 0; + getTableSize_Head_Biggest(iTableSize_Head_Biggest); + //int iTableWellTrack_height_Biggest = ui->tableWidget_2->rowHeight(0) + (5) + iTableSize_Head_Biggest -1; + + ui->verticalScrollBar_2->setRange(0, iTableSize_Head_Biggest-100-100); + ui->verticalScrollBar_2->setValue(0); +} + //2个滚动条位置 void MainWindowCurve::SetScrollBar_Geometry() { @@ -5904,6 +5923,8 @@ void MainWindowCurve::slotDeleteSelectWell() } //resizeWindow(); } + //重新设置滚动条范围 + emit CallManage::getInstance()->sig_setRangeVScrollBar2(m_strUuid); } void MainWindowCurve::getTableSize_Head(int &iHight) diff --git a/logPlus/mainwindowcurve.h b/logPlus/mainwindowcurve.h index 11e3e73..e40fd0e 100644 --- a/logPlus/mainwindowcurve.h +++ b/logPlus/mainwindowcurve.h @@ -221,6 +221,9 @@ public slots: void slotDeleteSelectWell(); void slotRefreshWell();//刷新井数据 + //重新设置滚动条范围 + void s_setRangeVScrollBar2(QString strUuid); + public: QAction* m_selectWellAc = nullptr; //选择井 QAction* m_fixwellsectionHeaderAc = nullptr; //锁头