diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index fc10e6c..da75902 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -5215,12 +5215,7 @@ void PropertyWidget::initKedouProperty(FormInfo *formInfo) _CreateVariantPropertyItem("曲线选择", "方位曲线", formInfo->m_pl_azimuthCurve, QVariant::String); _CreateVariantPropertyItem("曲线选择", "倾角曲线", formInfo->m_pl_inclinationCurve, QVariant::String); _CreateVariantPropertyItem("曲线选择", "可信度曲线", formInfo->m_pl_GradCurve, QVariant::String); - // - _CreateVariantPropertyItem("字段选择(数据表)", "深度字段", formInfo->m_rose_depth_field, QVariant::String); - _CreateVariantPropertyItem("字段选择(数据表)", "方位字段", formInfo->m_rose_azimuth_field, QVariant::String); - _CreateVariantPropertyItem("字段选择(数据表)", "倾角字段", formInfo->m_rose_dip_field, QVariant::String); - _CreateVariantPropertyItem("字段选择(数据表)", "属性字段", formInfo->m_rose_attribute_field, QVariant::String); - // + // _CreateVariantPropertyItem("蝌蚪符号", "圆半径", formInfo->m_nRadius, QVariant::Double); _CreateVariantPropertyItem("蝌蚪符号", "圆线宽度", formInfo->m_nCircleWidth, QVariant::Double); _CreateVariantPropertyItem("蝌蚪符号", "尾线长度", formInfo->m_nTailLen, QVariant::Double); @@ -5234,6 +5229,11 @@ void PropertyWidget::initKedouProperty(FormInfo *formInfo) _CreateVariantPropertyItem("显示控制", "可信度2", formInfo->m_flGrad2, QVariant::Double); // _CreateVariantPropertyItem("显示控制(数据表)", "小数位数", formInfo->m_crack_decimal_digits, QVariant::Int); + // + _CreateVariantPropertyItem("字段选择(数据表)", "深度字段", formInfo->m_rose_depth_field, QVariant::String); + _CreateVariantPropertyItem("字段选择(数据表)", "方位字段", formInfo->m_rose_azimuth_field, QVariant::String); + _CreateVariantPropertyItem("字段选择(数据表)", "倾角字段", formInfo->m_rose_dip_field, QVariant::String); + _CreateVariantPropertyItem("字段选择(数据表)", "属性字段", formInfo->m_rose_attribute_field, QVariant::String); // 分类 this->loadClassifyProperty(formInfo); @@ -5366,62 +5366,77 @@ void PropertyWidget::changedKedouProperty(QString strProperty, QVariant varVal) else if ("高导缝" == strProperty) { this->m_formInfo->m_pl_highGap = varVal.toBool(); + flag = true; } else if ("高阻缝" == strProperty) { this->m_formInfo->m_pl_highReservoir = varVal.toBool(); + flag = true; } else if ("网状缝" == strProperty) { this->m_formInfo->m_pl_reticularFracture = varVal.toBool(); + flag = true; } else if ("诱导缝" == strProperty) { this->m_formInfo->m_pl_inducedFracture = varVal.toBool(); + flag = true; } else if ("层理" == strProperty) { this->m_formInfo->m_pl_bedLayer = varVal.toBool(); + flag = true; } else if ("侵蚀面" == strProperty) { this->m_formInfo->m_pl_erosionSurface = varVal.toBool(); + flag = true; } else if ("孔洞" == strProperty) { this->m_formInfo->m_pl_pore = varVal.toBool(); + flag = true; } else if ("气孔" == strProperty) { this->m_formInfo->m_pl_vesicle = varVal.toBool(); + flag = true; } else if ("砾石" == strProperty) { this->m_formInfo->m_pl_gravel = varVal.toBool(); + flag = true; } else if ("结核" == strProperty) { this->m_formInfo->m_pl_nodule = varVal.toBool(); + flag = true; } else if ("团块" == strProperty) { this->m_formInfo->m_pl_lumps = varVal.toBool(); + flag = true; } else if ("断层" == strProperty) { this->m_formInfo->m_pl_fault = varVal.toBool(); + flag = true; } else if ("垂直缝" == strProperty) { this->m_formInfo->m_pl_verticalFracture = varVal.toBool(); + flag = true; } else if ("自定义1" == strProperty) { this->m_formInfo->m_pl_custom1 = varVal.toBool(); + flag = true; } else if ("自定义2" == strProperty) { this->m_formInfo->m_pl_custom2 = varVal.toBool(); + flag = true; } if(flag) diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index a14ebc7..30cbe69 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -11812,34 +11812,175 @@ void QMyCustomPlot::Draw_Kedou() this->m_csCurveDANG = pInfo->m_pl_inclinationCurve;//倾角 this->m_csCurveGrad = pInfo->m_pl_GradCurve; // 可信度曲线 //字段选择(数据表) - this->m_qsDepth = pInfo->m_rose_depth_field; // 深度字段 - this->m_qsDIR = pInfo->m_rose_azimuth_field; // 方位字段 - this->m_qsDIP = pInfo->m_rose_dip_field; // 倾角字段 - this->m_qsID = this->m_qsProperty = pInfo->m_rose_attribute_field; // 属性字段 + this->m_qsDepth = pInfo->m_rose_depth_field; // 深度字段 + this->m_qsDIR = pInfo->m_rose_azimuth_field; // 方位字段 + this->m_qsDIP = pInfo->m_rose_dip_field; // 倾角字段 + this->m_qsID = pInfo->m_rose_attribute_field; // 属性字段 + this->m_qsProperty = pInfo->m_rose_attribute_field; // 属性字段 //蝌蚪符号 - this->m_nRadius = pInfo->m_nRadius; // 圆半径 + this->m_nRadius = pInfo->m_nRadius; // 圆半径 this->m_nCircleWidth = pInfo->m_nCircleWidth; // 圆线宽度 - this->m_nTailLen = pInfo->m_nTailLen; // 尾线长度 - this->m_nTailWidth = pInfo->m_nTailWidth; // 尾线宽度 - this->m_crCircle = pInfo->m_crCircle; // 圆线颜色 - this->m_crTail = pInfo->m_crTail; // 尾线颜色 + this->m_nTailLen = pInfo->m_nTailLen; // 尾线长度 + this->m_nTailWidth = pInfo->m_nTailWidth; // 尾线宽度 + this->m_crCircle = pInfo->m_crCircle; // 圆线颜色 + this->m_crTail = pInfo->m_crTail; // 尾线颜色 this->m_crPointFill=this->m_crCircle; // this->m_crGridSmall=qRgb(100,100,100); - this->m_flGrad1 = pInfo->m_flGrad1; //可信度 - this->m_flGrad2 = pInfo->m_flGrad2; - //Table dip + // 显示控制 + this->m_pl_minInclination = pInfo->m_pl_minInclination; // 最小倾角 + this->m_pl_maxInclination = pInfo->m_pl_maxInclination; // 最大倾角 + this->m_flGrad1 = pInfo->m_flGrad1; //可信度1 + this->m_flGrad2 = pInfo->m_flGrad2; //可信度2 + + //Table dip表名 this->m_qsTable="FRAC_HOLE.TABLE"; - this->m_iPrecision = pInfo->m_crack_decimal_digits; + this->m_iPrecision = pInfo->m_crack_decimal_digits; //小数位数 + + // 分类 + if(pInfo->m_pl_highGap)// 高导缝 + { + m_bTypeDraw[0] = true; + } + else + { + m_bTypeDraw[0] = false; + } + + if(pInfo->m_pl_highReservoir) // 高阻缝 + { + m_bTypeDraw[1] = true; + } + else + { + m_bTypeDraw[1] = false; + } + + if(pInfo->m_pl_reticularFracture) // 网状缝 + { + m_bTypeDraw[2] = true; + } + else + { + m_bTypeDraw[2] = false; + } + + if(pInfo->m_pl_inducedFracture) // 诱导缝 + { + m_bTypeDraw[3] = true; + } + else + { + m_bTypeDraw[3] = false; + } + + if(pInfo->m_pl_bedLayer) // 层理 + { + m_bTypeDraw[4] = true; + } + else + { + m_bTypeDraw[4] = false; + } + + if(pInfo->m_pl_erosionSurface) // 侵蚀面 + { + m_bTypeDraw[5] = true; + } + else + { + m_bTypeDraw[5] = false; + } + + if(pInfo->m_pl_pore) // 孔洞 + { + m_bTypeDraw[6] = true; + } + else + { + m_bTypeDraw[6] = false; + } + + if(pInfo->m_pl_vesicle) // 气孔 + { + m_bTypeDraw[7] = true; + } + else + { + m_bTypeDraw[7] = false; + } + + if(pInfo->m_pl_gravel) // 砾石 + { + m_bTypeDraw[8] = true; + } + else + { + m_bTypeDraw[8] = false; + } + + if(pInfo->m_pl_nodule) // 结核 + { + m_bTypeDraw[9] = true; + } + else + { + m_bTypeDraw[9] = false; + } + + if(pInfo->m_pl_lumps) // 团块 + { + m_bTypeDraw[10] = true; + } + else + { + m_bTypeDraw[10] = false; + } + + if(pInfo->m_pl_fault) // 断层 + { + m_bTypeDraw[11] = true; + } + else + { + m_bTypeDraw[11] = false; + } + + if(pInfo->m_pl_verticalFracture) // 垂直缝 + { + m_bTypeDraw[12] = true; + } + else + { + m_bTypeDraw[12] = false; + } + + if(pInfo->m_pl_custom1) // 自定义1 + { + m_bTypeDraw[13] = true; + } + else + { + m_bTypeDraw[13] = false; + } + + if(pInfo->m_pl_custom2) // 自定义2 + { + m_bTypeDraw[14] = true; + } + else + { + m_bTypeDraw[14] = false; + } if (m_bTableData) { ReadFracDef_gaodaofeng(); - for (int i = 0 ; i < iFracType ; i++) - { - m_bTypeDraw[i] = true; - } +// for (int i = 0 ; i < iFracType ; i++) +// { +// m_bTypeDraw[i] = true; +// } ReadData(m_strSlfName, m_strLineName); } else @@ -12065,8 +12206,9 @@ void QMyCustomPlot::DrawDip_Kedou() //尾巴 QPen pPenTail(m_crTail); pPenTail.setWidth(m_nTailWidth); - // - QBrush cBrushFill(m_crPointFill); + //圆填充 + QBrush cBrushFill(m_crPointFill); + QBrush brush2(QColor(qRgb(255,255,255)));//NULL_BRUSH float flDepthScale,tempf,flVal; int nPointNum=0,tempi; @@ -12104,9 +12246,32 @@ void QMyCustomPlot::DrawDip_Kedou() continue; } + bool bFillBrush = true; + if ( m_Value3!=NULL)// && m_Value3 !=0xcdcdcdcd ) + { + flVal = GetData(m_Curve3.RepCode,(char *)&m_Value3[i*m_Curve3.CodeLen]);//置信度 + if ( flVal < m_flGrad1 ) + { + k++; + continue; + } + if ( flVal > m_flGrad2 ) + { + bFillBrush = true; + } + else + { + bFillBrush = false; + } + } + else + { + bFillBrush = true; + } + // flVal = GetData(m_Curve2.RepCode,(char *)&m_Value2[i*m_Curve2.CodeLen]);//DANG - if ( flVal > m_flGrad2 || flVal < m_flGrad1 ) + if ( flVal > m_pl_maxInclination || flVal < m_pl_minInclination ) { k++; continue; @@ -12129,7 +12294,14 @@ void QMyCustomPlot::DrawDip_Kedou() qcpItemEllipse->m_nRadius = m_nRadius; qcpItemEllipse->topLeft->setCoords(y, x);//圆心位置 qcpItemEllipse->bottomRight->setCoords(y, x);//圆心位置 - qcpItemEllipse->setBrush(cBrushFill);//填充圆的颜色 + if(bFillBrush) + { + qcpItemEllipse->setBrush(cBrushFill);//填充圆的颜色 + } + else + { + qcpItemEllipse->setBrush(brush2);//填充圆的颜色 + } //方位 flVal = GetData(m_Curve.RepCode,(char *)&m_Value[i*m_Curve.CodeLen]);//DDIR diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index ee7b7fc..d09d6fc 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -733,6 +733,8 @@ public: void addQCPItemLine(QMyCustomPlot *widget, float cx, float cy, const QPointF& p1, const QPointF& p2, const QPen& wPen); //蝌蚪 + double m_pl_minInclination = 0; // 最小倾角 + double m_pl_maxInclination = 90; // 最大倾角 float m_flGrad1,m_flGrad2; // 可信度 int m_iPrecision; //小数位数 float m_nRadius,m_nCircleWidth; // 半径,圆线宽度