From f0796b8c488935c6be814ae7f38709f8dd4ac601 Mon Sep 17 00:00:00 2001 From: "DESKTOP-450PEFP\\mainc" Date: Mon, 25 May 2026 16:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=20//=20=E9=A2=91=E7=8E=87=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=9B=BE,=20=E6=95=B4=E7=90=86=E5=B1=9E=E6=80=A7=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E9=BB=91=E7=99=BD=E5=9B=BE=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=20=20//=20=E7=8E=AB=E7=91=B0=E5=9B=BE,=20=E6=95=B4=E7=90=86?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=80=BB=E8=BE=91=EF=BC=8C=E9=BB=91=E7=99=BD?= =?UTF-8?q?=E5=9B=BE=E5=AE=9E=E7=8E=B0=20=20//=20=E8=A3=82=E7=BC=9D,=20?= =?UTF-8?q?=E6=95=B4=E7=90=86=E5=B1=9E=E6=80=A7=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E9=BB=91=E7=99=BD=E5=9B=BE=E5=AE=9E=E7=8E=B0=20=20//=20?= =?UTF-8?q?=E5=B2=A9=E5=BF=83=E5=88=86=E6=9E=90,=20=E6=95=B4=E7=90=86?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=80=BB=E8=BE=91=EF=BC=8C=E9=BB=91=E7=99=BD?= =?UTF-8?q?=E5=9B=BE=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/CallManage.h | 6 +- logPlus/PickFrac.cpp | 27 +++- logPlus/PickFrac.h | 3 +- logPlus/PropertyWidget.cpp | 125 +--------------- logPlus/TransparentDraggableResult.cpp | 28 ++-- logPlus/TransparentDraggableResult.h | 5 + logPlus/TransparentGroupResult.cpp | 18 +++ logPlus/TransparentGroupResult.h | 4 +- logPlus/formdraw.cpp | 131 +++++------------ logPlus/forminfo.cpp | 189 +++++++++++++++++++++---- logPlus/forminfo.h | 11 ++ logPlus/formtrack.cpp | 75 +++++++--- logPlus/formtrack.h | 18 ++- logPlus/logplus.vcxproj | 2 - logPlus/logplus.vcxproj.filters | 6 - logPlus/qmycustomplot.cpp | 105 ++++++++++++-- logPlus/qmycustomplot.h | 9 +- 17 files changed, 459 insertions(+), 303 deletions(-) diff --git a/logPlus/CallManage.h b/logPlus/CallManage.h index 69fbbf2..47d7012 100644 --- a/logPlus/CallManage.h +++ b/logPlus/CallManage.h @@ -218,11 +218,11 @@ signals: void sig_changeDepthProperty(QVariantList vlist); // 改变裂缝属性 - void sig_changeCrackProperty(QVariantMap variantMap); + void sig_changeCrackProperty(QString strObjUuid); // 改变频率统计图属性 - void sig_changePlObjectProperty(QVariantMap variantMap); + void sig_changePlObjectProperty(QString strObjUuid);// QVariantMap variantMap); // 改变玫瑰图属性 - void sig_changeRoseProperty(QVariantMap variantMap); + void sig_changeRoseProperty(QString strObjUuid); // 改变裂缝DCA分析属性 void sig_changeDcaProperty(QVariantMap variantMap); diff --git a/logPlus/PickFrac.cpp b/logPlus/PickFrac.cpp index 9fa6abf..e7eaae2 100644 --- a/logPlus/PickFrac.cpp +++ b/logPlus/PickFrac.cpp @@ -13,6 +13,7 @@ #include "qmycustomplot.h" #include "geometryutils.h" +#pragma execution_character_set("utf-8") // ==================== CPickFrac 实现 ==================== CPickFrac::CPickFrac(QMyCustomPlot *myCustomPlot, QString strSlfName, QString csCurve, int iMyWidth) : m_myCustomPlot(myCustomPlot), m_iMyWidth(iMyWidth) @@ -56,7 +57,7 @@ void CPickFrac::ReadFracDef() if (qs.length() < 8) break; sscanf(str, "%d %s %d %d %d %d %d", &fd.iCode, name, &fd.iType, &r, &g, &b, &fd.nLineWidth); fd.crColor = QColor(r, g, b); - fd.csName = QString::fromLocal8Bit(name); + fd.csName = GBKToUTF8(name);// QString::fromLocal8Bit(name); fd.csName = fd.csName.trimmed(); fd.bDraw = 0; m_FracDef.append(fd); @@ -265,6 +266,21 @@ void DraggableCrackItem::cleanupFromPlot() } } +void DraggableCrackItem::setColor(QColor cr) +{ + if (m_type == TypeA_Sine) { + if (m_curve) m_curve->setPen(QPen(cr, m_lineWidth)); + } + else if (m_type == TypeB_Polyline) { + for (auto &item : m_lines) { + if (item.line) item.line->setPen(QPen(cr, m_lineWidth)); + } + } + else if (m_type == TypeC_Closed) { + if (m_curveC) m_curveC->setPen(QPen(cr, m_lineWidth)); + } +} + void DraggableCrackItem::setShow(bool flag) { setVisible(flag); @@ -1303,3 +1319,12 @@ void CPickFrac::setShowHide(QString names, int nameShow, int angleShow, int digi m_myCustomPlot->replot(); } +bool CPickFrac::setBlackColor(bool bbk) +{ + for (DraggableCrackItem* item : m_items) + { + item->setColor(bbk ? Qt::black : Qt::red); + } + return true; +} + diff --git a/logPlus/PickFrac.h b/logPlus/PickFrac.h index eeb7724..13cfb55 100644 --- a/logPlus/PickFrac.h +++ b/logPlus/PickFrac.h @@ -68,7 +68,7 @@ public: bool saveToFile(); bool createNewCrack(double depth, QString type); void setShowHide(QString names, int nameShow, int angleShow, int digitCapacity); - + bool setBlackColor(bool bbk); public: QMyCustomPlot *m_myCustomPlot; int m_iMyWidth = 0; @@ -128,6 +128,7 @@ public: void cleanupFromPlot(); // 立即从画布移除所有图形项 + void setColor(QColor cr); void setShow(bool flag); QString csName; float DIPorS; diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index ce7a6dd..7f014a9 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -262,6 +262,8 @@ void PropertyWidget::changedYxzpItemProperty(QtProperty *qtProperty, const QVari void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QVariant &variant, bool isItem) { + QVariantMap variantMap; + variantMap["ObjUuid"] = m_formInfo->m_strObjUuid; if("曲线名称" == m_propertyData[qtProperty]) { QFont newFont = variant.value(); @@ -279,7 +281,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV int temp = variant.toInt(); this->m_formInfo->m_cp_lineWidth = temp; - QVariantMap variantMap; variantMap["lineWidth"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -288,7 +289,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV QColor temp = variant.value(); this->m_formInfo->m_cp_lineColor = temp; - QVariantMap variantMap; variantMap["lineColor"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -327,7 +327,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV } this->m_formInfo->m_cp_lineStyle = newStyle; - QVariantMap variantMap; variantMap["lineStyle"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -336,7 +335,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV bool temp = variant.toBool(); this->m_formInfo->m_cp_drawAsBar = temp; - QVariantMap variantMap; variantMap["drawAsBar"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -345,7 +343,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV bool temp = variant.toBool(); this->m_formInfo->m_cp_leftBoundary = temp; - QVariantMap variantMap; variantMap["leftBoundary"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -354,7 +351,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV bool temp = variant.toBool(); this->m_formInfo->m_cp_skipZeroInvalidValues = temp; - QVariantMap variantMap; variantMap["skipZeroInvalidValues"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -363,7 +359,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV bool temp = variant.toBool(); this->m_formInfo->m_cp_drawEnvelope = temp; - QVariantMap variantMap; variantMap["drawEnvelope"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -372,7 +367,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV bool temp = variant.toBool(); this->m_formInfo->m_cp_drawAsDot = temp; - QVariantMap variantMap; variantMap["drawAsDot"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -402,7 +396,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV } this->m_formInfo->m_cp_symbolType = newStyle; - QVariantMap variantMap; variantMap["symbolType"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -411,7 +404,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV QColor temp = variant.value(); this->m_formInfo->m_cp_symbolBorderColor = temp; - QVariantMap variantMap; variantMap["symbolBorderColor"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -420,7 +412,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV int temp = variant.toInt(); this->m_formInfo->m_cp_symbolSize = temp; - QVariantMap variantMap; variantMap["symbolSize"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -429,7 +420,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV QColor temp = variant.value(); this->m_formInfo->m_cp_symbolFillColor = temp; - QVariantMap variantMap; variantMap["symbolFillColor"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -467,7 +457,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV this->m_formInfo->m_cp_leftScale = temp; this->m_formInfo->repaint(); - QVariantMap variantMap; variantMap["leftScale"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -477,7 +466,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV this->m_formInfo->m_cp_rightScale = temp; this->m_formInfo->repaint(); - QVariantMap variantMap; variantMap["rightScale"] = temp; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); } @@ -510,7 +498,6 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV } this->m_formInfo->m_cp_scaleType = newStyle; - QVariantMap variantMap; variantMap["scaleType"] = newStyle; emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); // this->m_tdCorePhysics->setCpScaleType(newStyle); @@ -4647,38 +4634,7 @@ void PropertyWidget::changedCrackProperty(QString strProperty, QVariant varVal) if(flag) { - QVariantMap variantMap; - // 必须用来判断当前道 - variantMap["m_strTrackName"] = this->m_formInfo->m_strTrackName; - // 数据 - variantMap["m_crack_drawName"] = this->m_formInfo->m_crack_drawName; - variantMap["m_crack_drawAngle"] = this->m_formInfo->m_crack_drawAngle; - // 显示控制 - variantMap["m_crack_decimal_digits"] = this->m_formInfo->m_crack_decimal_digits; - // 分类 - variantMap["m_pl_highGap"] = this->m_formInfo->m_pl_highGap; - variantMap["m_pl_highReservoir"] = this->m_formInfo->m_pl_highReservoir; - variantMap["m_pl_reticularFracture"] = this->m_formInfo->m_pl_reticularFracture; - variantMap["m_pl_inducedFracture"] = this->m_formInfo->m_pl_inducedFracture; - variantMap["m_pl_bedLayer"] = this->m_formInfo->m_pl_bedLayer; - variantMap["m_pl_erosionSurface"] = this->m_formInfo->m_pl_erosionSurface; - variantMap["m_pl_pore"] = this->m_formInfo->m_pl_pore; - variantMap["m_pl_vesicle"] = this->m_formInfo->m_pl_vesicle; - variantMap["m_pl_gravel"] = this->m_formInfo->m_pl_gravel; - variantMap["m_pl_nodule"] = this->m_formInfo->m_pl_nodule; - variantMap["m_pl_lumps"] = this->m_formInfo->m_pl_lumps; - variantMap["m_pl_fault"] = this->m_formInfo->m_pl_fault; - variantMap["m_pl_verticalFracture"] = this->m_formInfo->m_pl_verticalFracture; - variantMap["m_pl_custom1"] = this->m_formInfo->m_pl_custom1; - variantMap["m_pl_custom2"] = this->m_formInfo->m_pl_custom2; - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - - emit CallManage::getInstance()->sig_changeCrackProperty(variantMap); + emit CallManage::getInstance()->sig_changeCrackProperty(this->m_formInfo->m_strObjUuid); } } @@ -4949,41 +4905,7 @@ void PropertyWidget::changedPlObjectProperty(QString strProperty, QVariant varVa if(flag) { - QVariantMap variantMap; - // 必须用来判断当前道 - variantMap["m_strTrackName"] = this->m_formInfo->m_strTrackName; - // 数据 - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - variantMap["m_pl_azimuthCurve"] = this->m_formInfo->m_pl_azimuthCurve; - variantMap["m_pl_inclinationCurve"] = this->m_formInfo->m_pl_inclinationCurve; - // 控制曲线 - variantMap["m_pl_controlCurveName"] = this->m_formInfo->m_pl_controlCurveName; - variantMap["m_pl_controlMinValue"] = this->m_formInfo->m_pl_controlMinValue; - variantMap["m_pl_controlMaxValue"] = this->m_formInfo->m_pl_controlMaxValue; - - variantMap["m_pl_sectorCount"] = this->m_formInfo->m_pl_sectorCount; - variantMap["m_pl_circleRadius"] = this->m_formInfo->m_pl_circleRadius; - variantMap["m_pl_circleColor"] = this->m_formInfo->m_pl_circleColor; - variantMap["m_pl_circleLineWidth"] = this->m_formInfo->m_pl_circleLineWidth; - variantMap["m_pl_isFillEnabled"] = this->m_formInfo->m_pl_isFillEnabled; - variantMap["m_pl_fillColor"] = this->m_formInfo->m_pl_fillColor; - // 线数 - variantMap["m_pl_lineNumber"] = this->m_formInfo->m_pl_lineNumber; - variantMap["m_pl_lineHeight"] = this->m_formInfo->m_pl_lineHeight; - variantMap["m_pl_lineThickness"] = this->m_formInfo->m_pl_lineThickness; - variantMap["m_pl_lineColor"] = this->m_formInfo->m_pl_lineColor; - variantMap["m_pl_drawAnnotation"] = this->m_formInfo->m_pl_drawAnnotation; - variantMap["m_pl_drawHistogram"] = this->m_formInfo->m_pl_drawHistogram; - variantMap["m_pl_baselineWidth"] = this->m_formInfo->m_pl_baselineWidth; - variantMap["m_pl_baselineColor"] = this->m_formInfo->m_pl_baselineColor; - // 统计间隔 - variantMap["m_pl_statInterval"] = this->m_formInfo->m_pl_statInterval; - variantMap["m_pl_minInclination"] = this->m_formInfo->m_pl_minInclination; - variantMap["m_pl_maxInclination"] = this->m_formInfo->m_pl_maxInclination; - - variantMap["m_strUuid"] = this->m_formInfo->m_strUuid; - variantMap["m_strTrackName"] = this->m_formInfo->m_strTrackName; - emit CallManage::getInstance()->sig_changePlObjectProperty(variantMap); + emit CallManage::getInstance()->sig_changePlObjectProperty(this->m_formInfo->m_strObjUuid); } } @@ -5270,44 +5192,7 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal) if(flag) { - QVariantMap variantMap; - // 必须用来判断当前道 - variantMap["m_strTrackName"] = this->m_formInfo->m_strTrackName; - // 数据 - variantMap["m_pl_dataType"] = this->m_formInfo->m_pl_dataType; - variantMap["m_pl_azimuthCurve"] = this->m_formInfo->m_pl_azimuthCurve; - variantMap["m_pl_inclinationCurve"] = this->m_formInfo->m_pl_inclinationCurve; - // 表数据 - variantMap["m_rose_depth_field"] = this->m_formInfo->m_rose_depth_field; - variantMap["m_rose_azimuth_field"] = this->m_formInfo->m_rose_azimuth_field; - variantMap["m_rose_dip_field"] = this->m_formInfo->m_rose_dip_field; - variantMap["m_rose_attribute_field"] = this->m_formInfo->m_rose_attribute_field; - // 控制曲线 - variantMap["m_pl_controlCurveName"] = this->m_formInfo->m_pl_controlCurveName; - variantMap["m_pl_controlMinValue"] = this->m_formInfo->m_pl_controlMinValue; - variantMap["m_pl_controlMaxValue"] = this->m_formInfo->m_pl_controlMaxValue; - // 字体 - variantMap["m_pl_fontScale"] = this->m_formInfo->m_pl_fontScale; - // 玫瑰图 - variantMap["m_rose_sector_enabled"] = this->m_formInfo->m_rose_sector_enabled; - variantMap["m_rose_circle_radius_cm"] = this->m_formInfo->m_rose_circle_radius_cm; - variantMap["m_rose_radiation_circle_enabled"] = this->m_formInfo->m_rose_radiation_circle_enabled; - variantMap["m_rose_azimuth_print_interval"] = this->m_formInfo->m_rose_azimuth_print_interval; - variantMap["m_rose_circle_line_color"] = this->m_formInfo->m_rose_circle_line_color; - variantMap["m_rose_circle_line_width"] = this->m_formInfo->m_rose_circle_line_width; - variantMap["m_rose_stress_line_color"] = this->m_formInfo->m_rose_stress_line_color; - variantMap["m_rose_collapse_line_color"] = this->m_formInfo->m_rose_collapse_line_color; - variantMap["m_rose_draw_radiation_line"] = this->m_formInfo->m_rose_draw_radiation_line; - variantMap["m_rose_draw_wellbore_collapse"] = this->m_formInfo->m_rose_draw_wellbore_collapse; - variantMap["m_rose_fill_enabled"] = this->m_formInfo->m_rose_fill_enabled; - variantMap["m_rose_draw_annotation"] = this->m_formInfo->m_rose_draw_annotation; - // 统计间隔 - variantMap["m_pl_statInterval"] = this->m_formInfo->m_pl_statInterval; - variantMap["m_pl_minInclination"] = this->m_formInfo->m_pl_minInclination; - variantMap["m_pl_maxInclination"] = this->m_formInfo->m_pl_maxInclination; - - variantMap["m_strUuid"] = this->m_formInfo->m_strUuid; - emit CallManage::getInstance()->sig_changeRoseProperty(variantMap); + emit CallManage::getInstance()->sig_changeRoseProperty(this->m_formInfo->m_strObjUuid); } } //蝌蚪图 diff --git a/logPlus/TransparentDraggableResult.cpp b/logPlus/TransparentDraggableResult.cpp index aab6b49..c0d2ed2 100644 --- a/logPlus/TransparentDraggableResult.cpp +++ b/logPlus/TransparentDraggableResult.cpp @@ -141,24 +141,22 @@ void TransparentDraggableResult::drawResult(double left_Low, double right_Hight, // mPixmap->setPixmap(QPixmap(val)); // 设置图片 - - -// QSvgRenderer* svgRender = new QSvgRenderer(); -// svgRender->load(result); -// // -// QPixmap* pixmap = new QPixmap(10, 10); -// pixmap->fill(Qt::transparent);//设置背景透明 -// QPainter p(pixmap); -// svgRender->render(&p); -// // -// mPixmap->setPixmap(*pixmap); // 设置图片 } else { mPixmap->setPixmap(QPixmap(filePath)); // 设置图片 } - + if (m_bBlack) + { + // 将 QPixmap 转为 QImage 进行处理 + QImage originalImage = mPixmap->pixmap().toImage(); + // 转换为 8-bit 灰度格式 + QImage grayImage = originalImage.convertToFormat(QImage::Format_Grayscale8); + // 将处理后的 QImage 转回 QPixmap,并设置到 Item 中 + QPixmap grayPixmap = QPixmap::fromImage(grayImage); + mPixmap->setPixmap(grayPixmap); + } //mPlot->replot(); } @@ -208,6 +206,12 @@ void TransparentDraggableResult::setDragRange(double left_Low, double right_High mDragRect->bottomRight->setCoords(right_Hight, mPlot->yAxis->range().upper); } +void TransparentDraggableResult::setBlackColor(bool bclr) +{ + m_bBlack = bclr; + setRange(mRect->topLeft->key(), mRect->bottomRight->key(), false); +} + // 获取当前范围 QCPRange TransparentDraggableResult::getRange() { diff --git a/logPlus/TransparentDraggableResult.h b/logPlus/TransparentDraggableResult.h index 6d580b9..0f14193 100644 --- a/logPlus/TransparentDraggableResult.h +++ b/logPlus/TransparentDraggableResult.h @@ -38,6 +38,9 @@ public: // 设置结论占比% void setShowProperty(int nCopr, int nSPos, bool bupdate = false); void setDragRange(double left_Low, double right_Hight); + + void setBlackColor(bool bclr); + // 获取当前范围 QCPRange getRange(); @@ -107,6 +110,8 @@ private: int m_nConclusionProportion = 50; // 显示位置cm int m_nShowPos = 0; + + bool m_bBlack = false; }; #endif // TRANSPARENTDRAGGABLERESUL_H diff --git a/logPlus/TransparentGroupResult.cpp b/logPlus/TransparentGroupResult.cpp index 96355ad..ff98423 100644 --- a/logPlus/TransparentGroupResult.cpp +++ b/logPlus/TransparentGroupResult.cpp @@ -228,6 +228,24 @@ QCPRange TransparentGroupResult::getRange() return QCPRange(mRect->topLeft->coords().x(), mRect->bottomRight->coords().x()); } +void TransparentGroupResult::setBlackColor(bool bclr) +{ + if (m_bBlack == bclr) + return; + + m_bBlack = bclr; + + QObjectList objList = m_mapDraggable_Result.values(); + for (int i = 0; i < objList.size(); i++) + { + TransparentDraggableResult* p = qobject_cast(objList.at(i)); + if (p) + { + p->setBlackColor(m_bBlack); + } + } +} + void TransparentGroupResult::setGroupConclusionProportion(int nCopr) { if (nCopr > 0) diff --git a/logPlus/TransparentGroupResult.h b/logPlus/TransparentGroupResult.h index d6bfb73..f36795a 100644 --- a/logPlus/TransparentGroupResult.h +++ b/logPlus/TransparentGroupResult.h @@ -48,7 +48,8 @@ public: void setDragRange(double left_Low, double right_Hight); // 获取当前范围 QCPRange getRange(); - + // 黑白图 + void setBlackColor(bool bclr); // 设置结论占比% void setGroupConclusionProportion(int nCopr); // 设置显示位置 @@ -150,6 +151,7 @@ private: QMap m_mapDraggable_Result; bool m_bArrow = false; bool m_bMoveRect = false; + bool m_bBlack = false; }; #endif // TRANSPARENTGROUPRESUL_H diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 804f49d..4a065ed 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -167,9 +167,10 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) else { // - QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName); + QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName, strType); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; + curv->m_strObjUuid = pInfo->m_strObjUuid; curv->setDepthY(m_iY1, m_iY2); curv->initGeometry(m_strUuid, m_iScale, dW); curv->show(); @@ -347,48 +348,11 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) pInfo->m_strUnit = "(°)"; pInfo->m_strUnitFont = QFont("微软雅黑", 8); } - - this->initFgrq(curv); - - // 数据 - int dataType = pInfo->m_pl_dataType; // 数据类型 - QString azimuthCurve = pInfo->m_pl_azimuthCurve; // 方位曲线 - QString inclinationCurve = pInfo->m_pl_inclinationCurve; // 倾角曲线 // 通常 pInfo->setFixedHeight(pInfo->m_headHeight); // 例区高度 - // 控制曲线 - QString csCurveGrad = pInfo->m_pl_controlCurveName; - double LeftVal3 = pInfo->m_pl_controlMinValue; - double RightVal3 = pInfo->m_pl_controlMaxValue; - // 方位频率 - int nArc = pInfo->m_pl_sectorCount; - double nR = pInfo->m_pl_circleRadius; - QColor crArc = pInfo->m_pl_circleColor; - int nArcLineWidth = pInfo->m_pl_circleLineWidth; - bool bFill = pInfo->m_pl_isFillEnabled; - QColor crFill = pInfo->m_pl_fillColor; - // 倾角频率 - int lineNumber = pInfo->m_pl_lineNumber; // 线数 - // 统计线高度 - double lineHeight = pInfo->m_pl_lineHeight; - // 线粗细 - int lineThickness = pInfo->m_pl_lineThickness; - // 线颜色 - QColor lineColor = pInfo->m_pl_lineColor; - // 是否绘制标注? - bool drawAnnotation = pInfo->m_pl_drawAnnotation; - // 绘制直方图? - bool drawHistogram = pInfo->m_pl_drawHistogram; - // 基线参数 - int baselineWidth = pInfo->m_pl_baselineWidth; // 基线宽度 - QColor baselineColor = pInfo->m_pl_baselineColor; // 基线颜色 - // 统计参数 - int statInterval = pInfo->m_pl_statInterval; // 统计间隔 - double minInclination = pInfo->m_pl_minInclination; // 最小倾角 - double maxInclination = pInfo->m_pl_maxInclination; // 最大倾角 - curv->drawFgrq(dataType, azimuthCurve, inclinationCurve, csCurveGrad, LeftVal3, RightVal3, nArc, nR, crArc, nArcLineWidth, bFill, crFill, - lineNumber, lineHeight, lineThickness, lineColor, drawAnnotation, drawHistogram, - baselineWidth, baselineColor, statInterval, minInclination, maxInclination); + + this->initFgrq(curv); + emit CallManage::getInstance()->sig_changePlObjectProperty(pInfo->m_strObjUuid); } else if ("roseObject" == strType) // 玫瑰图 { @@ -400,54 +364,20 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) } this->initRose(curv); - - // 数据 - int dataType = pInfo->m_pl_dataType; // 数据类型 - QString azimuthCurve = pInfo->m_pl_azimuthCurve; // 方位曲线 - QString inclinationCurve = pInfo->m_pl_inclinationCurve; // 倾角曲线 - // 表数据字段 - QString m_rose_depth_field = pInfo->m_rose_depth_field; // 深度字段 - QString m_rose_azimuth_field = pInfo->m_rose_azimuth_field; // 方位字段 - QString m_rose_dip_field = pInfo->m_rose_dip_field; // 倾角字段 - QString m_rose_attribute_field = pInfo->m_rose_attribute_field; // 属性字段 - // 控制曲线 - QString csCurveGrad = pInfo->m_pl_controlCurveName; - double LeftVal3 = pInfo->m_pl_controlMinValue; - double RightVal3 = pInfo->m_pl_controlMaxValue; - // 字体 - QFont m_pl_fontScale = pInfo->m_pl_fontScale; // 刻度字体大小 - // 玫瑰图 - int m_rose_sector_enabled = pInfo->m_rose_sector_enabled; // 扇形(启用开关) - double m_rose_circle_radius_cm = pInfo->m_rose_circle_radius_cm; // 圆半径(cm) - m_rose_circle_radius_cm *= g_dPixelPerCm; - int m_rose_radiation_circle_enabled = pInfo->m_rose_radiation_circle_enabled; // 辐射圈(启用开关) - int m_rose_azimuth_print_interval = pInfo->m_rose_azimuth_print_interval; // 方位打印间隔 - QColor m_rose_circle_line_color = pInfo->m_rose_circle_line_color; // 圆线颜色 - int m_rose_circle_line_width = pInfo->m_rose_circle_line_width; // 圆线宽度 - QColor m_rose_stress_line_color = pInfo->m_rose_stress_line_color; // 应力线颜色 - QColor m_rose_collapse_line_color = pInfo->m_rose_collapse_line_color; // 垮塌线颜色 - bool m_rose_draw_radiation_line = pInfo->m_rose_draw_radiation_line; // 绘制辐射线? - bool m_rose_draw_wellbore_collapse = pInfo->m_rose_draw_wellbore_collapse; // 绘制井眼垮塌 - bool m_rose_fill_enabled = pInfo->m_rose_fill_enabled; // 是否填充 - bool m_rose_draw_annotation = pInfo->m_rose_draw_annotation; // 是否绘制标注? - // 统计间隔 - int m_pl_statInterval = pInfo->m_pl_statInterval; - double m_pl_minInclination = pInfo->m_pl_minInclination; - double m_pl_maxInclination = pInfo->m_pl_maxInclination; - - curv->drawRose(dataType, azimuthCurve, inclinationCurve, - m_rose_depth_field, m_rose_azimuth_field, m_rose_dip_field, m_rose_attribute_field, - csCurveGrad, LeftVal3, RightVal3, m_pl_fontScale, - m_rose_sector_enabled, m_rose_circle_radius_cm, m_rose_radiation_circle_enabled, m_rose_azimuth_print_interval, m_rose_circle_line_color, - m_rose_circle_line_width, m_rose_stress_line_color, m_rose_collapse_line_color, m_rose_draw_radiation_line, m_rose_draw_wellbore_collapse, - m_rose_fill_enabled, m_rose_draw_annotation, - m_pl_statInterval, m_pl_minInclination, m_pl_maxInclination); + emit CallManage::getInstance()->sig_changeRoseProperty(pInfo->m_strObjUuid); } else if ("CrackObject" == strType) // 裂缝 { - // qDebug() << "==================== number:" << pInfo; - // pInfo; - // curv; + //裂缝 + QString strWaveName = "FRAC_HOLE.TABLE"; + + //注意,不对调XY轴 + curv->m_bX2Y = false; + CPickFrac *pickFrac = new CPickFrac(curv, strSlfName, strWaveName, dW); + //pickFrac->setShowHide("", false, false, 2); + curv->m_cPickFrac = pickFrac; + + emit CallManage::getInstance()->sig_changeCrackProperty(pInfo->m_strObjUuid); } else if ("dcaObject" == strType) { @@ -3247,7 +3177,7 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri } // - QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); + QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName, "tableObject"); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; curv->setDepthY(m_iY1, m_iY2); @@ -4482,7 +4412,7 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa } // - QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); + QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName, "CrackObject"); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; curv->show(); @@ -4503,12 +4433,6 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa curv->xAxis->ticker()->setTickCount(10);//x个主刻度 curv->yAxis->ticker()->setTickCount(60);//y个主刻度 - // //对调XY轴,在最前面设置 - // QCPAxis *yAxis = curv->yAxis; - // QCPAxis *xAxis = curv->xAxis; - // curv->xAxis = yAxis; - // curv->yAxis = xAxis; - //裂缝 QString strWaveName = "FRAC_HOLE.TABLE"; @@ -4530,7 +4454,9 @@ void FormDraw::s_addCrack(QString strUuid, QString strSlfName, QString strWellNa double width=2; QString strScaleType = ""; //道-对象 - m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "CrackObject"); + m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, + strUnit, newlineColor, width, m_RightVal, m_LeftVal, + strScaleType, "CrackObject", QStringList(), curv->m_strObjUuid); } //气测/FMT/射孔/文本 @@ -7058,6 +6984,17 @@ void FormDraw::initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QStrin widget->setInteractions(QCP::iSelectAxes | QCP::iSelectLegend | QCP::iSelectPlottables | QCP::iMultiSelect); // 轴、图例、图表可以被选择,并且是多选的方式 // widget->setSelectionRectMode(QCP::srmCustom); // 鼠标框选 + + if (stringList.length() > 0) + { + FormInfo* pInfo = m_formTrack->getFormInfoByParametersObjUuid(widget->m_strObjUuid); + if (pInfo) + { + QVariantMap variantMap = pInfo->corePhysicsToVariantMap(); + emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); + } + + } } void FormDraw::CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio) @@ -7305,10 +7242,10 @@ void FormDraw::addRandomGraph(QMyCustomPlot *widget, QVector x, QVector< if(widget->m_bDrawCore_PHYSICS) { //岩心分析特殊处理 - m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "tableObject", listOtherProperty); + m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "tableObject", listOtherProperty, widget->m_strObjUuid); } else { - m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "curveObject", listOtherProperty); + m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "curveObject", listOtherProperty, widget->m_strObjUuid); } //AppendConsole(PAI_INFO, "FormDraw addRandomGraph"); // widget->addGraph(); diff --git a/logPlus/forminfo.cpp b/logPlus/forminfo.cpp index d2a04cf..3e9330c 100644 --- a/logPlus/forminfo.cpp +++ b/logPlus/forminfo.cpp @@ -30,7 +30,7 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt m_lineColor = lineColor; m_twoBLlineColor = lineColor; - + m_strObjUuid = getUUid(); // m_dWidth = 3; m_lineStyle = Qt::SolidLine; @@ -2124,8 +2124,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_highGap) { QString drawText = "高导缝"; - painter.setBrush(QBrush(QColor("#FF0000"))); - painter.setPen(QPen(QColor("#FF0000"), 1)); + painter.setBrush(QBrush(m_bBlack?Qt::black: QColor("#FF0000"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#FF0000"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2133,8 +2133,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_highReservoir) { QString drawText = "高阻缝"; - painter.setBrush(QBrush( QColor("#400040"))); - painter.setPen(QPen( QColor("#400040"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#400040"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#400040"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2142,8 +2142,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_reticularFracture) { QString drawText = "网状缝"; - painter.setBrush(QBrush( QColor("#808000"))); - painter.setPen(QPen( QColor("#808000"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#808000"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#808000"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2151,8 +2151,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_inducedFracture) { QString drawText = "诱导缝"; - painter.setBrush(QBrush( QColor("#00FFFF"))); - painter.setPen(QPen( QColor("#00FFFF"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#00FFFF"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#00FFFF"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2160,8 +2160,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_bedLayer) { QString drawText = "层理"; - painter.setBrush(QBrush( QColor("#00FF00"))); - painter.setPen(QPen( QColor("#00FF00"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#00FF00"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#00FF00"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2169,8 +2169,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_erosionSurface) { QString drawText = "侵蚀面"; - painter.setBrush(QBrush( QColor("#409600"))); - painter.setPen(QPen( QColor("#409600"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#409600"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#409600"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2178,8 +2178,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_pore) { QString drawText = "孔洞"; - painter.setBrush(QBrush( QColor("#FF8064"))); - painter.setPen(QPen( QColor("#FF8064"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#FF8064"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#FF8064"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2187,8 +2187,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_vesicle) { QString drawText = "气孔"; - painter.setBrush(QBrush( QColor("#FFFF00"))); - painter.setPen(QPen( QColor("#FFFF00"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#FFFF00"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#FFFF00"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2196,8 +2196,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_gravel) { QString drawText = "砾石"; - painter.setBrush(QBrush( QColor("#000096"))); - painter.setPen(QPen( QColor("#000096"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#000096"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#000096"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2205,8 +2205,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_nodule) { QString drawText = "结核"; - painter.setBrush(QBrush( QColor("#A65300"))); - painter.setPen(QPen( QColor("#A65300"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#A65300"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#A65300"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2223,8 +2223,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_fault) { QString drawText = "断层"; - painter.setBrush(QBrush( QColor("#A65300"))); - painter.setPen(QPen( QColor("#A65300"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#A65300"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#A65300"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2232,8 +2232,8 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) if(this->m_pl_verticalFracture) { QString drawText = "垂直缝"; - painter.setBrush(QBrush( QColor("#FF0000"))); - painter.setPen(QPen( QColor("#FF0000"), 1)); + painter.setBrush(QBrush(m_bBlack ? Qt::black : QColor("#FF0000"))); + painter.setPen(QPen(m_bBlack ? Qt::black : QColor("#FF0000"), 1)); painter.drawLine(0, compassCenterY + 20, 30, compassCenterY + 25); painter.drawEllipse(25, compassCenterY + 20, 10, 10); painter.drawText(40, compassCenterY + 30, drawText); @@ -2259,6 +2259,145 @@ void FormInfo::paintClassify(QPainter &painter, int compassCenterY) } +QVariantMap FormInfo::pinlvToVariantMap() +{ + QVariantMap variantMap; + // 必须用来判断当前道 + variantMap["m_strTrackName"] = this->m_strTrackName; + // 数据 + variantMap["m_pl_dataType"] = this->m_pl_dataType; + variantMap["m_pl_azimuthCurve"] = this->m_pl_azimuthCurve; + variantMap["m_pl_inclinationCurve"] = this->m_pl_inclinationCurve; + // 控制曲线 + variantMap["m_pl_controlCurveName"] = this->m_pl_controlCurveName; + variantMap["m_pl_controlMinValue"] = this->m_pl_controlMinValue; + variantMap["m_pl_controlMaxValue"] = this->m_pl_controlMaxValue; + + variantMap["m_pl_sectorCount"] = this->m_pl_sectorCount; + variantMap["m_pl_circleRadius"] = this->m_pl_circleRadius; + variantMap["m_pl_circleColor"] = this->m_pl_circleColor; + variantMap["m_pl_circleLineWidth"] = this->m_pl_circleLineWidth; + variantMap["m_pl_isFillEnabled"] = this->m_pl_isFillEnabled; + variantMap["m_pl_fillColor"] = this->m_pl_fillColor; + // 线数 + variantMap["m_pl_lineNumber"] = this->m_pl_lineNumber; + variantMap["m_pl_lineHeight"] = this->m_pl_lineHeight; + variantMap["m_pl_lineThickness"] = this->m_pl_lineThickness; + variantMap["m_pl_lineColor"] = this->m_pl_lineColor; + variantMap["m_pl_drawAnnotation"] = this->m_pl_drawAnnotation; + variantMap["m_pl_drawHistogram"] = this->m_pl_drawHistogram; + variantMap["m_pl_baselineWidth"] = this->m_pl_baselineWidth; + variantMap["m_pl_baselineColor"] = this->m_pl_baselineColor; + // 统计间隔 + variantMap["m_pl_statInterval"] = this->m_pl_statInterval; + variantMap["m_pl_minInclination"] = this->m_pl_minInclination; + variantMap["m_pl_maxInclination"] = this->m_pl_maxInclination; + + variantMap["m_strUuid"] = this->m_strUuid; + variantMap["m_strTrackName"] = this->m_strTrackName; + return variantMap; +} + +QVariantMap FormInfo::roseToVariantMap() +{ + QVariantMap variantMap; + // 必须用来判断当前道 + variantMap["m_strTrackName"] = this->m_strTrackName; + // 数据 + variantMap["m_pl_dataType"] = this->m_pl_dataType; + variantMap["m_pl_azimuthCurve"] = this->m_pl_azimuthCurve; + variantMap["m_pl_inclinationCurve"] = this->m_pl_inclinationCurve; + // 表数据 + variantMap["m_rose_depth_field"] = this->m_rose_depth_field; + variantMap["m_rose_azimuth_field"] = this->m_rose_azimuth_field; + variantMap["m_rose_dip_field"] = this->m_rose_dip_field; + variantMap["m_rose_attribute_field"] = this->m_rose_attribute_field; + // 控制曲线 + variantMap["m_pl_controlCurveName"] = this->m_pl_controlCurveName; + variantMap["m_pl_controlMinValue"] = this->m_pl_controlMinValue; + variantMap["m_pl_controlMaxValue"] = this->m_pl_controlMaxValue; + // 字体 + variantMap["m_pl_fontScale"] = this->m_pl_fontScale; + // 玫瑰图 + variantMap["m_rose_sector_enabled"] = this->m_rose_sector_enabled; + variantMap["m_rose_circle_radius_cm"] = this->m_rose_circle_radius_cm; + variantMap["m_rose_radiation_circle_enabled"] = this->m_rose_radiation_circle_enabled; + variantMap["m_rose_azimuth_print_interval"] = this->m_rose_azimuth_print_interval; + variantMap["m_rose_circle_line_color"] = this->m_rose_circle_line_color; + variantMap["m_rose_circle_line_width"] = this->m_rose_circle_line_width; + variantMap["m_rose_stress_line_color"] = this->m_rose_stress_line_color; + variantMap["m_rose_collapse_line_color"] = this->m_rose_collapse_line_color; + variantMap["m_rose_draw_radiation_line"] = this->m_rose_draw_radiation_line; + variantMap["m_rose_draw_wellbore_collapse"] = this->m_rose_draw_wellbore_collapse; + variantMap["m_rose_fill_enabled"] = this->m_rose_fill_enabled; + variantMap["m_rose_draw_annotation"] = this->m_rose_draw_annotation; + // 统计间隔 + variantMap["m_pl_statInterval"] = this->m_pl_statInterval; + variantMap["m_pl_minInclination"] = this->m_pl_minInclination; + variantMap["m_pl_maxInclination"] = this->m_pl_maxInclination; + + variantMap["m_strUuid"] = this->m_strUuid; + return variantMap; +} + +QVariantMap FormInfo::crackToVariantMap() +{ + QVariantMap variantMap; + // 必须用来判断当前道 + variantMap["m_strTrackName"] = this->m_strTrackName; + // 数据 + variantMap["m_crack_drawName"] = this->m_crack_drawName; + variantMap["m_crack_drawAngle"] = this->m_crack_drawAngle; + // 显示控制 + variantMap["m_crack_decimal_digits"] = this->m_crack_decimal_digits; + // 分类 + variantMap["m_pl_highGap"] = this->m_pl_highGap; + variantMap["m_pl_highReservoir"] = this->m_pl_highReservoir; + variantMap["m_pl_reticularFracture"] = this->m_pl_reticularFracture; + variantMap["m_pl_inducedFracture"] = this->m_pl_inducedFracture; + variantMap["m_pl_bedLayer"] = this->m_pl_bedLayer; + variantMap["m_pl_erosionSurface"] = this->m_pl_erosionSurface; + variantMap["m_pl_pore"] = this->m_pl_pore; + variantMap["m_pl_vesicle"] = this->m_pl_vesicle; + variantMap["m_pl_gravel"] = this->m_pl_gravel; + variantMap["m_pl_nodule"] = this->m_pl_nodule; + variantMap["m_pl_lumps"] = this->m_pl_lumps; + variantMap["m_pl_fault"] = this->m_pl_fault; + variantMap["m_pl_verticalFracture"] = this->m_pl_verticalFracture; + variantMap["m_pl_custom1"] = this->m_pl_custom1; + variantMap["m_pl_custom2"] = this->m_pl_custom2; + variantMap["m_pl_dataType"] = this->m_pl_dataType; + variantMap["m_pl_dataType"] = this->m_pl_dataType; + variantMap["m_pl_dataType"] = this->m_pl_dataType; + variantMap["m_pl_dataType"] = this->m_pl_dataType; + variantMap["m_pl_dataType"] = this->m_pl_dataType; + variantMap["m_pl_dataType"] = this->m_pl_dataType; + + return variantMap; +} + +QVariantMap FormInfo::corePhysicsToVariantMap() +{ + QVariantMap variantMap; + variantMap["ObjUuid"] = this->m_strObjUuid; + variantMap["lineWidth"] = this->m_cp_lineWidth; + variantMap["lineColor"] = this->m_cp_lineColor; + variantMap["lineStyle"] = (int)this->m_cp_lineStyle; + variantMap["drawAsBar"] = this->m_cp_drawAsBar; + variantMap["leftBoundary"] = this->m_cp_leftBoundary; + variantMap["skipZeroInvalidValues"] = this->m_cp_skipZeroInvalidValues; + variantMap["drawEnvelope"] = this->m_cp_drawEnvelope; + variantMap["drawAsDot"] = this->m_cp_drawAsDot; + variantMap["symbolType"] = this->m_cp_symbolType; + variantMap["symbolBorderColor"] = this->m_cp_symbolBorderColor; + variantMap["symbolSize"] = this->m_cp_symbolSize; + variantMap["symbolFillColor"] = this->m_cp_symbolFillColor; + variantMap["leftScale"] = this->m_cp_leftScale; + variantMap["rightScale"] = this->m_cp_rightScale; + variantMap["scaleType"] = this->m_cp_scaleType; + return variantMap; +} + void FormInfo::dragEnterEvent(QDragEnterEvent* event) { qDebug() << "FormInfo dragEnterEvent"; diff --git a/logPlus/forminfo.h b/logPlus/forminfo.h index e3abe8f..75926c3 100644 --- a/logPlus/forminfo.h +++ b/logPlus/forminfo.h @@ -39,6 +39,16 @@ public: void initProperty_MCals(QJsonObject obj); void paintClassify(QPainter &painter, int compassCenterY); + + // 频率统计图 + QVariantMap pinlvToVariantMap(); + // 玫瑰图 + QVariantMap roseToVariantMap(); + // 裂缝 + QVariantMap crackToVariantMap(); + // 岩心分析 + QVariantMap corePhysicsToVariantMap(); + private: Ui::FormInfo *ui; @@ -103,6 +113,7 @@ public slots: public: QString m_strUuid; QString m_strTrackUuid=""; + QString m_strObjUuid = ""; QString m_strSlfName; QString m_strWellName; QString m_strTrackName; diff --git a/logPlus/formtrack.cpp b/logPlus/formtrack.cpp index 2ea98eb..d3fd09f 100644 --- a/logPlus/formtrack.cpp +++ b/logPlus/formtrack.cpp @@ -51,15 +51,15 @@ FormTrack::FormTrack(QWidget *parent, QString strSlfName, QString strWellName, Q ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); //曲线 - connect(this, SIGNAL(sig_AddLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)), - this, SLOT(s_addLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList))); + connect(this, SIGNAL(sig_AddLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList, QString)), + this, SLOT(s_addLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList, QString))); //删除曲线 connect(CallManage::getInstance(), SIGNAL(sig_delLine(QString, QString, QString, QString)), this, SLOT(s_delLine(QString, QString, QString, QString))); //表格 - connect(this, SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)), - this, SLOT(s_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList))); + connect(this, SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList,QString)), + this, SLOT(s_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList, QString))); connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)), this, SLOT(s_delTableLine(QString, QString, QString, QString))); @@ -81,8 +81,8 @@ FormTrack::FormTrack(QWidget *parent, QString strSlfName, QString strWellName, Q this, SLOT(s_addDrawImage(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString))); //裂缝 - connect(this, SIGNAL(sig_AddCrack(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)), - this, SLOT(s_addCrack(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString))); + connect(this, SIGNAL(sig_AddCrack(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QString)), + 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)), @@ -173,6 +173,27 @@ FormInfo* FormTrack::getFormInfoByParameters(QString strUuid, QString strWellNam return NULL; } +FormInfo* FormTrack::getFormInfoByParametersObjUuid(QString strObjUuid) +{ + int rowCount = ui->tableWidget->rowCount(); + for (int i = 0; i < rowCount; i++) + { + if (ui->tableWidget->cellWidget(i, 0) != nullptr) + { + auto myWidget = ui->tableWidget->cellWidget(i, 0); + FormInfo *formInfo = qobject_cast(myWidget);//获得widget + if (formInfo) + { + if (strObjUuid == formInfo->m_strObjUuid) + { + return formInfo; + } + } + } + } + return NULL; +} + // //void FormTrack::paintEvent(QPaintEvent *event) //{ @@ -242,13 +263,15 @@ FormInfo* FormTrack::getFormInfoByParameters(QString strUuid, QString strWellNam // } // } -void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QStringList listOtherProperty) +void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, + QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, + QString strScaleType, QString strType, QStringList listOtherProperty, QString strObjUuid) { qDebug()<< "Add"; if(strType=="curveObject") { - emit sig_AddLine(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty); + emit sig_AddLine(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty, strObjUuid); } else if(strType=="waveObject") { @@ -257,7 +280,7 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam else if(strType=="tableObject") { //新建表格曲线 - emit sig_AddTableLine(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty); + emit sig_AddTableLine(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty, strObjUuid); } else if(strType=="depthObject") { @@ -273,7 +296,7 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam } else if(strType=="CrackObject") { - emit sig_AddCrack(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType); + emit sig_AddCrack(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, strObjUuid); } else if(strType=="SantuyibiaoObject") { @@ -456,7 +479,7 @@ FormInfo* FormTrack::setDrawDt(QStringList listdt, QJsonObject obj) return formInfo; } -void FormTrack::s_addLine(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 FormTrack::s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty, QString strObjUuid) { qDebug() << "FormTrack s_addLine"; @@ -482,6 +505,10 @@ void FormTrack::s_addLine(QString strSlfName, QString strWellName, QString strTr formInfo->setVMin(vmin); formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); + if (strObjUuid.length() > 0) + { + formInfo->m_strObjUuid = strObjUuid; + } // if(listOtherProperty.size()>=3) { @@ -688,7 +715,7 @@ void FormTrack::s_delWave(QString strUuid, QString strWellName, QString strTrack } } -void FormTrack::s_AddTableLine(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 FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty, QString strObjUuid) { if(strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT" || strLineName == "GEO_LITH" || strLineName == "SWALL_CORE" @@ -724,19 +751,31 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString formInfo->setVMin(vmin); formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); + if (strObjUuid.length() > 0) + { + formInfo->m_strObjUuid = strObjUuid; + } if(strLineName == "GEO_LITH" || strLineName == "SWALL_CORE" || strLineName == "WORDS_RELUST" || strLineName == "LAYER_DATA" || strLineName == "IMAGE_DATA" || strLineName == "CORE_PHYSICS" ) { //井壁取心 / 录井剖面 /文字结论 /地质分层 - if(listOtherProperty.size()>=5) + if(listOtherProperty.size()>=6) { QFont curveNameFont("微软雅黑", 10); // 名称字体 curveNameFont.fromString(listOtherProperty[2]); formInfo->m_curveNameFont = curveNameFont; - QColor color(listOtherProperty[1]); - formInfo->m_lineColor = color; + if (strLineName == "CORE_PHYSICS") + { + QColor color(listOtherProperty[5]); + formInfo->m_lineColor = color; + } + else + { + QColor color(listOtherProperty[1]); + formInfo->m_lineColor = color; + } // if(listOtherProperty[3]=="VerticaDrawing") { @@ -1147,7 +1186,7 @@ void FormTrack::s_addSantuyibiao(QString strSlfName, QString strWellName, QStrin ui->tableWidget->setCellWidget(row, 0, formInfo); } -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) +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) { qDebug() << "FormTrack s_addCrack"; @@ -1172,6 +1211,10 @@ void FormTrack::s_addCrack(QString strSlfName, QString strWellName, QString strT formInfo->setVMin(vmin); formInfo->setFrontColor(QColor(0,0,0)); formInfo->setBackColor(QColor(255,255,255)); + if (strObjUuid.length() > 0) + { + formInfo->m_strObjUuid = strObjUuid; + } //设置高度 ui->tableWidget->setRowHeight(row, 100); //单元格委托 diff --git a/logPlus/formtrack.h b/logPlus/formtrack.h index ceef0fe..61708a3 100644 --- a/logPlus/formtrack.h +++ b/logPlus/formtrack.h @@ -27,6 +27,7 @@ public: FormInfo* getFormInfoByParameters(QString strUuid, QString strWellName, QString strTrackName, QString strLineName); + FormInfo* getFormInfoByParametersObjUuid(QString strObjUuid); private: Ui::FormTrack *ui; @@ -43,7 +44,10 @@ public: //NoLRBorderDelegate *m_delegate; public: - void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QStringList listOtherProperty={}); + void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, + QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, + QString strScaleType, QString strType, QStringList listOtherProperty={}, QString strObjUuid=""); + //蝌蚪图 FormInfo* AddKedouAndOthers(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty={}); //多臂井径 @@ -55,9 +59,9 @@ public: QStringList getLineList(QString strWellName, QString strTrackName); signals: - void sig_AddLine(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_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}, QString strObjUuid = ""); void sig_AddWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); - void sig_AddTableLine(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_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}, QString strObjUuid=""); void sig_AddDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void sig_AddGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); @@ -66,7 +70,7 @@ signals: 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_AddCrack(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); + 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={}); void sig_AddLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}); @@ -75,20 +79,20 @@ signals: void sig_AddLogMud(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); public slots: - void s_addLine(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_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}, QString strObjUuid=""); void s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName); void s_addWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); void s_delWave(QString strUuid, QString strWellName, QString strTrackName, QString strLineName); - void s_AddTableLine(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_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={}, QString strObjUuid=""); void s_delTableLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName); // 深度 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_addCrack(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType); + 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={}); void s_addLogface(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/logplus.vcxproj b/logPlus/logplus.vcxproj index 803d75c..d6ea163 100644 --- a/logPlus/logplus.vcxproj +++ b/logPlus/logplus.vcxproj @@ -45,7 +45,6 @@ - @@ -155,7 +154,6 @@ - diff --git a/logPlus/logplus.vcxproj.filters b/logPlus/logplus.vcxproj.filters index 8fca903..8bfc1db 100644 --- a/logPlus/logplus.vcxproj.filters +++ b/logPlus/logplus.vcxproj.filters @@ -44,9 +44,6 @@ Header Files - - Header Files - Header Files @@ -333,9 +330,6 @@ Source Files - - Source Files - Source Files diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 5223f89..e1fdc85 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -47,6 +47,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel m_strLineName = strLineName; m_strType = strType; + m_strObjUuid = getUUid(); + // 创建一个新的顶层图层(如果还没有) if (!this->layer("topLayer")) { this->addLayer("topLayer"); @@ -207,13 +209,13 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel // 频率统计图属性修改 - connect(CallManage::getInstance(), SIGNAL(sig_changeCrackProperty(QVariantMap)), this, SLOT(s_changeCrackProperty(QVariantMap))); + connect(CallManage::getInstance(), SIGNAL(sig_changeCrackProperty(QString)), this, SLOT(s_changeCrackProperty(QString))); // 频率统计图属性修改 - connect(CallManage::getInstance(), SIGNAL(sig_changePlObjectProperty(QVariantMap)), this, SLOT(s_changePlObjectProperty(QVariantMap))); + connect(CallManage::getInstance(), SIGNAL(sig_changePlObjectProperty(QString)), this, SLOT(s_changePlObjectProperty(QString))); // 玫瑰图属性修改 - connect(CallManage::getInstance(), SIGNAL(sig_changeRoseProperty(QVariantMap)), this, SLOT(s_changeRoseProperty(QVariantMap))); + connect(CallManage::getInstance(), SIGNAL(sig_changeRoseProperty(QString)), this, SLOT(s_changeRoseProperty(QString))); // 裂缝DCA分析属性修改 connect(CallManage::getInstance(), SIGNAL(sig_changeDcaProperty(QVariantMap)), this, SLOT(s_changeDcaProperty(QVariantMap))); @@ -1196,6 +1198,10 @@ void QMyCustomPlot::setShowProperty(QVariant val, int ntag) { pGroup->setFloorRot(val.toDouble()); } + else if (ntag == 6) + { + pGroup->setBlackColor(val.toBool()); + } } } @@ -6637,6 +6643,10 @@ void QMyCustomPlot::s_changeDepthProperty(QVariantList vlist) // 岩心分析 void QMyCustomPlot::s_changeCorePhysicsProperty(QVariantMap variantMap) { + QString strObjUuid = variantMap["ObjUuid"].toString(); + if (m_strObjUuid != strObjUuid) + return; + TransparentDraggableCorePhysics *tdCorePhysics = NULL; for (QMap::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++) { @@ -6649,7 +6659,7 @@ void QMyCustomPlot::s_changeCorePhysicsProperty(QVariantMap variantMap) // 颜色 if(variantMap["lineColor"].isValid()) { - tdCorePhysics->setCpLineColor(variantMap["lineColor"].value()); + tdCorePhysics->setCpLineColor(m_bBlack ? Qt::black : variantMap["lineColor"].value()); } // 线形 if(variantMap["lineStyle"].isValid()) @@ -12044,8 +12054,19 @@ void QMyCustomPlot::resetPosition() replot(); } -void QMyCustomPlot::s_changeCrackProperty(QVariantMap variantMap) +void QMyCustomPlot::s_changeCrackProperty(QString strObjUuid) { + if (m_strObjUuid != strObjUuid) + { + return; + } + FormInfo* pInfo = m_formTrack->getFormInfoByParametersObjUuid(m_strObjUuid); + if (pInfo == NULL) + { + return; + } + + QVariantMap variantMap = pInfo->crackToVariantMap(); QString strTrackName = variantMap["m_strTrackName"].toString(); if(this->m_strTrackName != strTrackName) { @@ -12138,8 +12159,19 @@ void QMyCustomPlot::s_changeCrackProperty(QVariantMap variantMap) // this->m_cPickFrac->setShowName(m_crack_drawName, m_crack_drawAngle); } -void QMyCustomPlot::s_changePlObjectProperty(QVariantMap variantMap) +void QMyCustomPlot::s_changePlObjectProperty(QString strObjUuid)//QVariantMap variantMap) { + if (m_strObjUuid != strObjUuid) + { + return; + } + FormInfo* pInfo = m_formTrack->getFormInfoByParametersObjUuid(m_strObjUuid); + if (pInfo == NULL) + { + return; + } + + QVariantMap variantMap = pInfo->pinlvToVariantMap(); QString strTrackName = variantMap["m_strTrackName"].toString(); if(this->m_strTrackName != strTrackName) { @@ -12222,6 +12254,13 @@ void QMyCustomPlot::drawFgrq (bool bTableData, QString csCurveDDIR, QString csCu return; } } + if (m_bBlack) + { + crArc = Qt::black; + baselineColor = Qt::black; + crFill = Qt::black; + lineColor = Qt::black; + } QPen wPen(crArc, nArcLineWidth); double centerX = this->m_iX2/2; float flVal = 0.0f; @@ -12678,8 +12717,19 @@ bool QMyCustomPlot::ReadData(QString strSlfName, QString strLineName) return flag; } -void QMyCustomPlot::s_changeRoseProperty(QVariantMap variantMap) +void QMyCustomPlot::s_changeRoseProperty(QString strObjUuid) { + if (m_strObjUuid != strObjUuid) + { + return; + } + FormInfo* pInfo = m_formTrack->getFormInfoByParametersObjUuid(m_strObjUuid); + if (pInfo == NULL) + { + return; + } + + QVariantMap variantMap = pInfo->roseToVariantMap(); QString strTrackName = variantMap["m_strTrackName"].toString(); if(this->m_strTrackName != strTrackName) { @@ -12724,6 +12774,12 @@ void QMyCustomPlot::s_changeRoseProperty(QVariantMap variantMap) double m_pl_minInclination = variantMap["m_pl_minInclination"].toDouble(); double m_pl_maxInclination = variantMap["m_pl_maxInclination"].toDouble(); + if (m_bBlack) + { + m_rose_circle_line_color = Qt::black; + m_rose_stress_line_color = Qt::black; + m_rose_collapse_line_color = Qt::black; + } this->drawRose(bTableData, azimuthCurve, inclinationCurve, m_rose_depth_field, m_rose_azimuth_field, m_rose_dip_field, m_rose_attribute_field, csCurveGrad, LeftVal3, RightVal3, m_pl_fontScale, @@ -14290,7 +14346,40 @@ void QMyCustomPlot::s_changeBlack(QString strUuid, bool bBlack) resetPosition_GeoLith(); //地质层位 resetPosition_Layer(); - + // 解释结论 + this->setShowProperty(m_bBlack, 6); + // 频率统计图 + if ("plObject" == m_strType) + { + s_changePlObjectProperty(m_strObjUuid); + return; + } + // 玫瑰图 + if ("roseObject" == m_strType) + { + s_changeRoseProperty(m_strObjUuid); + return; + } + // 裂缝 + if ("CrackObject" == m_strType) + { + this->m_cPickFrac->setBlackColor(m_bBlack); + } + if ("tableObject" == m_strType) + { + if (m_strLineName == "CORE_PHYSICS") + { + FormInfo* pInfo = m_formTrack->getFormInfoByParametersObjUuid(m_strObjUuid); + if (pInfo) + { + QVariantMap variantMap; + variantMap["ObjUuid"] = this->m_strObjUuid; + variantMap["lineColor"] = pInfo->m_cp_lineColor; + emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap); + } + } + return; + } // replot(); } diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index e2d6974..f639edd 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -167,6 +167,7 @@ protected: public: // 井UUID QString m_strUuid; + QString m_strObjUuid; QString m_strSlfName; QString m_strWellName; QString m_strTrackName; @@ -684,13 +685,13 @@ public slots: void s_changeDepthProperty(QVariantList vlist); // 裂缝 - void s_changeCrackProperty(QVariantMap variantMap); + void s_changeCrackProperty(QString strObjUuid); // 频率统计图 - void s_changePlObjectProperty(QVariantMap variantMap); + void s_changePlObjectProperty(QString strObjUuid);// QVariantMap variantMap); // 玫瑰图 - void s_changeRoseProperty(QVariantMap variantMap); + void s_changeRoseProperty(QString strObjUuid); // 裂缝DCA分析 void s_changeDcaProperty(QVariantMap variantMap); @@ -831,7 +832,7 @@ public: QString m_csCurveAZIM,m_csCurveDEVI; // 方位曲线/井斜曲线 void Draw_Denv(); - CPickFrac *m_cPickFrac; + CPickFrac *m_cPickFrac = nullptr; //多臂井径 void Draw_MCals(QString strLineName, QString strNewLineName);