波列属性道重新实现。 使用QPainter
This commit is contained in:
parent
5901527c6e
commit
8fbbe54c02
|
|
@ -14,10 +14,6 @@
|
|||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef BOOL
|
||||
#define BOOL bool
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE false
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -772,14 +772,14 @@ void CInDefTableDlg::InitList1()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL CInDefTableDlg::mIsNumber(QString str)//判断字符串是否为数值
|
||||
bool CInDefTableDlg::mIsNumber(QString str)//判断字符串是否为数值
|
||||
{
|
||||
QByteArray ba = str.toLatin1();//QString 转换为 char*
|
||||
const char *buf = ba.data();
|
||||
int len=strlen(str.toStdString().c_str());//str.length();//whp change 2020.3.16
|
||||
int dig[30];
|
||||
int DotNum=0;//小数点个数
|
||||
BOOL IsDigital=1;
|
||||
bool IsDigital=1;
|
||||
for(int i=0;i<len;i++)
|
||||
{
|
||||
if(i==0&&buf[i]=='-')continue;//可能是负数
|
||||
|
|
|
|||
|
|
@ -16,6 +16,13 @@
|
|||
#define SECTIONVIEW_NUM 255
|
||||
#define SYSTEM_INPOLATION 65 // 系统缺省颜色需要插值成的数目
|
||||
|
||||
enum AxisType
|
||||
{
|
||||
AXIS_LINEAR = 0,//线性坐标系
|
||||
AXIS_LOGARITHMIC = 1,//对数坐标系
|
||||
AXIS_DIP = 2, //倾角坐标系
|
||||
};
|
||||
|
||||
struct My_ColorItem
|
||||
{
|
||||
QRgb color; // 颜色值
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ signals:
|
|||
void sig_New();
|
||||
void sig_Open();
|
||||
|
||||
void sig_ResizeHeight(QString strUuid, int nHei);
|
||||
void sig_ResizeDepth(QString strUuid, int nHei, float fDepthLowerY);
|
||||
void sig_Risize();
|
||||
void sig_AddOne();
|
||||
void sig_AddLine(int indexID);
|
||||
|
|
|
|||
|
|
@ -10,12 +10,6 @@ class LogmudItemDrawer
|
|||
public:
|
||||
LogmudItemDrawer();
|
||||
|
||||
enum AxisType
|
||||
{
|
||||
AXIS_LINEAR = 0,//线性坐标系
|
||||
AXIS_LOGARITHMIC = 1,//对数坐标系
|
||||
AXIS_DIP = 2, //倾角坐标系
|
||||
};
|
||||
/**
|
||||
* @brief 绘制每一个井壁取心分段的方法
|
||||
* @param painter 绘制设备
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "PickFrac.h"
|
||||
#include "formline.h"
|
||||
#include "formlogmud.h"
|
||||
#include "formwave.h"
|
||||
#include "PropertyWidget.h"
|
||||
#include "DrawTvd.h"
|
||||
#include "DepthProgress.h"
|
||||
|
|
@ -156,303 +157,313 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo)
|
|||
//道-对象
|
||||
FormInfo* pInfo = m_formTrack->setDrawDt(listdt, objInfo);
|
||||
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initGeometry(m_strUuid, m_iScale, dW);
|
||||
curv->show();
|
||||
if ("waveObject" == strType)
|
||||
{
|
||||
FormWave *pwave = new FormWave(this, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
pwave->setDepthY(m_iY1, m_iY2);
|
||||
pwave->initGeometry(m_strUuid, m_iScale, dW, m_nObjDrawH);
|
||||
pwave->m_formTrack = m_formTrack;
|
||||
pwave->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initGeometry(m_strUuid, m_iScale, dW);
|
||||
curv->show();
|
||||
|
||||
if ("waveObject" == strType)
|
||||
{
|
||||
curv->m_nMode = pInfo->getFillTypeIndex();
|
||||
//curv->m_fmin = pInfo->getVMin();
|
||||
//curv->m_fmax = pInfo->getVMax();
|
||||
curv->m_nDrawType = pInfo->m_nDrawType;
|
||||
curv->m_bDrawDepth = pInfo->m_bDrawDepth; // 绘制波深度
|
||||
curv->m_bDrawBase = pInfo->m_bDrawBase; // 绘制波深度
|
||||
curv->m_bOddEven = pInfo->m_bOddEven; // 绘制波深度
|
||||
if ("waveObject" == strType)
|
||||
{
|
||||
curv->m_nMode = pInfo->getFillTypeIndex();
|
||||
//curv->m_fmin = pInfo->getVMin();
|
||||
//curv->m_fmax = pInfo->getVMax();
|
||||
curv->m_nDrawType = pInfo->m_nDrawType;
|
||||
curv->m_bDrawDepth = pInfo->m_bDrawDepth; // 绘制波深度
|
||||
curv->m_bDrawBase = pInfo->m_bDrawBase; // 绘制波深度
|
||||
curv->m_bOddEven = pInfo->m_bOddEven; // 绘制波深度
|
||||
|
||||
curv->m_MaxRange = pInfo->m_fMaxAmp; // 最大振幅
|
||||
curv->m_Base = pInfo->m_fWaveBase; // 波列基值
|
||||
curv->m_nWaveJg = pInfo->m_nWaveJg; // 波形间隔
|
||||
curv->m_nWaveHei = pInfo->m_fWaveHei; // 波形高度
|
||||
curv->m_MaxRange = pInfo->m_fMaxAmp; // 最大振幅
|
||||
curv->m_Base = pInfo->m_fWaveBase; // 波列基值
|
||||
curv->m_nWaveJg = pInfo->m_nWaveJg; // 波形间隔
|
||||
curv->m_nWaveHei = pInfo->m_fWaveHei; // 波形高度
|
||||
|
||||
curv->m_nColorNum = pInfo->m_nColorNum;
|
||||
curv->m_nSchemeIndex = pInfo->m_nSchemeIndex;
|
||||
curv->m_fScaleV = pInfo->getVMax();
|
||||
curv->m_nColorNum = pInfo->m_nColorNum;
|
||||
curv->m_nSchemeIndex = pInfo->m_nSchemeIndex;
|
||||
curv->m_fScaleV = pInfo->getVMax();
|
||||
|
||||
int _nSamples = 0;
|
||||
if (g_iSupport3D)
|
||||
{
|
||||
initWave_3D(curv, m_strSlfName, strLineName, _nSamples);
|
||||
}
|
||||
else
|
||||
{
|
||||
curv->m_bX2Y = false;
|
||||
//curv->initWave2(m_strSlfName, strLineName);
|
||||
curv->changePropertyWaveUpdate();
|
||||
}
|
||||
}
|
||||
// 深度
|
||||
else if("depthObject" == strType)
|
||||
{
|
||||
initDepth(curv);
|
||||
int _nSamples = 0;
|
||||
if (g_iSupport3D)
|
||||
{
|
||||
initWave_3D(curv, m_strSlfName, strLineName, _nSamples);
|
||||
}
|
||||
else
|
||||
{
|
||||
curv->m_bX2Y = false;
|
||||
//curv->initWave2(m_strSlfName, strLineName);
|
||||
curv->changePropertyWaveUpdate();
|
||||
}
|
||||
}
|
||||
// 深度
|
||||
else if ("depthObject" == strType)
|
||||
{
|
||||
initDepth(curv);
|
||||
|
||||
// 在s_addDepth方法设置单位无效
|
||||
// 读json后 重新设置样式
|
||||
// 设置左侧显示属性 设置界面样式
|
||||
if(pInfo->m_strUnit.isEmpty()){
|
||||
pInfo->m_strUnit = "(米)";
|
||||
pInfo->m_strUnitFont = QFont("微软雅黑", 8);
|
||||
}
|
||||
// 头部高度
|
||||
pInfo->setFixedHeight(pInfo->m_headHeight);
|
||||
// 标尺颜色
|
||||
curv->yAxis->setTickLabelColor(pInfo->m_sdRulerColor);
|
||||
// 间隔
|
||||
QSharedPointer<QCPAxisTickerFixed> fixedTicker(new QCPAxisTickerFixed);
|
||||
fixedTicker->setTickStep(pInfo->m_sdInterval);
|
||||
fixedTicker->setScaleStrategy(QCPAxisTickerFixed::ssNone);
|
||||
curv->yAxis->setTicker(fixedTicker);
|
||||
// 标注字体
|
||||
curv->yAxis->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
curv->m_yAxis2->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
curv->m_yAxis3->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
// 旋转(°)
|
||||
curv->yAxis->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
curv->m_yAxis2->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
curv->m_yAxis3->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
// 斜深
|
||||
curv->yAxis->setTickLabels(pInfo->m_sdMeasuredDepth);
|
||||
// 海拔垂深
|
||||
{
|
||||
bool temp = pInfo->m_sdElevationVerticalDepth;
|
||||
// 在s_addDepth方法设置单位无效
|
||||
// 读json后 重新设置样式
|
||||
// 设置左侧显示属性 设置界面样式
|
||||
if (pInfo->m_strUnit.isEmpty()) {
|
||||
pInfo->m_strUnit = "(米)";
|
||||
pInfo->m_strUnitFont = QFont("微软雅黑", 8);
|
||||
}
|
||||
// 头部高度
|
||||
pInfo->setFixedHeight(pInfo->m_headHeight);
|
||||
// 标尺颜色
|
||||
curv->yAxis->setTickLabelColor(pInfo->m_sdRulerColor);
|
||||
// 间隔
|
||||
QSharedPointer<QCPAxisTickerFixed> fixedTicker(new QCPAxisTickerFixed);
|
||||
fixedTicker->setTickStep(pInfo->m_sdInterval);
|
||||
fixedTicker->setScaleStrategy(QCPAxisTickerFixed::ssNone);
|
||||
curv->yAxis->setTicker(fixedTicker);
|
||||
// 标注字体
|
||||
curv->yAxis->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
curv->m_yAxis2->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
curv->m_yAxis3->setTickLabelFont(pInfo->m_sdLabelFont);
|
||||
// 旋转(°)
|
||||
curv->yAxis->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
curv->m_yAxis2->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
curv->m_yAxis3->setTickLabelRotation(pInfo->m_sdRotationAngle);
|
||||
// 斜深
|
||||
curv->yAxis->setTickLabels(pInfo->m_sdMeasuredDepth);
|
||||
// 海拔垂深
|
||||
{
|
||||
bool temp = pInfo->m_sdElevationVerticalDepth;
|
||||
|
||||
curv->m_yAxis2->setVisible(temp);
|
||||
curv->m_yAxis2->setTickLabels(temp);
|
||||
curv->m_yAxis2->setTickLabelSide(QCPAxis::lsInside);
|
||||
}
|
||||
// 垂深
|
||||
bool temp2 = pInfo->m_sdVerticalDepth;
|
||||
curv->m_yAxis3->setVisible(temp2); // 显示第三个Y轴
|
||||
curv->m_yAxis3->setTickLabels(temp2);
|
||||
curv->m_yAxis3->setTickLabelSide(QCPAxis::lsInside);
|
||||
curv->m_yAxis2->setVisible(temp);
|
||||
curv->m_yAxis2->setTickLabels(temp);
|
||||
curv->m_yAxis2->setTickLabelSide(QCPAxis::lsInside);
|
||||
}
|
||||
// 垂深
|
||||
bool temp2 = pInfo->m_sdVerticalDepth;
|
||||
curv->m_yAxis3->setVisible(temp2); // 显示第三个Y轴
|
||||
curv->m_yAxis3->setTickLabels(temp2);
|
||||
curv->m_yAxis3->setTickLabelSide(QCPAxis::lsInside);
|
||||
|
||||
QSize size = curv->size(); // 包含宽高的QSize对象
|
||||
int width2 = size.width();
|
||||
int center = width2 / 2 - pInfo->m_sdLabelFont.pointSize();
|
||||
int right = width2 - pInfo->m_sdLabelFont.pointSize() - 5;
|
||||
// 斜深位置
|
||||
switch(pInfo->m_sdMeasuredDepthPosition)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
curv->yAxis->setTickLabelPadding(5);
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->yAxis->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->yAxis->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
QSize size = curv->size(); // 包含宽高的QSize对象
|
||||
int width2 = size.width();
|
||||
int center = width2 / 2 - pInfo->m_sdLabelFont.pointSize();
|
||||
int right = width2 - pInfo->m_sdLabelFont.pointSize() - 5;
|
||||
// 斜深位置
|
||||
switch (pInfo->m_sdMeasuredDepthPosition)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
curv->yAxis->setTickLabelPadding(5);
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->yAxis->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->yAxis->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
|
||||
// 垂深位置
|
||||
switch(pInfo->m_sdVerticalDepthPosition)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
curv->m_yAxis3->setTickLabelPadding(5);
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->m_yAxis3->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->m_yAxis3->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
// 海拔垂深位置
|
||||
switch(pInfo->m_sdElevationVerticalDepthPosition)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
curv->m_yAxis2->setTickLabelPadding(5);
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->m_yAxis2->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->m_yAxis2->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
// 主刻度线长度
|
||||
{
|
||||
int temp = pInfo->m_sdMajorTickLineLength;
|
||||
curv->yAxis->setTickLength(temp, 0);
|
||||
}
|
||||
// 主刻度线宽度
|
||||
{
|
||||
int temp = pInfo->m_sdMajorTickLineWidth;
|
||||
QPen tickPen = curv->yAxis->tickPen();
|
||||
tickPen.setWidth(temp);
|
||||
curv->yAxis->setTickPen(tickPen);
|
||||
}
|
||||
// 次刻度线长度
|
||||
{
|
||||
int temp = pInfo->m_sdMinorTickLineLength;
|
||||
curv->yAxis->setSubTickLength(temp, 0);
|
||||
}
|
||||
// 次刻度线宽度
|
||||
{
|
||||
int temp = pInfo->m_sdMinorTickLineWidth;
|
||||
QPen tickPen = curv->yAxis->subTickPen();
|
||||
tickPen.setWidth(temp);
|
||||
curv->yAxis->setSubTickPen(tickPen);
|
||||
}
|
||||
}
|
||||
else if("plObject" == strType) // 频率统计图
|
||||
{
|
||||
// 读json后 重新设置样式
|
||||
// 设置左侧显示属性 设置界面样式
|
||||
if(pInfo->m_strUnit.isEmpty()){
|
||||
pInfo->m_strUnit = "(°)";
|
||||
pInfo->m_strUnitFont = QFont("微软雅黑", 8);
|
||||
}
|
||||
// 垂深位置
|
||||
switch (pInfo->m_sdVerticalDepthPosition)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
curv->m_yAxis3->setTickLabelPadding(5);
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->m_yAxis3->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->m_yAxis3->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
// 海拔垂深位置
|
||||
switch (pInfo->m_sdElevationVerticalDepthPosition)
|
||||
{
|
||||
case 0:
|
||||
// 偏左
|
||||
curv->m_yAxis2->setTickLabelPadding(5);
|
||||
break;
|
||||
case 1:
|
||||
// 居中
|
||||
curv->m_yAxis2->setTickLabelPadding(center);
|
||||
break;
|
||||
case 2:
|
||||
curv->m_yAxis2->setTickLabelPadding(right);
|
||||
break;
|
||||
}
|
||||
// 主刻度线长度
|
||||
{
|
||||
int temp = pInfo->m_sdMajorTickLineLength;
|
||||
curv->yAxis->setTickLength(temp, 0);
|
||||
}
|
||||
// 主刻度线宽度
|
||||
{
|
||||
int temp = pInfo->m_sdMajorTickLineWidth;
|
||||
QPen tickPen = curv->yAxis->tickPen();
|
||||
tickPen.setWidth(temp);
|
||||
curv->yAxis->setTickPen(tickPen);
|
||||
}
|
||||
// 次刻度线长度
|
||||
{
|
||||
int temp = pInfo->m_sdMinorTickLineLength;
|
||||
curv->yAxis->setSubTickLength(temp, 0);
|
||||
}
|
||||
// 次刻度线宽度
|
||||
{
|
||||
int temp = pInfo->m_sdMinorTickLineWidth;
|
||||
QPen tickPen = curv->yAxis->subTickPen();
|
||||
tickPen.setWidth(temp);
|
||||
curv->yAxis->setSubTickPen(tickPen);
|
||||
}
|
||||
}
|
||||
else if ("plObject" == strType) // 频率统计图
|
||||
{
|
||||
// 读json后 重新设置样式
|
||||
// 设置左侧显示属性 设置界面样式
|
||||
if (pInfo->m_strUnit.isEmpty()) {
|
||||
pInfo->m_strUnit = "(°)";
|
||||
pInfo->m_strUnitFont = QFont("微软雅黑", 8);
|
||||
}
|
||||
|
||||
this->initFgrq(curv);
|
||||
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);
|
||||
}
|
||||
else if("roseObject" == strType) // 玫瑰图
|
||||
{
|
||||
pInfo->m_pl_azimuthCurve = "STRDIR"; // 方位曲线
|
||||
pInfo->m_pl_inclinationCurve = "CALM"; // 倾角曲线
|
||||
if(pInfo->m_strUnit.isEmpty()){
|
||||
pInfo->m_strUnit = "(°)";
|
||||
pInfo->m_strUnitFont = QFont("微软雅黑", 8);
|
||||
}
|
||||
// 数据
|
||||
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);
|
||||
}
|
||||
else if ("roseObject" == strType) // 玫瑰图
|
||||
{
|
||||
pInfo->m_pl_azimuthCurve = "STRDIR"; // 方位曲线
|
||||
pInfo->m_pl_inclinationCurve = "CALM"; // 倾角曲线
|
||||
if (pInfo->m_strUnit.isEmpty()) {
|
||||
pInfo->m_strUnit = "(°)";
|
||||
pInfo->m_strUnitFont = QFont("微软雅黑", 8);
|
||||
}
|
||||
|
||||
this->initRose(curv);
|
||||
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;
|
||||
// 数据
|
||||
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);
|
||||
}
|
||||
else if("CrackObject" == strType) // 裂缝
|
||||
{
|
||||
// qDebug() << "==================== number:" << pInfo;
|
||||
// pInfo;
|
||||
// curv;
|
||||
}
|
||||
else if("dcaObject" == strType)
|
||||
{
|
||||
// m_dca_azimuth_curve异常方位曲线 m_dca_amplitude_curve异常幅度曲线 m_dca_left_azimuth_curve方位曲线左刻度 m_dca_right_azimuth_curve方位曲线右刻度 m_dca_maximum_amplitude最大异常幅度
|
||||
initDCA(curv, pInfo->m_dca_azimuth_curve, pInfo->m_dca_amplitude_curve, pInfo->m_dca_left_azimuth_curve, pInfo->m_dca_right_azimuth_curve, pInfo->m_dca_maximum_amplitude);
|
||||
}
|
||||
else if("tdtObject" == strType)
|
||||
{
|
||||
initTDT(curv);
|
||||
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);
|
||||
}
|
||||
else if ("CrackObject" == strType) // 裂缝
|
||||
{
|
||||
// qDebug() << "==================== number:" << pInfo;
|
||||
// pInfo;
|
||||
// curv;
|
||||
}
|
||||
else if ("dcaObject" == strType)
|
||||
{
|
||||
// m_dca_azimuth_curve异常方位曲线 m_dca_amplitude_curve异常幅度曲线 m_dca_left_azimuth_curve方位曲线左刻度 m_dca_right_azimuth_curve方位曲线右刻度 m_dca_maximum_amplitude最大异常幅度
|
||||
initDCA(curv, pInfo->m_dca_azimuth_curve, pInfo->m_dca_amplitude_curve, pInfo->m_dca_left_azimuth_curve, pInfo->m_dca_right_azimuth_curve, pInfo->m_dca_maximum_amplitude);
|
||||
}
|
||||
else if ("tdtObject" == strType)
|
||||
{
|
||||
initTDT(curv);
|
||||
|
||||
if(m_iY1 == 0.0)
|
||||
{
|
||||
QTimer::singleShot(200, this, [=]() {
|
||||
m_iY2 = -2000;
|
||||
m_iY1 = -2030;
|
||||
emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2);
|
||||
});
|
||||
}
|
||||
if (m_iY1 == 0.0)
|
||||
{
|
||||
QTimer::singleShot(200, this, [=]() {
|
||||
m_iY2 = -2000;
|
||||
m_iY1 = -2030;
|
||||
emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else if (strType == "tableObject")
|
||||
{
|
||||
//新建表格曲线
|
||||
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
curv->replot();
|
||||
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
}
|
||||
else if (strType == "tableObject")
|
||||
{
|
||||
//新建表格曲线
|
||||
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
curv->replot();
|
||||
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
}
|
||||
QTimer::singleShot(100, this, [=]() {
|
||||
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
|
||||
});
|
||||
|
|
@ -3615,51 +3626,59 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
|||
return;
|
||||
}
|
||||
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strWaveName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
int _nSamples = 0;
|
||||
double nW = m_nTrackW;
|
||||
if (nW <= 0)
|
||||
nW = g_iOneWidth;
|
||||
curv->initGeometry(m_strUuid, m_iScale, nW);
|
||||
|
||||
curv->m_bX2Y = false;
|
||||
bool bDraw = true;
|
||||
if (bDraw)
|
||||
{
|
||||
FormWave *pwave = new FormWave(this, strSlfName, strWellName, strTrackName, strWaveName);
|
||||
pwave->setDepthY(m_iY1, m_iY2);
|
||||
pwave->initGeometry(m_strUuid, m_iScale, nW, m_nObjDrawH);
|
||||
pwave->m_formTrack = m_formTrack;
|
||||
pwave->show();
|
||||
//pwave->replot();
|
||||
_nSamples = 264;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
curv->show();
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strWaveName);
|
||||
//绑定m_formTrack,方便关联formInfo
|
||||
curv->m_formTrack = m_formTrack;
|
||||
|
||||
int _nSamples = 0;
|
||||
if(g_iSupport3D)
|
||||
{
|
||||
initWave_3D(curv, strSlfName, strWaveName, _nSamples);
|
||||
}
|
||||
else
|
||||
{
|
||||
//此处追加,参照了下方setDrawData函数的处理
|
||||
//不然没有设置setRange初始范围,不支持新的右侧滚动条的setRange
|
||||
curv->m_bX2Y = false;
|
||||
curv->setDepthY(m_iY1, m_iY2);
|
||||
curv->initGeometry(m_strUuid, m_iScale, nW);
|
||||
|
||||
curv->initWave(strSlfName, strWaveName);
|
||||
curv->m_bX2Y = false;
|
||||
|
||||
// 圆柱渲染器
|
||||
// CylindricalImageMap* cylinderMap = new CylindricalImageMap(curv->xAxis, curv->yAxis);
|
||||
// cylinderMap->setData(curv->m_colorMap->data());
|
||||
// cylinderMap->setCylinderRadius(2.0);
|
||||
// cylinderMap->setSourceColorMap(curv->m_colorMap); // 共享梯度
|
||||
// cylinderMap->setAzimuth(45);
|
||||
// cylinderMap->setElevation(30);
|
||||
// // 隐藏原始的矩形色图
|
||||
// curv->m_colorMap->setVisible(false);
|
||||
//cylinderMap->rescaleAxes();
|
||||
curv->show();
|
||||
|
||||
_nSamples = curv->getScaleV();
|
||||
}
|
||||
curv->replot();
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
if (g_iSupport3D)
|
||||
{
|
||||
initWave_3D(curv, strSlfName, strWaveName, _nSamples);
|
||||
}
|
||||
else
|
||||
{
|
||||
//此处追加,参照了下方setDrawData函数的处理
|
||||
//不然没有设置setRange初始范围,不支持新的右侧滚动条的setRange
|
||||
curv->m_bX2Y = false;
|
||||
|
||||
QTimer::singleShot(100, this, [=]() {
|
||||
curv->initWave(strSlfName, strWaveName);
|
||||
|
||||
|
||||
_nSamples = curv->getScaleV();
|
||||
}
|
||||
curv->replot();
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
}
|
||||
m_listLineName.push_back(strWaveName);
|
||||
|
||||
QTimer::singleShot(100, this, [=]() {
|
||||
if (m_iY2 == 0.0)
|
||||
{
|
||||
// ####测试
|
||||
|
|
@ -3669,10 +3688,8 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
|||
emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2);
|
||||
});
|
||||
}
|
||||
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
|
||||
});
|
||||
//
|
||||
m_listLineName.push_back(strWaveName);
|
||||
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
|
||||
});
|
||||
|
||||
QString strAliasName = "";
|
||||
QString strUnit = "mv";
|
||||
|
|
@ -3816,6 +3833,15 @@ void FormDraw::setRowHeight(double dHight, QProgressBar *progressBar, int iSplit
|
|||
form->replot();//屏蔽,缩减时间
|
||||
}
|
||||
}
|
||||
else if (strObjName == "FormWave")
|
||||
{
|
||||
FormWave *formWave = qobject_cast<FormWave*>(childWidget);
|
||||
if (formWave)
|
||||
{
|
||||
formWave->updateDepthY(m_iY1, m_iY2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
@ -6077,7 +6103,7 @@ void FormDraw::initSwallCore(QMyCustomPlot *widget, QString strSlfName, QString
|
|||
widget->yAxis2->setVisible(false);
|
||||
//
|
||||
widget->LoadFromSLF_SwallCore(strSlfName, strLineName);
|
||||
|
||||
|
||||
if(listOtherProperty.size()>=3)
|
||||
{
|
||||
strAliasName = listOtherProperty[0];
|
||||
|
|
@ -6624,8 +6650,8 @@ void FormDraw::initDCA(QMyCustomPlot *widget, QString m_csCurveFd, QString m_csC
|
|||
if ( edepc > m_EDep ) edepc = m_EDep;
|
||||
if(edepc<sdepc) edepc=sdepc;
|
||||
|
||||
float m_PlotSdep=sdepc;
|
||||
float m_PlotEdep=edepc;
|
||||
//float m_PlotSdep=sdepc;
|
||||
//float m_PlotEdep=edepc;
|
||||
|
||||
m_LeftVal = m_dca_left_azimuth_curve;
|
||||
m_RightVal = m_dca_right_azimuth_curve;
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ public slots:
|
|||
public:
|
||||
QString m_strTrackName;
|
||||
double m_nTrackW = 0;
|
||||
int m_nObjDrawH = 0;
|
||||
|
||||
int m_iScale=200;
|
||||
double m_iY1=0;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "geometryutils.h"
|
||||
#include "qtColorSchemeComboBox.h"
|
||||
#include "DrawTvd.h"
|
||||
#include "formwave.h"
|
||||
|
||||
//曲线名称(单个)
|
||||
FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor) :
|
||||
|
|
@ -2633,8 +2634,12 @@ bool FormInfo::setInfoProperty(QString strProName, QVariant val, QString strGp)
|
|||
// {
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
this->update();
|
||||
if (m_pWave)
|
||||
{
|
||||
m_pWave->update();
|
||||
}
|
||||
return bDraw;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace Ui {
|
|||
class FormInfo;
|
||||
}
|
||||
|
||||
class FormWave;
|
||||
class CDrawTvd;
|
||||
class FormInfo : public QWidget
|
||||
{
|
||||
|
|
@ -173,6 +174,7 @@ public:
|
|||
|
||||
int m_nJg;
|
||||
|
||||
int m_nCurveMode=0; // 曲线类型
|
||||
int m_nDrawType; // 绘图类型
|
||||
int m_nFillType; // 填充类型
|
||||
|
||||
|
|
@ -180,14 +182,23 @@ public:
|
|||
bool m_bDrawBase = false; // 绘制波基线
|
||||
bool m_bOddEven = false; // 奇偶配色
|
||||
|
||||
QString m_strAmp; // 幅度刻度
|
||||
QString m_strAmp = "ABC"; // 幅度刻度
|
||||
float m_fMaxAmp; // 最大振幅
|
||||
bool m_bShowScale; // 显示刻度
|
||||
|
||||
float m_fWaveBase = 0.0f; // 波列基值
|
||||
int m_nWaveJg = 10; // 波形间隔
|
||||
int m_nWaveJg = 10; // 波形间隔
|
||||
float m_fWaveHei = 1; // 波形高度
|
||||
|
||||
int m_FirstRange = 4; // 起始波列
|
||||
int m_EndRange = 20; // 终止波列
|
||||
|
||||
int m_ArrayNum = 1; // 绘制阵列数
|
||||
QColor m_FillColor = Qt::black; // 波形填充颜色
|
||||
QColor m_WaveColor = Qt::black; // 波列曲线的颜色
|
||||
|
||||
float m_midValue = 0; // 归一化极值
|
||||
|
||||
int m_nColorNum = 256; // 调色板参数设置-变密度颜色级数
|
||||
int m_nSchemeIndex = 1; // 调色板参数设置-色板
|
||||
|
||||
|
|
@ -240,6 +251,7 @@ public:
|
|||
|
||||
//斜井三图一表(井斜数据表参数)
|
||||
CDrawTvd *m_pTvd;
|
||||
FormWave* m_pWave = NULL;
|
||||
|
||||
// 深度
|
||||
QColor m_sdRulerColor; // 标尺颜色
|
||||
|
|
|
|||
1447
logPlus/formwave.cpp
Normal file
1447
logPlus/formwave.cpp
Normal file
File diff suppressed because it is too large
Load Diff
114
logPlus/formwave.h
Normal file
114
logPlus/formwave.h
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
#ifndef FormWave_H
|
||||
#define FormWave_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVariant>
|
||||
#include <QSharedMemory>
|
||||
|
||||
#include "BaseFun.h"
|
||||
#include "MemRdWt.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui {
|
||||
class FormWave;
|
||||
}
|
||||
|
||||
class FormTrack;
|
||||
class FormInfo;
|
||||
class FormWave : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormWave(QWidget *parent = nullptr, QString strSlfName="", QString strWellName="", QString strTrackName="", QString strLineName="");
|
||||
~FormWave();
|
||||
|
||||
void initGeometry(QString strUuid, int nscale, double fW, int nH);
|
||||
|
||||
void setDepthY(float fy1, float fy2);
|
||||
//改变深度更新绘图
|
||||
void updateDepthY(float fy1, float fy2);
|
||||
|
||||
bool LoadFromSLF_wave();
|
||||
bool SaveToSLF_LogMud();
|
||||
|
||||
void changeColor(int nidx, int ncolorNum);
|
||||
private:
|
||||
Ui::FormWave *ui;
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
|
||||
void DrawWave(QPainter* pdc, QRectF mrt);
|
||||
|
||||
double GetData(int i, int j, char *buffer);
|
||||
double GetData(int repCode, char *buffer, int repLen = 0);
|
||||
void SetData(int repCode, char *buffer, double yy);
|
||||
|
||||
bool IsFiniteNumber(float v)
|
||||
{
|
||||
return qIsFinite(v) != 0;
|
||||
}
|
||||
|
||||
public:
|
||||
QString m_strUuid;
|
||||
QString m_strSlfName;
|
||||
QString m_strWellName;
|
||||
QString m_strTrackName;
|
||||
QString m_strLineName;
|
||||
|
||||
QWidget *m_parent;
|
||||
|
||||
FormTrack *m_formTrack = NULL;
|
||||
FormInfo* m_pInfo = NULL;
|
||||
|
||||
float m_iY1, m_iY2;
|
||||
int m_iScale = 200;
|
||||
double m_wellTop = 0.0;
|
||||
double m_dTopDepth = 0.0;
|
||||
|
||||
QSharedMemory m_sharedMemory;
|
||||
|
||||
PFLOATPROPERTY m_vMD;
|
||||
PFLOATPROPERTY m_vProperty;
|
||||
MyDataTypeEnum vVdl;
|
||||
|
||||
Slf_WAVE waveinfo;
|
||||
float m_SDep, m_EDep, m_Rlev;
|
||||
float m_PlotSdep = 0.0f;
|
||||
int m_nSamples; //每深度间隔的数据点
|
||||
int m_PointNum;
|
||||
QVector <double> valMin, valMax;
|
||||
double m_TopDepth;
|
||||
double m_BottomDepth;
|
||||
|
||||
QVector<float> selfcolorrank;
|
||||
QColor m_Color[256]; //定义颜色数组
|
||||
char m_strValue[200];
|
||||
int CtrlCurve = 0;
|
||||
int PickFlag = 0;
|
||||
float m_fTopY = 0.0f;
|
||||
float m_fDepthLowerY = 0.0f;
|
||||
float m_fAddY = 29.0f;
|
||||
|
||||
int schemIndex = 1;
|
||||
int colornum = 256;
|
||||
public:
|
||||
//void DrawWave(QPainter* pdc, QRectF mrt1);
|
||||
|
||||
public slots:
|
||||
void s_ResizeDepth(QString strUuid, int nHeight, float fDepthLowerY);
|
||||
|
||||
//斜井三图一表
|
||||
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
QString strGroup, QString strProperty, QVariant variant);
|
||||
|
||||
//滚动条
|
||||
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
|
||||
void vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen);
|
||||
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth);
|
||||
};
|
||||
|
||||
#endif // FormWave_H
|
||||
33
logPlus/formwave.ui
Normal file
33
logPlus/formwave.ui
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormWave</class>
|
||||
<widget class="QWidget" name="FormWave">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -299,6 +299,7 @@ QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
|||
formDraw->m_formTrack = formTrack;
|
||||
formDraw->m_iScale = m_iScale;
|
||||
formDraw->m_nTrackW = dW;
|
||||
formDraw->m_nObjDrawH = m_nObjDrawH;
|
||||
|
||||
ui->tableWidget->setCellWidget(i, columnCount, formDraw);//默认用formDraw填充满
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
QString m_strWellName;
|
||||
QString m_strSlfName="";
|
||||
int m_nObjLyrH = 100;
|
||||
int m_nObjDrawH = 0;
|
||||
int m_iScale=200;
|
||||
double m_iY1=0;
|
||||
double m_iY2=0;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ SOURCES += \
|
|||
forminfo.cpp \
|
||||
formline.cpp \
|
||||
formlogmud.cpp \
|
||||
formwave.cpp \
|
||||
formmultiheads.cpp \
|
||||
formtrack.cpp \
|
||||
formtracktop.cpp \
|
||||
|
|
@ -142,6 +143,7 @@ HEADERS += \
|
|||
forminfo.h \
|
||||
formline.h \
|
||||
formlogmud.h \
|
||||
formwave.h \
|
||||
formmultiheads.h \
|
||||
formtrack.h \
|
||||
formtracktop.h \
|
||||
|
|
@ -175,6 +177,7 @@ FORMS += \
|
|||
forminfo.ui \
|
||||
formline.ui \
|
||||
formlogmud.ui \
|
||||
formwave.ui \
|
||||
formmultiheads.ui \
|
||||
formtrack.ui \
|
||||
formtracktop.ui \
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="formwave.h" />
|
||||
<ClInclude Include="LogmuditemDrawer.h" />
|
||||
<QtMoc Include="LogmudResultItem.h" />
|
||||
<QtMoc Include="selectlinedialog.h" />
|
||||
|
|
@ -173,6 +174,7 @@
|
|||
<ClCompile Include="formtitle.cpp" />
|
||||
<ClCompile Include="formtrack.cpp" />
|
||||
<ClCompile Include="formtracktop.cpp" />
|
||||
<ClCompile Include="formwave.cpp" />
|
||||
<ClCompile Include="formwell.cpp" />
|
||||
<ClCompile Include="fracsel.cpp" />
|
||||
<ClCompile Include="GeoIndicatorGenerator.cpp" />
|
||||
|
|
@ -237,6 +239,7 @@
|
|||
<QtUic Include="formtitle.ui" />
|
||||
<QtUic Include="formtrack.ui" />
|
||||
<QtUic Include="formtracktop.ui" />
|
||||
<QtUic Include="formwave.ui" />
|
||||
<QtUic Include="formwell.ui" />
|
||||
<QtUic Include="fracsel.ui" />
|
||||
<QtUic Include="InDefTable.ui" />
|
||||
|
|
|
|||
|
|
@ -322,6 +322,9 @@
|
|||
<QtMoc Include="LogmudResultItem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formwave.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="backgrounddelegate.cpp">
|
||||
|
|
@ -675,6 +678,9 @@
|
|||
<ClCompile Include="LogmudItemDrawer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formwave.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="logplus.qrc">
|
||||
|
|
@ -748,5 +754,8 @@
|
|||
<QtUic Include="formlogmud.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="formwave.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
public:
|
||||
virtual void closeEvent(QCloseEvent *event);
|
||||
|
||||
protected:
|
||||
//样式
|
||||
void loadStyle(const QString &qssFile);
|
||||
|
||||
|
|
|
|||
|
|
@ -215,6 +215,23 @@ MainWindowCurve::~MainWindowCurve()
|
|||
|
||||
void MainWindowCurve::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
int nhei = 0;
|
||||
Qt::ToolBarArea area = this->toolBarArea(ui->mainToolBar);
|
||||
if (area == Qt::BottomToolBarArea || area == Qt::TopToolBarArea)
|
||||
{
|
||||
nhei = ui->mainToolBar->height();
|
||||
if (ui->centralwidget->layout())
|
||||
{
|
||||
int left, top, right, bottom;
|
||||
ui->centralwidget->layout()->getContentsMargins(&left, &top, &right, &bottom);
|
||||
nhei += top;
|
||||
nhei += bottom;
|
||||
}
|
||||
}
|
||||
QSize sz = event->size();
|
||||
m_nObjDrawH = sz.height() - nhei - m_nObjLayerH - 100 - 100;
|
||||
// nhei mainToolBar的高度 m_nObjLyrH,对象单元格高度 100头高度,100井头高度
|
||||
emit CallManage::getInstance()->sig_ResizeHeight(m_strUuid, m_nObjDrawH);
|
||||
}
|
||||
|
||||
QToolBar * MainWindowCurve::getPluginToolBar()
|
||||
|
|
@ -3656,6 +3673,7 @@ void MainWindowCurve::s_NewWell(QString strWellName, QString strSlfName)
|
|||
widgetWell->m_strUuid = m_strUuid;
|
||||
widgetWell->m_strSlfName = strSlfName;
|
||||
widgetWell->m_nObjLyrH = m_nObjLayerH;
|
||||
widgetWell->m_nObjDrawH = m_nObjDrawH;
|
||||
widgetWell->m_iScale = m_iScale;
|
||||
widgetWell->setWellHeader(wellH);
|
||||
//
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ public:
|
|||
QLineEdit *spinbox2;
|
||||
QLineEdit *spinbox3;
|
||||
|
||||
int m_nObjDrawH = 0; // 绘制层高度
|
||||
int m_nObjLayerH = 104; // 对象层高度
|
||||
int m_iScale=200;
|
||||
double m_iY1=-1000;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
|
|
@ -46,16 +46,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
|
|
|
|||
|
|
@ -134,6 +134,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, int)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, int)));
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ResizeHeight(QString, int)), this, SLOT(s_ResizeHeight(QString, int)));
|
||||
|
||||
//曲线选中,置顶
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString)));
|
||||
//颜色
|
||||
|
|
@ -779,7 +781,7 @@ void QMyCustomPlot::updateImage(float fTopY, FormInfo* pInfo)
|
|||
|
||||
float flDep;
|
||||
int i, ii, j, nPoint = 0, m;
|
||||
QRectF rt, wrt;
|
||||
QRectF wrt;
|
||||
float dep, ch;
|
||||
double ratio;
|
||||
CString cs;
|
||||
|
|
@ -1627,7 +1629,7 @@ void QMyCustomPlot::mouseMoveEvent(QMouseEvent *event)
|
|||
y_val = xAxis->pixelToCoord(y_pos);
|
||||
else
|
||||
y_val = yAxis->pixelToCoord(y_pos);
|
||||
|
||||
//qDebug() << "MouseMove:" << y_pos;
|
||||
emit CallManage::getInstance()->sig_MouseMove(m_strUuid, m_strWellName, m_strTrackName, 0-y_val);
|
||||
}
|
||||
}
|
||||
|
|
@ -12933,6 +12935,18 @@ void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, double val
|
|||
return;
|
||||
}
|
||||
|
||||
void QMyCustomPlot::s_ResizeHeight(QString strUuid, int nPixVal)
|
||||
{
|
||||
if (m_strUuid == strUuid)
|
||||
{
|
||||
if (m_bX2Y)
|
||||
m_fBottomY = xAxis->pixelToCoord(nPixVal);
|
||||
else
|
||||
m_fBottomY = yAxis->pixelToCoord(nPixVal);
|
||||
emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, nPixVal, m_fBottomY);
|
||||
}
|
||||
}
|
||||
|
||||
//自定义滚动条
|
||||
void QMyCustomPlot::vertScrollBarChanged(QString strUuid, double value, double low, double upper)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ public:
|
|||
float m_iX1, m_iX2;
|
||||
float m_iY1, m_iY2;
|
||||
float m_fTopY = 0; // 显示深度upper
|
||||
float m_fBottomY = 0; // 显示深度lower
|
||||
qint8 m_nLeftCross = 0; // 左跨道个数
|
||||
qint8 m_nRightCross = 0; // 右跨道个数
|
||||
|
||||
|
|
@ -424,6 +425,8 @@ public slots:
|
|||
//自定义滚动条
|
||||
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
|
||||
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth);
|
||||
|
||||
void s_ResizeHeight(QString strUuid, int nPixVal);
|
||||
//信号槽刷新
|
||||
void slot_replot();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user