Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
# Conflicts: # logPlus/formdraw.cpp
This commit is contained in:
commit
461c773e63
|
|
@ -2287,6 +2287,11 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
CommonPropertyChanged(pProperty, variant);
|
||||
changedPlObjectProperty(m_propertyData[pProperty], variant);
|
||||
}
|
||||
else if(m_strCurrentProperty == ROSE_OBJECT_PROPERTY) // 玫瑰图
|
||||
{
|
||||
CommonPropertyChanged(pProperty, variant);
|
||||
changedRoseProperty(m_propertyData[pProperty], variant);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -4484,10 +4489,10 @@ void PropertyWidget::initRoseProperty(FormInfo *formInfo)
|
|||
|
||||
_CreateVariantPropertyItem("通常", "例区高度(cm)", formInfo->m_headHeight, QVariant::Int);
|
||||
|
||||
_CreateVariantPropertyItem("表数据", "深度字段", m_strSlfName, QVariant::String);
|
||||
_CreateVariantPropertyItem("表数据", "方位字段", m_strSlfName, QVariant::String);
|
||||
_CreateVariantPropertyItem("表数据", "倾角字段", m_strSlfName, QVariant::String);
|
||||
_CreateVariantPropertyItem("表数据", "属性字段", m_strSlfName, 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_pl_controlCurveName, QVariant::String);
|
||||
_CreateVariantPropertyItem("控制曲线", "最小值", formInfo->m_pl_controlMinValue, QVariant::Int);
|
||||
|
|
@ -4497,18 +4502,18 @@ void PropertyWidget::initRoseProperty(FormInfo *formInfo)
|
|||
_CreateVariantPropertyItem("字体", "单位", formInfo->m_strUnitFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("字体", "刻度", formInfo->m_pl_fontScale, QVariant::Font);
|
||||
|
||||
_CreateVariantPropertyItem("玫瑰图", "扇形", 36, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "圆半径(cm)", 1, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "辐射圈", 9, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "方位打印间隔", 3, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "圆线颜色", QColor(0,0,0), QVariant::Color);
|
||||
_CreateVariantPropertyItem("玫瑰图", "圆线宽度", 2, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "应力线颜色", QColor(255, 170, 0), QVariant::Color);
|
||||
_CreateVariantPropertyItem("玫瑰图", "垮塌线颜色", QColor(0, 0, 255), QVariant::Color);
|
||||
_CreateVariantPropertyItem("玫瑰图", "绘制辐射线?", true, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("玫瑰图", "绘制井眼垮塌", true, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("玫瑰图", "是否填充", true, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("玫瑰图", "是否绘制标注?", true, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("玫瑰图", "扇形", formInfo->m_rose_sector_enabled, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "圆半径(cm)", formInfo->m_rose_circle_radius_cm, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "辐射圈", formInfo->m_rose_radiation_circle_enabled, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "方位打印间隔", formInfo->m_rose_azimuth_print_interval, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "圆线颜色", formInfo->m_rose_circle_line_color, QVariant::Color);
|
||||
_CreateVariantPropertyItem("玫瑰图", "圆线宽度", formInfo->m_rose_circle_line_width, QVariant::Int);
|
||||
_CreateVariantPropertyItem("玫瑰图", "应力线颜色", formInfo->m_rose_stress_line_color, QVariant::Color);
|
||||
_CreateVariantPropertyItem("玫瑰图", "垮塌线颜色", formInfo->m_rose_collapse_line_color, QVariant::Color);
|
||||
_CreateVariantPropertyItem("玫瑰图", "绘制辐射线?", formInfo->m_rose_draw_radiation_line, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("玫瑰图", "绘制井眼垮塌", formInfo->m_rose_draw_wellbore_collapse, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("玫瑰图", "是否填充", formInfo->m_rose_fill_enabled, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("玫瑰图", "是否绘制标注?", formInfo->m_rose_draw_annotation, QVariant::Bool);
|
||||
|
||||
_CreateVariantPropertyItem("统计参数", "统计间隔", formInfo->m_pl_statInterval, QVariant::Int);
|
||||
_CreateVariantPropertyItem("统计参数", "最小倾角", formInfo->m_pl_minInclination, QVariant::Double);
|
||||
|
|
@ -4536,6 +4541,7 @@ void PropertyWidget::initRoseProperty(FormInfo *formInfo)
|
|||
void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
|
||||
{
|
||||
bool flag = false;
|
||||
// 数据
|
||||
if ("数据名称" == strProperty)
|
||||
{
|
||||
m_formInfo->m_strAliasName = varVal.toString();
|
||||
|
|
@ -4558,6 +4564,7 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
|
|||
{
|
||||
this->m_formInfo->m_pl_inclinationCurve = varVal.toString();
|
||||
}
|
||||
// 通常
|
||||
else if ("例区高度(cm)" == strProperty)
|
||||
{
|
||||
int temp = varVal.toInt();
|
||||
|
|
@ -4565,7 +4572,8 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
|
|||
this->m_formInfo->setFixedHeight(temp);
|
||||
this->m_formInfo->repaint();
|
||||
}
|
||||
else if ("名称" == strProperty || "曲线名称" == strProperty)
|
||||
// 字体
|
||||
else if ("名称" == strProperty)
|
||||
{
|
||||
QFont newFont = varVal.value<QFont>();
|
||||
this->m_formInfo->m_strAliasNameFont = newFont;
|
||||
|
|
@ -4583,6 +4591,7 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
|
|||
this->m_formInfo->m_pl_fontScale = temp;
|
||||
this->m_formInfo->repaint();
|
||||
}
|
||||
// 控制曲线
|
||||
else if ("曲线名" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_controlCurveName = varVal.toString();
|
||||
|
|
@ -4598,76 +4607,7 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
|
|||
this->m_formInfo->m_pl_controlMaxValue = varVal.toDouble();
|
||||
flag = true;
|
||||
}
|
||||
else if ("扇形" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_sectorCount = varVal.toInt();
|
||||
flag = true;
|
||||
}
|
||||
else if ("圆半径(cm)" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_circleRadius = varVal.toInt();
|
||||
flag = true;
|
||||
}
|
||||
else if ("圆线颜色" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_circleColor = varVal.value<QColor>();
|
||||
flag = true;
|
||||
}
|
||||
else if ("圆线宽度" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_circleLineWidth = varVal.toInt();
|
||||
flag = true;
|
||||
}
|
||||
else if ("是否填充" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_isFillEnabled = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("填充颜色" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_fillColor = varVal.value<QColor>();
|
||||
flag = true;
|
||||
}
|
||||
else if ("线数" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_lineNumber = varVal.toInt();
|
||||
flag = true;
|
||||
}
|
||||
else if ("统计线高度" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_lineHeight = varVal.toDouble();
|
||||
flag = true;
|
||||
}
|
||||
else if ("线粗细" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_lineThickness = varVal.toInt();
|
||||
flag = true;
|
||||
}
|
||||
else if ("线颜色" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_lineColor = varVal.value<QColor>();
|
||||
flag = true;
|
||||
}
|
||||
else if ("是否绘制标注?" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_drawAnnotation = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("绘制直方图?" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_drawHistogram = varVal.toBool();
|
||||
flag = true;
|
||||
}
|
||||
else if ("宽度" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_baselineWidth = varVal.toInt();
|
||||
flag = true;
|
||||
}
|
||||
else if ("颜色" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_baselineColor = varVal.value<QColor>();
|
||||
flag = true;
|
||||
}
|
||||
// 统计参数
|
||||
else if ("统计间隔" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_statInterval = varVal.toInt();
|
||||
|
|
@ -4683,6 +4623,7 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
|
|||
this->m_formInfo->m_pl_maxInclination = varVal.toDouble();
|
||||
flag = true;
|
||||
}
|
||||
// 分类
|
||||
else if ("高导缝" == strProperty)
|
||||
{
|
||||
this->m_formInfo->m_pl_highGap = varVal.toBool();
|
||||
|
|
@ -4743,6 +4684,7 @@ void PropertyWidget::changedRoseProperty(QString strProperty, QVariant varVal)
|
|||
{
|
||||
this->m_formInfo->m_pl_custom2 = varVal.toBool();
|
||||
}
|
||||
// 玫瑰图
|
||||
|
||||
if(flag)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -355,9 +355,12 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
lineNumber, lineHeight, lineThickness, lineColor, drawAnnotation, drawHistogram,
|
||||
baselineWidth, baselineColor, statInterval, minInclination, maxInclination);
|
||||
}
|
||||
else if("roseObject" == strType)
|
||||
else if("roseObject" == strType) // 玫瑰图
|
||||
{
|
||||
pInfo->m_pl_azimuthCurve = "STRDIR"; // 方位曲线
|
||||
pInfo->m_pl_inclinationCurve = "CALM"; // 倾角曲线
|
||||
initRose(curv);
|
||||
|
||||
}
|
||||
else if("dcaObject" == strType)
|
||||
{
|
||||
|
|
@ -5948,16 +5951,15 @@ void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString str
|
|||
void FormDraw::initDepth(QMyCustomPlot *curv)
|
||||
{
|
||||
// x轴隐藏
|
||||
curv->xAxis->setTicks(false);
|
||||
curv->xAxis->setSubTicks(false);
|
||||
curv->xAxis->setTickLabels(false);
|
||||
|
||||
curv->yAxis->setTicks(true);
|
||||
curv->yAxis->setTickLabels(true);
|
||||
|
||||
curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
|
||||
QFont font1("微软雅黑", 8);
|
||||
curv->yAxis->setTickLabelFont(font1);
|
||||
curv->yAxis->setRange(m_iY1, m_iY2);
|
||||
curv->yAxis->setRange(qAbs(m_iY1), m_iY2);
|
||||
curv->yAxis->setRangeReversed(true);
|
||||
|
||||
curv->axisRect()->setupFullAxesBox();
|
||||
curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
curv->m_bX2Y = false;
|
||||
|
|
|
|||
|
|
@ -445,48 +445,73 @@ QJsonObject FormInfo::makeJson()
|
|||
// 绘制颜色
|
||||
rootObj["yxzpLabelFont"] = m_yxzpDrawColor;
|
||||
}
|
||||
else if (m_strType == "plObject") // 岩心照片
|
||||
else if (m_strType == "plObject") // 频率统计图
|
||||
{
|
||||
// 数据名称
|
||||
rootObj["m_pl_dataType"] = this->m_pl_dataType; // 数据类型
|
||||
// 显示单位
|
||||
// 井文件名称
|
||||
rootObj["m_pl_azimuthCurve"] = this->m_pl_azimuthCurve; // 方位曲线
|
||||
rootObj["m_pl_inclinationCurve"] = this->m_pl_inclinationCurve; // 倾角曲线
|
||||
|
||||
rootObj["m_headHeight"] = this->m_headHeight; // 例区高度
|
||||
|
||||
rootObj["m_strAliasNameFont"] = this->m_strAliasNameFont.toString(); // 名称
|
||||
rootObj["m_strUnitFont"] = this->m_strUnitFont.toString(); // 单位
|
||||
rootObj["m_pl_fontScale"] = this->m_pl_fontScale.toString(); // 刻度
|
||||
// rootObj["m_strAliasNameFont"] = this->m_strAliasNameFont; // 曲线名称
|
||||
|
||||
rootObj["m_pl_controlCurveName"] = this->m_pl_controlCurveName; // 曲线名
|
||||
rootObj["m_pl_controlMinValue"] = this->m_pl_controlMinValue; // 最小值
|
||||
rootObj["m_pl_controlMaxValue"] = this->m_pl_controlMaxValue; // 最大值
|
||||
|
||||
// 方位频率
|
||||
rootObj["m_pl_sectorCount"] = this->m_pl_sectorCount; // 扇形
|
||||
rootObj["m_pl_circleRadius"] = this->m_pl_circleRadius; // 圆半径
|
||||
rootObj["m_pl_circleColor"] = this->m_pl_circleColor.name(); // 圆线颜色
|
||||
rootObj["m_pl_circleLineWidth"] = this->m_pl_circleLineWidth; // 圆线宽度
|
||||
rootObj["m_pl_isFillEnabled"] = this->m_pl_isFillEnabled; // 是否填充
|
||||
rootObj["m_pl_fillColor"] = this->m_pl_fillColor.name(); // 填充颜色
|
||||
|
||||
// 倾角频率
|
||||
rootObj["m_pl_lineNumber"] = this->m_pl_lineNumber; // 线数
|
||||
rootObj["m_pl_lineHeight"] = this->m_pl_lineHeight; // 统计线高度
|
||||
rootObj["m_pl_lineThickness"] = this->m_pl_lineThickness; // 线粗细
|
||||
rootObj["m_pl_lineColor"] = this->m_pl_lineColor.name(); // 线颜色
|
||||
rootObj["m_pl_drawAnnotation"] = this->m_pl_drawAnnotation; // 是否绘制标注?
|
||||
rootObj["m_pl_drawHistogram"] = this->m_pl_drawHistogram; // 绘制直方图?
|
||||
|
||||
|
||||
// 基线
|
||||
rootObj["m_pl_baselineWidth"] = this->m_pl_baselineWidth; // 宽度
|
||||
rootObj["m_pl_baselineColor"] = this->m_pl_baselineColor.name(); // 颜色
|
||||
}
|
||||
else if (m_strType == "roseObject") //
|
||||
{
|
||||
// 表数据
|
||||
rootObj["m_rose_depth_field"] = this->m_rose_depth_field; // 深度字段
|
||||
rootObj["m_rose_azimuth_field"] = this->m_rose_azimuth_field; // 方位字段
|
||||
rootObj["m_rose_dip_field"] = this->m_rose_dip_field; // 倾角字段
|
||||
rootObj["m_rose_attribute_field"] = this->m_rose_attribute_field; // 属性字段
|
||||
// 玫瑰图
|
||||
rootObj["m_rose_sector_enabled"] = this->m_rose_sector_enabled; // 扇形
|
||||
rootObj["m_rose_circle_radius_cm"] = this->m_rose_circle_radius_cm; // 圆半径(cm)
|
||||
rootObj["m_rose_radiation_circle_enabled"] = this->m_rose_radiation_circle_enabled; // 辐射圈
|
||||
rootObj["m_rose_azimuth_print_interval"] = this->m_rose_azimuth_print_interval; // 方位打印间隔
|
||||
rootObj["m_rose_circle_line_color"] = this->m_rose_circle_line_color.name(); // 圆线颜色
|
||||
rootObj["m_rose_circle_line_width"] = this->m_rose_circle_line_width; // 圆线宽度
|
||||
rootObj["m_rose_stress_line_color"] = this->m_rose_stress_line_color.name(); // 应力线颜色
|
||||
rootObj["m_rose_collapse_line_color"] = this->m_rose_collapse_line_color.name(); // 垮塌线颜色
|
||||
rootObj["m_rose_draw_radiation_line"] = this->m_rose_draw_radiation_line; // 绘制辐射线?
|
||||
rootObj["m_rose_draw_wellbore_collapse"] = this->m_rose_draw_wellbore_collapse; // 绘制井眼垮塌
|
||||
rootObj["m_rose_fill_enabled"] = this->m_rose_fill_enabled; // 是否填充
|
||||
rootObj["m_rose_draw_annotation"] = this->m_rose_draw_annotation; // 是否绘制标注?
|
||||
}
|
||||
|
||||
if (m_strType == "plObject" || m_strType == "roseObject")
|
||||
{
|
||||
// 数据
|
||||
// 数据名称
|
||||
rootObj["m_pl_dataType"] = this->m_pl_dataType; // 数据类型
|
||||
// 显示单位
|
||||
// 井文件名称
|
||||
rootObj["m_pl_azimuthCurve"] = this->m_pl_azimuthCurve; // 方位曲线
|
||||
rootObj["m_pl_inclinationCurve"] = this->m_pl_inclinationCurve; // 倾角曲线
|
||||
// 通常
|
||||
rootObj["m_headHeight"] = this->m_headHeight; // 例区高度
|
||||
// 字体
|
||||
rootObj["m_strAliasNameFont"] = this->m_strAliasNameFont.toString(); // 名称
|
||||
rootObj["m_strUnitFont"] = this->m_strUnitFont.toString(); // 单位
|
||||
rootObj["m_pl_fontScale"] = this->m_pl_fontScale.toString(); // 刻度
|
||||
// rootObj["m_strAliasNameFont"] = this->m_strAliasNameFont; // 曲线名称
|
||||
// 控制曲线
|
||||
rootObj["m_pl_controlCurveName"] = this->m_pl_controlCurveName; // 曲线名
|
||||
rootObj["m_pl_controlMinValue"] = this->m_pl_controlMinValue; // 最小值
|
||||
rootObj["m_pl_controlMaxValue"] = this->m_pl_controlMaxValue; // 最大值
|
||||
// 统计参数
|
||||
rootObj["m_pl_statInterval"] = this->m_pl_statInterval; // 统计间隔
|
||||
rootObj["m_pl_minInclination"] = this->m_pl_minInclination; // 最小倾角
|
||||
rootObj["m_pl_maxInclination"] = this->m_pl_maxInclination; // 最大倾角
|
||||
|
||||
// 分类
|
||||
rootObj["m_pl_highGap"] = this->m_pl_highGap; // 高导缝
|
||||
rootObj["m_pl_highReservoir"] = this->m_pl_highReservoir; // 高阻缝
|
||||
rootObj["m_pl_reticularFracture"] = this->m_pl_reticularFracture; // 网状缝
|
||||
|
|
@ -502,8 +527,8 @@ QJsonObject FormInfo::makeJson()
|
|||
rootObj["m_pl_verticalFracture"] = this->m_pl_verticalFracture; // 垂直缝
|
||||
rootObj["m_pl_custom1"] = this->m_pl_custom1; // 自定义1
|
||||
rootObj["m_pl_custom2"] = this->m_pl_custom2; // 自定义2
|
||||
}
|
||||
|
||||
}
|
||||
return rootObj;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,10 +304,10 @@ public:
|
|||
QString m_rose_attribute_field; // 属性字段
|
||||
|
||||
// 玫瑰图核心配置
|
||||
bool m_rose_sector_enabled; // 扇形(启用开关)
|
||||
double m_rose_circle_radius_cm; // 圆半径(cm)
|
||||
bool m_rose_radiation_circle_enabled; // 辐射圈(启用开关)
|
||||
double m_rose_azimuth_print_interval; // 方位打印间隔
|
||||
int m_rose_sector_enabled; // 扇形(启用开关)
|
||||
int m_rose_circle_radius_cm; // 圆半径(cm)
|
||||
int m_rose_radiation_circle_enabled; // 辐射圈(启用开关)
|
||||
int m_rose_azimuth_print_interval; // 方位打印间隔
|
||||
QColor m_rose_circle_line_color; // 圆线颜色
|
||||
int m_rose_circle_line_width; // 圆线宽度
|
||||
QColor m_rose_stress_line_color; // 应力线颜色
|
||||
|
|
@ -317,9 +317,6 @@ public:
|
|||
bool m_rose_fill_enabled; // 是否填充
|
||||
bool m_rose_draw_annotation; // 是否绘制标注?
|
||||
|
||||
|
||||
|
||||
|
||||
int cpLineWidth() const;
|
||||
void setCpLineWidth(int cpLineWidth);
|
||||
|
||||
|
|
|
|||
|
|
@ -264,9 +264,7 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
|
|||
bool bFistValue = false;
|
||||
float vmax = -9999;//(float)_nSamples;
|
||||
float vmin = -9999;
|
||||
//
|
||||
#define W_NEW
|
||||
#ifdef W_NEW
|
||||
|
||||
float detp = _SDep;
|
||||
float edepc = _EDep;
|
||||
if (m_nWaveJg < 10)
|
||||
|
|
@ -327,30 +325,6 @@ void QMyCustomPlot::initWave(QString strSlfName, QString strWaveName)
|
|||
m_vecWaveData << ve;
|
||||
}
|
||||
|
||||
#else
|
||||
double** wavedata = widget->getWavedata(_nSamples, m_Record);
|
||||
for (int i = 0; i < m_Record; i++)
|
||||
{
|
||||
for (int kk = 0; kk < _nSamples; kk++)
|
||||
{
|
||||
double val = GetData(_wave.RepCode, (char *)&value[(kk)*_wave.CodeLen + i * _nSamples*_wave.CodeLen]);
|
||||
wavedata[kk][i] = val;
|
||||
if (val == -9999)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (bFistValue == false)
|
||||
{
|
||||
//最大值,最小值默认采用第一个有效值
|
||||
bFistValue = true;
|
||||
vmax = vmin = val;
|
||||
}
|
||||
//
|
||||
if (vmax < val)vmax = val;
|
||||
if (vmin > val)vmin = val;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
delete[] value;
|
||||
|
||||
float f = 264 / 269.0f;
|
||||
|
|
@ -626,29 +600,6 @@ void QMyCustomPlot::setSchemeIndex(int nidx, int colorNum)
|
|||
m_colorMap->setGradient(gradient);
|
||||
}
|
||||
|
||||
double** QMyCustomPlot::getWavedata(int nrow, int ncol)
|
||||
{
|
||||
if (nrow > 0 && m_wavedata)
|
||||
{
|
||||
for (int i = 0; i < m_nRow; i++)
|
||||
{
|
||||
if (m_wavedata[i])
|
||||
{
|
||||
delete[] m_wavedata[i];
|
||||
}
|
||||
}
|
||||
delete[] m_wavedata;
|
||||
m_wavedata = NULL;
|
||||
}
|
||||
m_nRow = nrow;
|
||||
m_nCol = ncol;
|
||||
m_wavedata = new double*[nrow];
|
||||
for (int kk = 0; kk < nrow; kk++) {
|
||||
m_wavedata[kk] = new double[ncol];
|
||||
}
|
||||
return m_wavedata;
|
||||
}
|
||||
|
||||
QCPColorMap * QMyCustomPlot::updateWave()
|
||||
{
|
||||
int nx = m_vecWaveData.size();
|
||||
|
|
@ -690,44 +641,6 @@ QCPColorMap * QMyCustomPlot::updateWave()
|
|||
m_colorMap->data()->setCell(nx - xIndex - 1, yIndex, dz);
|
||||
}
|
||||
}
|
||||
//int nx = m_nCol;
|
||||
//int ny = m_nRow;
|
||||
|
||||
//// :现在,我们通过访问颜色贴图的QCPColorMapData实例来分配一些数据:
|
||||
//double x, y, z;
|
||||
//for (int xIndex = 0; xIndex < nx; ++xIndex)
|
||||
//{
|
||||
// for (int yIndex = 0; yIndex < ny; ++yIndex)
|
||||
// {
|
||||
// double dz = m_wavedata[yIndex][xIndex];
|
||||
// if (m_nMode == 0)
|
||||
// {
|
||||
// if (m_wavedata[yIndex][xIndex] == -9999)
|
||||
// {
|
||||
// dz = m_fmax;
|
||||
// }
|
||||
// }
|
||||
// else if (m_nMode == 1)
|
||||
// {
|
||||
// if (m_wavedata[yIndex][xIndex] == -9999)
|
||||
// {
|
||||
// dz = m_fmin;
|
||||
// }
|
||||
// }
|
||||
// else if (m_nMode == 2)
|
||||
// {
|
||||
// if (m_wavedata[yIndex][xIndex] == -9999)
|
||||
// {
|
||||
// dz = m_fmax;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dz = m_fmin;
|
||||
// }
|
||||
// }
|
||||
// m_colorMap->data()->setCell(nx - xIndex - 1, yIndex, dz);
|
||||
// }
|
||||
//}
|
||||
return m_colorMap;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ public:
|
|||
|
||||
void initColorTable();
|
||||
void setSchemeIndex(int nidx, int colorNum);
|
||||
double** getWavedata(int nrow, int ncol);
|
||||
QCPColorMap * updateWave();
|
||||
|
||||
float getScaleV();
|
||||
|
|
@ -152,7 +151,6 @@ public:
|
|||
|
||||
QCPColorMap *m_colorMap = NULL;
|
||||
QCPColorScale * m_colorScale = NULL;
|
||||
double** m_wavedata = NULL;
|
||||
QVector< QVector <double>> m_vecWaveData;
|
||||
int m_nRow = 0;
|
||||
int m_nCol = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user