Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
5512745b23
|
|
@ -53,6 +53,12 @@ signals:
|
|||
void sig_AddDepth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);//深度
|
||||
void sig_AddGanZhuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);
|
||||
|
||||
//井眼垮塌矢量图
|
||||
void sig_AddJykt(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);
|
||||
|
||||
//井斜方位图
|
||||
void sig_AddDenv(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);
|
||||
|
||||
//新建波列
|
||||
void sig_AddWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
||||
//删除波列
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) :
|
|||
|
||||
m_strWellName = strWellName;
|
||||
m_strTrackName = strTrackName;
|
||||
m_nSltk=10.0;
|
||||
m_nSltk=15.0;//杆状图长度
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddLine(QString, QString, QString, QString, QString)), this, SLOT(s_addLine(QString, QString, QString, QString, QString)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddLine_Property(QString, QString, QString, QString, QString, double, double, QString, QColor, double, Qt::PenStyle)),
|
||||
|
|
@ -61,6 +61,13 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) :
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)), this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddGanZhuangTu(QString, QString, QString, QString, QString, int)), this, SLOT(s_addGanZuangTu(QString, QString, QString, QString, QString,int)));
|
||||
|
||||
//井眼垮塌矢量图
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddJykt(QString, QString, QString, QString, QString, int)), this, SLOT(s_addJykt(QString, QString, QString, QString, QString,int)));
|
||||
|
||||
//井斜方位图
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddDenv(QString, QString, QString, QString, QString, int)), this, SLOT(s_addDenv(QString, QString, QString, QString, QString,int)));
|
||||
|
||||
}
|
||||
|
||||
FormDraw::~FormDraw()
|
||||
|
|
@ -985,6 +992,144 @@ void FormDraw::s_addGanZuangTu(QString strUuid, QString strSlfName, QString strW
|
|||
m_listLineName.push_back(strLineName);
|
||||
}
|
||||
|
||||
void FormDraw::s_addJykt(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
||||
{
|
||||
//井名&道名不一致
|
||||
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
curv->m_strUuid = m_strUuid;
|
||||
//背景设置成透明色
|
||||
curv->setBackground(Qt::transparent);
|
||||
curv->setStyleSheet("background: transparent;");
|
||||
//
|
||||
//QRect rect = this->rect();
|
||||
//curv->setGeometry(rect.left(),rect.top(), rect.width(), rect.height());
|
||||
|
||||
double dHight = 0;
|
||||
dHight = (g_iY2-g_iY1)*100.0/(double)g_iScale * g_dPixelPerCm;
|
||||
if(g_iShow==1)
|
||||
{
|
||||
//显示刻度
|
||||
dHight = dHight+30;
|
||||
}
|
||||
qDebug() << "FormDraw dHight=" << QString::number((int)dHight);
|
||||
if(dHight>32767)
|
||||
{
|
||||
dHight = 32767;
|
||||
}
|
||||
|
||||
//curv->setMaximumHeight((int)dHight);
|
||||
//curv->setViewport(QRect(0, 0, g_iOneWidth, (int)dHight));//7500-3184
|
||||
curv->setGeometry(0, 0, g_iOneWidth, (int)dHight);//7500-3184
|
||||
|
||||
|
||||
//curv->resize(INT_MAX, INT_MAX); // 使用 INT_MAX 来避免16位整数的限制
|
||||
// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
// curv->setSizePolicy(policy);
|
||||
|
||||
curv->show();
|
||||
|
||||
//井眼垮塌矢量图
|
||||
DrawJykt(curv, strSlfName);
|
||||
|
||||
//道-对象
|
||||
QString strAliasName = "井眼垮塌矢量图";
|
||||
QString strUnit = "(°)";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
double width=2;
|
||||
QString strScaleType = "";
|
||||
//道-对象
|
||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "JyktObject");
|
||||
//
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
//
|
||||
m_listLineName.push_back(strLineName);
|
||||
}
|
||||
|
||||
void FormDraw::s_addDenv(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
||||
{
|
||||
//井名&道名不一致
|
||||
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
curv->m_strUuid = m_strUuid;
|
||||
//背景设置成透明色
|
||||
curv->setBackground(Qt::transparent);
|
||||
curv->setStyleSheet("background: transparent;");
|
||||
//
|
||||
//QRect rect = this->rect();
|
||||
//curv->setGeometry(rect.left(),rect.top(), rect.width(), rect.height());
|
||||
|
||||
double dHight = 0;
|
||||
dHight = (g_iY2-g_iY1)*100.0/(double)g_iScale * g_dPixelPerCm;
|
||||
if(g_iShow==1)
|
||||
{
|
||||
//显示刻度
|
||||
dHight = dHight+30;
|
||||
}
|
||||
qDebug() << "FormDraw dHight=" << QString::number((int)dHight);
|
||||
if(dHight>32767)
|
||||
{
|
||||
dHight = 32767;
|
||||
}
|
||||
|
||||
//curv->setMaximumHeight((int)dHight);
|
||||
//curv->setViewport(QRect(0, 0, g_iOneWidth, (int)dHight));//7500-3184
|
||||
curv->setGeometry(0, 0, g_iOneWidth, (int)dHight);//7500-3184
|
||||
|
||||
|
||||
//curv->resize(INT_MAX, INT_MAX); // 使用 INT_MAX 来避免16位整数的限制
|
||||
// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
// curv->setSizePolicy(policy);
|
||||
|
||||
curv->show();
|
||||
|
||||
//井斜方位图
|
||||
DrawDenv(curv, strSlfName);
|
||||
|
||||
//道-对象
|
||||
QString strAliasName = "井斜方位图";
|
||||
QString strUnit = "(°)";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
double width=2;
|
||||
QString strScaleType = "";
|
||||
//道-对象
|
||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "DenvObject");
|
||||
//
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
||||
//
|
||||
m_listLineName.push_back(strLineName);
|
||||
}
|
||||
|
||||
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
||||
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
||||
{
|
||||
|
|
@ -3388,6 +3533,237 @@ void FormDraw::DrawDip(QMyCustomPlot *widget)
|
|||
k++;
|
||||
}
|
||||
}
|
||||
|
||||
void FormDraw::DrawJykt(QMyCustomPlot *widget, QString strSlfName)
|
||||
{
|
||||
//初始化数据
|
||||
m_nRadius=4;
|
||||
m_nTailLen = 8;
|
||||
m_nCircleLineWidth = 2 ;
|
||||
m_nTailWidth = 2;
|
||||
m_flStep = 0.5;
|
||||
m_nOffset = 90;
|
||||
m_crTailLine = qRgb(0,0,0);
|
||||
m_crLine = qRgb(0,0,0);
|
||||
m_crPointFill = qRgb(0,0,0);
|
||||
|
||||
//读取曲线数据
|
||||
m_csCurveDDIR="STRDIR"; //"DDIR";
|
||||
m_csCurveCAL="CALM";
|
||||
this->ReadData(strSlfName, m_csCurveCAL, 0, &m_Curve);
|
||||
this->ReadData(strSlfName, m_csCurveDDIR, 1, &m_Curve2);
|
||||
|
||||
//-------------------
|
||||
m_LeftVal = 0;
|
||||
m_RightVal = 10;
|
||||
|
||||
float vmax = m_RightVal;
|
||||
float vmin = m_LeftVal;
|
||||
widget->m_iX1 = vmin;
|
||||
widget->m_iX2 = vmax;
|
||||
widget->m_iY1 = g_iY1;
|
||||
widget->m_iY2 = g_iY2;
|
||||
//
|
||||
widget->xAxis->setRange(vmin, vmax);
|
||||
widget->yAxis->setRange(g_iY1, g_iY2);
|
||||
widget->axisRect()->setupFullAxesBox();
|
||||
//
|
||||
widget->xAxis->ticker()->setTickCount(10);//x个主刻度
|
||||
widget->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
|
||||
//对调XY轴,在最前面设置
|
||||
QCPAxis *yAxis = widget->yAxis;
|
||||
QCPAxis *xAxis = widget->xAxis;
|
||||
widget->xAxis = yAxis;
|
||||
widget->yAxis = xAxis;
|
||||
|
||||
//隐藏刻度
|
||||
widget->xAxis->setTicks(false);
|
||||
widget->yAxis->setTicks(false);
|
||||
widget->xAxis2->setTicks(false);
|
||||
widget->yAxis2->setTicks(false);
|
||||
|
||||
//-------------
|
||||
float tempf,flVal;
|
||||
float flDep;
|
||||
int i,j,iPoint=0,nPointNum=0,tempi;
|
||||
QRectF rt,rtRect;
|
||||
float x,y,x1,y1,x2,y2;
|
||||
float dang,ddir;
|
||||
float dg,dy;
|
||||
float dgtord;
|
||||
float deps;
|
||||
|
||||
tempf = (m_EDep - m_SDep)/m_Rlev;
|
||||
nPointNum = tempf+1;
|
||||
|
||||
//
|
||||
dgtord=3.14159265/180.;
|
||||
QPen pPenTail = QPen(m_crTailLine, m_nTailWidth);//
|
||||
QPen pPenCircle = QPen(m_crLine, m_nCircleLineWidth);// add for:圆线宽度单独使用
|
||||
QBrush brush2(m_crPointFill);
|
||||
|
||||
// 注意映射方式
|
||||
float flVal1=0;
|
||||
if (m_flStep <=0) m_flStep = 0.5;//add for:用户要输入0.5,当输入到0时,系统已经刷新,除0异常 [5/23/2019 16:35 hxb]
|
||||
for (flDep = m_SDep; flDep < m_EDep; flDep += m_flStep)
|
||||
{
|
||||
y = -flDep;//起始深度
|
||||
|
||||
// 绘制圆
|
||||
i=(flDep-m_Curve.StartDepth)/m_Curve.DepLevel+0.5;
|
||||
if(i<0) continue;
|
||||
//
|
||||
j=(flDep-m_Curve2.StartDepth)/m_Curve2.DepLevel+0.5;
|
||||
if(j<0) continue;
|
||||
|
||||
flVal1 = GetData(m_Curve2.RepCode, (char *)&m_Value2[j*m_Curve2.CodeLen]);
|
||||
//角度小于0,不绘制
|
||||
if ( flVal1 <0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
flVal = GetData(m_Curve.RepCode, (char *)&m_Value[i*m_Curve.CodeLen]);
|
||||
x = flVal;
|
||||
|
||||
//圆
|
||||
QCPItemEllipse *qcpItemEllipse = new QCPItemEllipse(widget);
|
||||
qcpItemEllipse->setPen(pPenCircle);
|
||||
qcpItemEllipse->m_bCustom = true;
|
||||
qcpItemEllipse->m_nRadius = m_nRadius;
|
||||
qcpItemEllipse->topLeft->setCoords(y, x);//圆心位置
|
||||
qcpItemEllipse->bottomRight->setCoords(y, x);//圆心位置
|
||||
qcpItemEllipse->setBrush(brush2);//填充圆的颜色
|
||||
|
||||
//尾巴
|
||||
flVal=flVal1;
|
||||
flVal+=m_nOffset;
|
||||
if ( flVal >=180.)flVal -= 180;
|
||||
float dr=flVal*dgtord;
|
||||
|
||||
QCPItemLine *qcpItemLine = new QCPItemLine(widget);
|
||||
qcpItemLine->start->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->end->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->setPen(pPenTail);
|
||||
qcpItemLine->m_bCustom = true;
|
||||
qcpItemLine->m_nTailLen = m_nTailLen; //尾长
|
||||
qcpItemLine->m_nRadius = m_nRadius; //半径
|
||||
qcpItemLine->m_dr = dr;
|
||||
|
||||
//break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FormDraw::DrawDenv(QMyCustomPlot *widget, QString strSlfName)
|
||||
{
|
||||
//初始化数据
|
||||
m_LeftVal2=0;
|
||||
m_RightVal2=90;
|
||||
|
||||
m_csCurveAZIM=("AZIM");
|
||||
m_csCurveDEVI=("DEVI");
|
||||
|
||||
m_nTailWidth=2;
|
||||
m_TailColor=qRgb(255,0,0);
|
||||
m_crPointFill=qRgb(0,255,0);
|
||||
m_crCirCleColor = qRgb(0,0,255);
|
||||
m_nRadius = 4;
|
||||
m_nTailLen=8;
|
||||
m_flStep=1;
|
||||
|
||||
//读取曲线数据
|
||||
this->ReadData(strSlfName, m_csCurveAZIM, 0, &m_Curve);
|
||||
this->ReadData(strSlfName, m_csCurveDEVI, 1, &m_Curve2);
|
||||
|
||||
//-------------------
|
||||
m_LeftVal = 0;
|
||||
m_RightVal = 90;
|
||||
|
||||
float vmax = m_RightVal;
|
||||
float vmin = m_LeftVal;
|
||||
widget->m_iX1 = vmin;
|
||||
widget->m_iX2 = vmax;
|
||||
widget->m_iY1 = g_iY1;
|
||||
widget->m_iY2 = g_iY2;
|
||||
//
|
||||
widget->xAxis->setRange(vmin, vmax);
|
||||
widget->yAxis->setRange(g_iY1, g_iY2);
|
||||
widget->axisRect()->setupFullAxesBox();
|
||||
//
|
||||
widget->xAxis->ticker()->setTickCount(10);//x个主刻度
|
||||
widget->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
|
||||
//对调XY轴,在最前面设置
|
||||
QCPAxis *yAxis = widget->yAxis;
|
||||
QCPAxis *xAxis = widget->xAxis;
|
||||
widget->xAxis = yAxis;
|
||||
widget->yAxis = xAxis;
|
||||
|
||||
//隐藏刻度
|
||||
widget->xAxis->setTicks(false);
|
||||
widget->yAxis->setTicks(false);
|
||||
widget->xAxis2->setTicks(false);
|
||||
widget->yAxis2->setTicks(false);
|
||||
|
||||
//
|
||||
QPen pPen(m_TailColor,m_nTailWidth);
|
||||
QPen pPen2(m_crCirCleColor,m_nCircleLineWidth);
|
||||
QBrush cBrush(m_crPointFill);
|
||||
|
||||
float tempf,flVal;
|
||||
int i,j,nPointNum=0,tempi;
|
||||
QRectF rt,rtRect;
|
||||
float x,y;
|
||||
float dgtord,dr;
|
||||
|
||||
if ( m_Value==0 || m_Value2==0 )
|
||||
return ;
|
||||
|
||||
// 计算显示深度
|
||||
tempf = (m_EDep - m_SDep)/m_Rlev + 0.5;
|
||||
nPointNum = tempf+1;
|
||||
if ( nPointNum <= 1 ) return ;
|
||||
dgtord=3.14159265/180.;
|
||||
|
||||
QBrush brush2(QColor(qRgb(0,0,0)));
|
||||
{
|
||||
for (float dep=m_SDep; dep<m_EDep; dep+=m_flStep)
|
||||
{
|
||||
i=(dep-m_Curve2.StartDepth)/m_Curve2.DepLevel+0.5;
|
||||
if(i<0) continue;
|
||||
|
||||
flVal = GetData(m_Curve2.RepCode,(char *)&m_Value2[i*m_Curve2.CodeLen]);
|
||||
|
||||
x = flVal;
|
||||
y = -dep;//起始深度
|
||||
|
||||
QCPItemEllipse *qcpItemEllipse = new QCPItemEllipse(widget);
|
||||
qcpItemEllipse->setPen(pPen2);
|
||||
qcpItemEllipse->m_bCustom = true;
|
||||
qcpItemEllipse->m_nRadius = m_nRadius;
|
||||
qcpItemEllipse->topLeft->setCoords(y, x);//圆心位置
|
||||
qcpItemEllipse->bottomRight->setCoords(y, x);//圆心位置
|
||||
qcpItemEllipse->setBrush(cBrush);//填充圆的颜色
|
||||
|
||||
//
|
||||
flVal = GetData(m_Curve.RepCode,(char *)&m_Value[i*m_Curve.CodeLen]);
|
||||
dr=flVal*dgtord;
|
||||
|
||||
QCPItemLine *qcpItemLine = new QCPItemLine(widget);
|
||||
qcpItemLine->start->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->end->setCoords(y, x);//圆心位置
|
||||
qcpItemLine->setPen(pPen);
|
||||
qcpItemLine->m_bCustom = true;
|
||||
qcpItemLine->m_nTailLen = m_nTailLen; //尾长
|
||||
qcpItemLine->m_nRadius = m_nRadius; //半径
|
||||
qcpItemLine->m_dr = dr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FormDraw::DrawStck(QMyCustomPlot *widget)
|
||||
{
|
||||
float flWidth[50];
|
||||
|
|
|
|||
|
|
@ -103,7 +103,9 @@ public:
|
|||
void DrawTabDip(QMyCustomPlot *widget);
|
||||
void CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio);
|
||||
void Refurbish();
|
||||
|
||||
void DrawJykt(QMyCustomPlot *widget, QString strSlfName);
|
||||
void DrawDenv(QMyCustomPlot *widget, QString strSlfName);
|
||||
|
||||
int m_PointNum;
|
||||
//
|
||||
int FracNum;
|
||||
|
|
@ -139,6 +141,17 @@ public:
|
|||
float m_LeftVal; //左刻度
|
||||
float m_RightVal; //右刻度
|
||||
|
||||
//井眼垮塌矢量图
|
||||
QString m_csCurveCAL;
|
||||
float m_flStep;// 增加深度间隔
|
||||
float m_nCircleLineWidth;//增加圆线宽
|
||||
QColor m_crLine,m_crTailLine; // 圆线颜色,尾线颜色
|
||||
float m_nOffset; // 角度偏移=0,主应力方向,=90,长轴方向
|
||||
|
||||
//井斜方位图
|
||||
QString m_csCurveAZIM, m_csCurveDEVI; // 方位/倾角/可信度 曲线名
|
||||
QColor m_TailColor,m_crCirCleColor;// add m_crCirCleColor圆线颜色
|
||||
|
||||
//文字结论
|
||||
void initWords(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||
bool LoadFromSLF(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||
|
|
@ -181,6 +194,11 @@ public slots:
|
|||
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
||||
|
||||
void s_addGanZuangTu(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);//杆状图
|
||||
//井眼垮塌矢量图
|
||||
void s_addJykt(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||
//井斜方位图
|
||||
void s_addDenv(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||
|
||||
//
|
||||
void s_addWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
||||
void s_delWave(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
|
|
|||
|
|
@ -214,13 +214,51 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
|||
//曲线
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit);
|
||||
}
|
||||
//---------------
|
||||
if(m_strLineName=="WORDS_RELUST")
|
||||
{
|
||||
//文字结论,不绘制左右范围
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "文字结论");
|
||||
}
|
||||
else if(m_strLineName=="RESULT")
|
||||
{
|
||||
//解释结论,不绘制左右范围
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "解释结论");
|
||||
}
|
||||
else if(m_strLineName=="GEO_LITH")
|
||||
{
|
||||
//录井剖面,不绘制左右范围
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "录井剖面");
|
||||
}
|
||||
else if(m_strLineName=="SWALL_CORE")
|
||||
{
|
||||
//井壁取心,不绘制左右范围
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "井壁取心");
|
||||
}
|
||||
else if(m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT")
|
||||
{
|
||||
//固井结论,不绘制左右范围
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "固井结论");
|
||||
}
|
||||
else if(m_strLineName=="CORE_PHYSICS")
|
||||
{
|
||||
//岩心分析,不绘制左右范围
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "岩心实验数据");
|
||||
}
|
||||
else if(m_strLineName=="井眼垮塌矢量图"
|
||||
|| m_strLineName=="井斜方位图")
|
||||
{
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit);
|
||||
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
|
||||
}
|
||||
|
||||
//
|
||||
if(m_strType=="tableObject" && (m_strLineName=="WORDS_RELUST" || m_strLineName == "RESULT"
|
||||
|| m_strLineName == "GEO_LITH"|| m_strLineName == "SWALL_CORE"
|
||||
|| m_strLineName == "GUJING1_RESULT" || m_strLineName == "GUJING2_RESULT" || m_strLineName == "GUJING3_RESULT"
|
||||
|| m_strLineName == "CORE_PHYSICS") )
|
||||
{
|
||||
//文字结论,不绘制左右范围
|
||||
|
||||
}
|
||||
else {
|
||||
if(m_strType=="waveObject"
|
||||
|
|
|
|||
|
|
@ -59,6 +59,14 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName)
|
|||
connect(this, SIGNAL(sig_AddGanZhuangTu(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||
this, SLOT(s_addGanZhuangTu(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
||||
|
||||
// 井眼垮塌矢量图
|
||||
connect(this, SIGNAL(sig_AddJykt(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||
this, SLOT(s_addJykt(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
||||
|
||||
// 井斜方位图
|
||||
connect(this, SIGNAL(sig_AddDenv(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||
this, SLOT(s_addDenv(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
||||
|
||||
//曲线选中,置顶
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
||||
|
||||
|
|
@ -108,6 +116,14 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
|
|||
{
|
||||
emit sig_AddGanZhuangTu(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
||||
}
|
||||
else if(strType=="JyktObject")
|
||||
{
|
||||
emit sig_AddJykt(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
||||
}
|
||||
else if(strType=="DenvObject")
|
||||
{
|
||||
emit sig_AddDenv(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
||||
}
|
||||
}
|
||||
|
||||
void FormTrack::setDrawDt(QStringList listdt, float vmax, float vmin)
|
||||
|
|
@ -337,9 +353,10 @@ void FormTrack::s_addDepth(QString strSlfName, QString strWellName, QString strT
|
|||
//
|
||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
}
|
||||
|
||||
void FormTrack::s_addGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
||||
{
|
||||
qDebug() << "FormTrack s_addDepth";
|
||||
qDebug() << "FormTrack s_addGanZhuangTu";
|
||||
|
||||
ui->tableWidget->m_strUuid = m_strUuid;
|
||||
int row = ui->tableWidget->rowCount();
|
||||
|
|
@ -355,7 +372,7 @@ void FormTrack::s_addGanZhuangTu(QString strSlfName, QString strWellName, QStrin
|
|||
formInfo->m_strAliasName = strAliasName;
|
||||
formInfo->m_strUnit = strUnit;
|
||||
formInfo->m_strScaleType = strScaleType;
|
||||
formInfo->m_strType = "depthObject";
|
||||
formInfo->m_strType = "ganzhuangtuObject";
|
||||
formInfo->m_nJg = 2;
|
||||
formInfo->setLineWidth(dWidth);
|
||||
formInfo->setVMax(vmax);
|
||||
|
|
@ -369,6 +386,74 @@ void FormTrack::s_addGanZhuangTu(QString strSlfName, QString strWellName, QStrin
|
|||
//
|
||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
}
|
||||
|
||||
void FormTrack::s_addJykt(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
||||
{
|
||||
qDebug() << "FormTrack s_addJykt";
|
||||
|
||||
ui->tableWidget->m_strUuid = m_strUuid;
|
||||
int row = ui->tableWidget->rowCount();
|
||||
ui->tableWidget->setRowCount(row + 1);
|
||||
|
||||
//避免出现小滚动条
|
||||
//ui->tableWidget->resize(g_iOneWidth, 100*(row + 1)+10);
|
||||
//this->resize(g_iOneWidth, 100*(row + 1)+30);
|
||||
|
||||
//曲线信息栏
|
||||
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
|
||||
formInfo->m_strUuid = m_strUuid;
|
||||
formInfo->m_strAliasName = strAliasName;
|
||||
formInfo->m_strUnit = strUnit;
|
||||
formInfo->m_strScaleType = strScaleType;
|
||||
formInfo->m_strType = "JyktObject";
|
||||
formInfo->m_nJg = 2;
|
||||
formInfo->setLineWidth(dWidth);
|
||||
formInfo->setVMax(vmax);
|
||||
formInfo->setVMin(vmin);
|
||||
formInfo->setFrontColor(QColor(0,0,0));
|
||||
formInfo->setBackColor(QColor(255,255,255));
|
||||
//设置高度
|
||||
ui->tableWidget->setRowHeight(row, 100);
|
||||
//单元格委托
|
||||
//ui->tableWidget->setItemDelegateForRow(row, m_delegate);
|
||||
//
|
||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
}
|
||||
|
||||
|
||||
void FormTrack::s_addDenv(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
||||
{
|
||||
qDebug() << "FormTrack s_addDenv";
|
||||
|
||||
ui->tableWidget->m_strUuid = m_strUuid;
|
||||
int row = ui->tableWidget->rowCount();
|
||||
ui->tableWidget->setRowCount(row + 1);
|
||||
|
||||
//避免出现小滚动条
|
||||
//ui->tableWidget->resize(g_iOneWidth, 100*(row + 1)+10);
|
||||
//this->resize(g_iOneWidth, 100*(row + 1)+30);
|
||||
|
||||
//曲线信息栏
|
||||
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
|
||||
formInfo->m_strUuid = m_strUuid;
|
||||
formInfo->m_strAliasName = strAliasName;
|
||||
formInfo->m_strUnit = strUnit;
|
||||
formInfo->m_strScaleType = strScaleType;
|
||||
formInfo->m_strType = "JyktObject";
|
||||
formInfo->m_nJg = 2;
|
||||
formInfo->setLineWidth(dWidth);
|
||||
formInfo->setVMax(vmax);
|
||||
formInfo->setVMin(vmin);
|
||||
formInfo->setFrontColor(QColor(0,0,0));
|
||||
formInfo->setBackColor(QColor(255,255,255));
|
||||
//设置高度
|
||||
ui->tableWidget->setRowHeight(row, 100);
|
||||
//单元格委托
|
||||
//ui->tableWidget->setItemDelegateForRow(row, m_delegate);
|
||||
//
|
||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
}
|
||||
|
||||
QJsonObject FormTrack::makeJson()
|
||||
{
|
||||
// 创建根对象
|
||||
|
|
|
|||
|
|
@ -73,6 +73,10 @@ signals:
|
|||
|
||||
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);
|
||||
void sig_AddJykt(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void sig_AddDenv(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
|
||||
|
||||
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);
|
||||
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);
|
||||
|
|
@ -80,7 +84,10 @@ public slots:
|
|||
|
||||
void s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void s_addGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
void s_addJykt(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void s_addDenv(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
|
||||
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -166,6 +166,16 @@ void FormWell::s_NewTrack(QString strUuid, QString strWellName, QString strSlfNa
|
|||
//新建杆状图
|
||||
emit CallManage::getInstance()->sig_AddGanZhuangTu(m_strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||
}
|
||||
else if(strType=="JyktObject")
|
||||
{
|
||||
//新建井眼垮塌矢量图
|
||||
emit CallManage::getInstance()->sig_AddJykt(m_strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||
}
|
||||
else if(strType=="DenvObject")
|
||||
{
|
||||
//新建井斜方位图
|
||||
emit CallManage::getInstance()->sig_AddDenv(m_strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||
}
|
||||
}
|
||||
|
||||
//ui->tableWidget->resizeColumnsToContents(); // 调整列宽以适应内容
|
||||
|
|
|
|||
|
|
@ -373,6 +373,8 @@ void MainWindowCurve::initToolBar()
|
|||
// connect(m_debugAc, &QAction::triggered, this, &MainWindow::s_DrawImg);
|
||||
// connect(m_loadAc, &QAction::triggered, this, &MainWindow::s_DrawLine);
|
||||
connect(m_ganzhuangtuAc, &QAction::triggered, this, &MainWindowCurve::s_NewGanZhuangTu);
|
||||
connect(m_collapseAc, &QAction::triggered, this, &MainWindowCurve::s_Jykt);
|
||||
connect(m_deviAc, &QAction::triggered, this, &MainWindowCurve::s_Denv);
|
||||
}
|
||||
|
||||
void MainWindowCurve::loadStyle(const QString &qssFile)
|
||||
|
|
@ -844,6 +846,102 @@ void MainWindowCurve::s_NewGanZhuangTu()
|
|||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "杆状图", "ganzhuangtuObject", nW);
|
||||
}
|
||||
|
||||
//井眼垮塌矢量图
|
||||
void MainWindowCurve::s_Jykt()
|
||||
{
|
||||
QString strSlfName = "";
|
||||
QString strLeft = m_leftWidgets->getLeftTreeString();
|
||||
if(strLeft.length() > 0)
|
||||
{
|
||||
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
||||
if (list.size() > 3)
|
||||
{
|
||||
strSlfName = list[0];
|
||||
}
|
||||
}
|
||||
|
||||
if(ui->tableWidget_2->columnCount()==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||
if(column<0)
|
||||
{
|
||||
//当前没有选中井
|
||||
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
if(column%2==0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
//空白列
|
||||
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||
int iWidth = ui->tableWidget_2->columnWidth(column);
|
||||
|
||||
int nW = 320;
|
||||
//设置列宽
|
||||
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
||||
|
||||
//新建道
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "井眼垮塌矢量图", "JyktObject", nW);
|
||||
}
|
||||
|
||||
//井斜方位图
|
||||
void MainWindowCurve::s_Denv()
|
||||
{
|
||||
QString strSlfName = "";
|
||||
QString strLeft = m_leftWidgets->getLeftTreeString();
|
||||
if(strLeft.length() > 0)
|
||||
{
|
||||
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
||||
if (list.size() > 3)
|
||||
{
|
||||
strSlfName = list[0];
|
||||
}
|
||||
}
|
||||
|
||||
if(ui->tableWidget_2->columnCount()==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||
if(column<0)
|
||||
{
|
||||
//当前没有选中井
|
||||
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
if(column%2==0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
//空白列
|
||||
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||
int iWidth = ui->tableWidget_2->columnWidth(column);
|
||||
|
||||
int nW = 320;
|
||||
//设置列宽
|
||||
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
||||
|
||||
//新建道
|
||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, "井斜方位图", "DenvObject", nW);
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName)
|
||||
{
|
||||
qDebug() << "MainWindowCurve s_NewTrackChangeWidth";
|
||||
|
|
|
|||
|
|
@ -109,7 +109,9 @@ public slots:
|
|||
void s_NewDepth(); // 深度
|
||||
|
||||
void s_pinLvAc(); // 频率统计
|
||||
void s_NewGanZhuangTu(); // 杆状图
|
||||
void s_NewGanZhuangTu(); // 杆状图
|
||||
void s_Jykt(); // 井眼垮塌矢量图
|
||||
void s_Denv(); // 井斜方位图
|
||||
|
||||
//
|
||||
void s_Save();//保存
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user