Compare commits
No commits in common. "31f492fd502aed2f6df4deebed606026e03b0c4e" and "44286c9a12d48e1dc9739c676e7055d5a97185aa" have entirely different histories.
31f492fd50
...
44286c9a12
|
|
@ -41,8 +41,6 @@ signals:
|
||||||
void sig_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
void sig_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
||||||
void sig_WelllogInformation(QString strSlfName, QString strName);//编辑测井信息
|
void sig_WelllogInformation(QString strSlfName, QString strName);//编辑测井信息
|
||||||
|
|
||||||
// 0.Uuid 1.WellName 2.SlfName 3.lineName 4.Type 5.W
|
|
||||||
void sig_NewCol(QStringList listdt);
|
|
||||||
void sig_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName, QString strType, int nW = 0);//新建道
|
void sig_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName, QString strType, int nW = 0);//新建道
|
||||||
void sig_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);//新建空白道,没有曲线
|
void sig_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);//新建空白道,没有曲线
|
||||||
void sig_AddLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);//新建曲线
|
void sig_AddLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);//新建曲线
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
#include "ConsoleOutputWidget.h"
|
#include "ConsoleOutputWidget.h"
|
||||||
#include "DraggablePixmap.h"
|
#include "DraggablePixmap.h"
|
||||||
#include "TransparentDraggableRect.h"
|
#include "TransparentDraggableRect.h"
|
||||||
#include <QtMath>
|
|
||||||
|
|
||||||
//以下参数从配置文件读取
|
//以下参数从配置文件读取
|
||||||
extern int g_iIndex;
|
extern int g_iIndex;
|
||||||
|
|
@ -60,6 +59,8 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) :
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString)), this, SLOT(s_addTableLine(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString)), this, SLOT(s_addTableLine(QString, QString, QString, QString, QString)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)), this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)), this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
||||||
|
|
||||||
|
connect(CallManage::getInstance(), SIGNAL(sig_AddDepth(QString, QString, QString, QString, QString, int)), this, SLOT(s_addDepth(QString, QString, QString, QString, QString,int)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FormDraw::~FormDraw()
|
FormDraw::~FormDraw()
|
||||||
|
|
@ -67,62 +68,6 @@ FormDraw::~FormDraw()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::setDrawData(QStringList listdt)
|
|
||||||
{
|
|
||||||
QString strWellName = listdt.at(1);
|
|
||||||
QString strSlfName = listdt.at(2);
|
|
||||||
QString strLineName = listdt.at(3);
|
|
||||||
QString strType = listdt.at(4);
|
|
||||||
int nW = listdt.at(5).toInt();
|
|
||||||
|
|
||||||
m_strSlfName = strSlfName;
|
|
||||||
if(m_listLineName.contains(strLineName))
|
|
||||||
{
|
|
||||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName);
|
|
||||||
curv->m_strUuid = m_strUuid;
|
|
||||||
//背景设置成透明色
|
|
||||||
curv->setBackground(Qt::transparent);
|
|
||||||
curv->setStyleSheet("background: transparent;");
|
|
||||||
|
|
||||||
double dHight = 0;
|
|
||||||
dHight = (g_iY2-g_iY1)*100.0/(double)g_iScale * g_dPixelPerCm;
|
|
||||||
if(g_iShow==1)
|
|
||||||
{
|
|
||||||
//显示刻度
|
|
||||||
dHight = dHight+30;
|
|
||||||
}
|
|
||||||
if(dHight>32767)
|
|
||||||
{
|
|
||||||
dHight = 32767;
|
|
||||||
}
|
|
||||||
curv->setGeometry(0, 0, nW, (int)dHight);//7500-3184
|
|
||||||
|
|
||||||
curv->show();
|
|
||||||
|
|
||||||
// 深度
|
|
||||||
if("depthObject" == strType)
|
|
||||||
{
|
|
||||||
initDepth(curv);
|
|
||||||
}
|
|
||||||
else if("plObject" == strType)
|
|
||||||
{
|
|
||||||
initFgrq(curv);
|
|
||||||
}
|
|
||||||
curv->replot();
|
|
||||||
|
|
||||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
|
||||||
|
|
||||||
//道-对象
|
|
||||||
m_formTrack->setDrawDt(listdt, m_vmax, m_vmin);
|
|
||||||
//
|
|
||||||
m_listLineName.push_back(strLineName);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void FormDraw::paintEvent(QPaintEvent*)
|
void FormDraw::paintEvent(QPaintEvent*)
|
||||||
{
|
{
|
||||||
|
|
@ -466,8 +411,7 @@ void FormDraw::setRowHeight(double dHight, QProgressBar *progressBar, int iSplit
|
||||||
//progressBar->setValue(iBeginValue+ i*iSplitCurv); // 更新进度条的值
|
//progressBar->setValue(iBeginValue+ i*iSplitCurv); // 更新进度条的值
|
||||||
//
|
//
|
||||||
QMyCustomPlot *form = (QMyCustomPlot*)childWidget;
|
QMyCustomPlot *form = (QMyCustomPlot*)childWidget;
|
||||||
int nw = form->geometry().width();
|
form->setGeometry(0, 0, g_iOneWidth, (int)dHight);//7500-3184
|
||||||
form->setGeometry(0, 0, nw, (int)dHight);//7500-3184
|
|
||||||
//深度改变
|
//深度改变
|
||||||
form->xAxis->setRange(g_iY1, g_iY2);
|
form->xAxis->setRange(g_iY1, g_iY2);
|
||||||
|
|
||||||
|
|
@ -826,6 +770,80 @@ void FormDraw::s_selectionRectAccepted(const QRect &rect, QMouseEvent *event)
|
||||||
// double y2 = widget->yAxis->pixelToCoord(rect.bottom());
|
// double y2 = widget->yAxis->pixelToCoord(rect.bottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormDraw::s_addDepth(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());
|
||||||
|
curv->yAxis->setTickLabels(true);
|
||||||
|
curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
|
||||||
|
QFont font1("微软雅黑", 16); //fontSize 10
|
||||||
|
curv->yAxis->setTickLabelFont(font1);
|
||||||
|
|
||||||
|
curv->yAxis->setRange(g_iY1, g_iY2);
|
||||||
|
curv->axisRect()->setupFullAxesBox();
|
||||||
|
//
|
||||||
|
// curv->xAxis->ticker()->setTickCount(10);//x个主刻度
|
||||||
|
// curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||||
|
|
||||||
|
//对调XY轴,在最前面设置
|
||||||
|
QCPAxis *yAxis = curv->yAxis;
|
||||||
|
QCPAxis *xAxis = curv->xAxis;
|
||||||
|
curv->xAxis = yAxis;
|
||||||
|
curv->yAxis = xAxis;
|
||||||
|
|
||||||
|
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, nW, (int)dHight);//7500-3184
|
||||||
|
|
||||||
|
curv->show();
|
||||||
|
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||||
|
|
||||||
|
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_vmax, m_vmin, strScaleType, "depthObject");
|
||||||
|
//
|
||||||
|
m_listLineName.push_back(strLineName);
|
||||||
|
}
|
||||||
|
|
||||||
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
||||||
{
|
{
|
||||||
|
|
@ -1630,12 +1648,9 @@ void FormDraw::initTableLine(QMyCustomPlot *widget, QString strSlfName, QString
|
||||||
m_bTableData=0;//表格或曲线
|
m_bTableData=0;//表格或曲线
|
||||||
m_LeftVal2=0;
|
m_LeftVal2=0;
|
||||||
m_RightVal2=360;
|
m_RightVal2=360;
|
||||||
|
//m_csCurveDDIR="DDIR";
|
||||||
m_csCurveDDIR = "DDIR"; // 方位 曲线名
|
//m_csCurveDANG="DANG";
|
||||||
m_csCurveDANG = "DANG";//倾角
|
//m_csCurveGrad="GRAD";
|
||||||
m_csCurveGrad = "GRAD";
|
|
||||||
|
|
||||||
|
|
||||||
m_nTailWidth=2;
|
m_nTailWidth=2;
|
||||||
m_crTail=qRgb(0,0,0);
|
m_crTail=qRgb(0,0,0);
|
||||||
m_crPointFill=qRgb(0,0,0);
|
m_crPointFill=qRgb(0,0,0);
|
||||||
|
|
@ -2669,87 +2684,6 @@ bool FormDraw::LoadFromSLF_Gujing(QMyCustomPlot *widget, QString strSlfName, QSt
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::initDepth(QMyCustomPlot *curv)
|
|
||||||
{
|
|
||||||
curv->yAxis->setTickLabels(true);
|
|
||||||
curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
|
|
||||||
QFont font1("微软雅黑", 16); //fontSize 10
|
|
||||||
curv->yAxis->setTickLabelFont(font1);
|
|
||||||
|
|
||||||
curv->yAxis->setRange(g_iY1, g_iY2);
|
|
||||||
curv->axisRect()->setupFullAxesBox();
|
|
||||||
//
|
|
||||||
// curv->xAxis->ticker()->setTickCount(10);//x个主刻度
|
|
||||||
// curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
|
||||||
|
|
||||||
//对调XY轴,在最前面设置
|
|
||||||
QCPAxis *yAxis = curv->yAxis;
|
|
||||||
QCPAxis *xAxis = curv->xAxis;
|
|
||||||
curv->xAxis = yAxis;
|
|
||||||
curv->yAxis = xAxis;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormDraw::initFgrq(QMyCustomPlot *widget)
|
|
||||||
{
|
|
||||||
widget->m_iX1 = 0;
|
|
||||||
widget->m_iX2 = 1024;
|
|
||||||
widget->m_iY1 = g_iY1;
|
|
||||||
widget->m_iY2 = g_iY2;
|
|
||||||
//
|
|
||||||
widget->xAxis->setRange(widget->m_iX1, widget->m_iX2);
|
|
||||||
widget->yAxis->setRange(g_iY1, g_iY2);
|
|
||||||
|
|
||||||
//对调XY轴,在最前面设置
|
|
||||||
QCPAxis *yAxis = widget->yAxis;
|
|
||||||
QCPAxis *xAxis = widget->xAxis;
|
|
||||||
widget->xAxis = yAxis;
|
|
||||||
widget->yAxis = xAxis;
|
|
||||||
|
|
||||||
if(m_Value == NULL)
|
|
||||||
{
|
|
||||||
Refurbish();
|
|
||||||
}
|
|
||||||
|
|
||||||
double nR = 50;
|
|
||||||
|
|
||||||
QPen wPen(Qt::black, 2);
|
|
||||||
double centerX = widget->m_iX2/2;
|
|
||||||
|
|
||||||
int nstep = 10;
|
|
||||||
int tmp = m_SDep / nstep;
|
|
||||||
float flDep = tmp * nstep;
|
|
||||||
while ( 1)
|
|
||||||
{
|
|
||||||
if((flDep>=m_EDep+nstep)||flDep>=m_EDep)break;
|
|
||||||
|
|
||||||
double tempf = flDep+(float)(nstep)/2.;
|
|
||||||
double centerY = tempf * -1.0;
|
|
||||||
|
|
||||||
QCPItemEllipse* pEse = new QCPItemEllipse(widget);
|
|
||||||
pEse->setPen(wPen);
|
|
||||||
pEse->m_bCustom = true;
|
|
||||||
pEse->m_nRadius = nR;
|
|
||||||
pEse->topLeft->setCoords(centerY, centerX);
|
|
||||||
pEse->bottomRight->setCoords(centerY, centerX);
|
|
||||||
|
|
||||||
for(int k = 0; k < 4; k++)
|
|
||||||
{
|
|
||||||
QCPItemLine* pLine1 = new QCPItemLine(widget);
|
|
||||||
pLine1->m_bCustom = true;
|
|
||||||
pLine1->m_dr = qDegreesToRadians(k*90.0);
|
|
||||||
pLine1->m_nRadius = 0;
|
|
||||||
pLine1->m_nTailLen=nR;
|
|
||||||
pLine1->setPen(wPen);
|
|
||||||
pLine1->start->setCoords(centerY,centerX);
|
|
||||||
pLine1->end->setCoords(centerY,centerX);
|
|
||||||
}
|
|
||||||
|
|
||||||
flDep += nstep;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormDraw::CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio)
|
void FormDraw::CalcDipWidth(int nColumn,float *flWidth,float factor,int x1,int x2,float flHoriRatio)
|
||||||
{
|
{
|
||||||
float scale ;
|
float scale ;
|
||||||
|
|
@ -3165,16 +3099,21 @@ void FormDraw::ReadFracDef()
|
||||||
|
|
||||||
void FormDraw::Refurbish()
|
void FormDraw::Refurbish()
|
||||||
{
|
{
|
||||||
if (m_bTableData)
|
// if we are in the valid range for the property
|
||||||
{
|
// set the new property value
|
||||||
ReadData(m_strSlfName, "");
|
// update the property
|
||||||
}
|
// let the control know that the property has changed
|
||||||
else
|
// if(this->m_bTableData)
|
||||||
{
|
// {
|
||||||
this->ReadData(m_strSlfName, m_csCurveDDIR, 0, &m_Curve);
|
// this->ReadData();//read table
|
||||||
this->ReadData(m_strSlfName, m_csCurveDANG, 1, &m_Curve2);
|
// }
|
||||||
this->ReadData(m_strSlfName, m_csCurveGrad, 2, &m_Curve3);
|
// else
|
||||||
}
|
// {
|
||||||
|
// this->ReadData(m_csCurveDDIR,0,&m_Curve);
|
||||||
|
// this->ReadData(m_csCurveDANG,1,&m_Curve2);
|
||||||
|
// this->ReadData(m_csCurveGrad,2,&m_Curve3);
|
||||||
|
// }
|
||||||
|
// redraw the control
|
||||||
}
|
}
|
||||||
|
|
||||||
//曲线
|
//曲线
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ public:
|
||||||
explicit FormDraw(QWidget *parent = nullptr, QString m_strWellName="", QString strTrackName="");
|
explicit FormDraw(QWidget *parent = nullptr, QString m_strWellName="", QString strTrackName="");
|
||||||
~FormDraw();
|
~FormDraw();
|
||||||
|
|
||||||
void setDrawData(QStringList slist);
|
|
||||||
private:
|
private:
|
||||||
Ui::FormDraw *ui;
|
Ui::FormDraw *ui;
|
||||||
|
|
||||||
|
|
@ -111,19 +110,18 @@ public:
|
||||||
//CString m_csUnit;
|
//CString m_csUnit;
|
||||||
//
|
//
|
||||||
Slf_CURVE m_Curve,m_Curve2,m_Curve3;
|
Slf_CURVE m_Curve,m_Curve2,m_Curve3;
|
||||||
char *m_Value = NULL,*m_Value2 = NULL,*m_Value3 = NULL;
|
char *m_Value,*m_Value2,*m_Value3;
|
||||||
// 以下变量需保存在模板里
|
// 以下变量需保存在模板里
|
||||||
// 绘制时,方位/倾角/可信度曲线的深度、采样间隔应该一致
|
// 绘制时,方位/倾角/可信度曲线的深度、采样间隔应该一致
|
||||||
//CString m_csCurveDDIR,m_csCurveDANG,m_csCurveGrad; // 方位/倾角/可信度 曲线名
|
//CString m_csCurveDDIR,m_csCurveDANG,m_csCurveGrad; // 方位/倾角/可信度 曲线名
|
||||||
float m_LeftVal2,m_RightVal2;
|
float m_LeftVal2,m_RightVal2;
|
||||||
float m_flGrad1,m_flGrad2; // 可信度
|
float m_flGrad1,m_flGrad2; // 可信度
|
||||||
int m_bTableData = 0;//表格或曲线
|
int m_bTableData;//表格或曲线
|
||||||
QRectF m_Rect;
|
QRectF m_Rect;
|
||||||
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
|
float m_nRadius,m_nCircleWidth; // 半径,圆线宽度
|
||||||
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
|
float m_nTailWidth,m_nTailLen; // 尾宽度、尾长
|
||||||
QColor m_crPointFill,m_crTail,m_crCircle;
|
QColor m_crPointFill,m_crTail,m_crCircle;
|
||||||
QColor m_crGridSmall;
|
QColor m_crGridSmall;
|
||||||
QString m_strSlfName;
|
|
||||||
//TabDip
|
//TabDip
|
||||||
QString m_qsWellName,m_qsTable; //
|
QString m_qsWellName,m_qsTable; //
|
||||||
QString m_qsDepth,m_qsDIP,m_qsDIR,m_qsID,m_qsProperty; // 控制曲线
|
QString m_qsDepth,m_qsDIP,m_qsDIR,m_qsID,m_qsProperty; // 控制曲线
|
||||||
|
|
@ -157,10 +155,7 @@ public:
|
||||||
void initGujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
void initGujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||||
bool LoadFromSLF_Gujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
bool LoadFromSLF_Gujing(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||||
|
|
||||||
//深度
|
|
||||||
void initDepth(QMyCustomPlot *widget);
|
|
||||||
//频率统计图
|
|
||||||
void initFgrq(QMyCustomPlot *widget);
|
|
||||||
signals:
|
signals:
|
||||||
//void sig_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
//void sig_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
|
|
@ -175,6 +170,8 @@ public slots:
|
||||||
void s_handleRectRangeChange(QCPRange newRange);
|
void s_handleRectRangeChange(QCPRange newRange);
|
||||||
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
||||||
|
|
||||||
|
void s_addDepth(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_addWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
||||||
void s_delWave(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
void s_delWave(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
|
||||||
|
|
@ -222,8 +222,7 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
||||||
//文字结论,不绘制左右范围
|
//文字结论,不绘制左右范围
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(m_strType=="waveObject"
|
if(m_strType!="depthObject")
|
||||||
|| m_strType=="curveObject")
|
|
||||||
{
|
{
|
||||||
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));
|
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));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,57 +103,6 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormTrack::setDrawDt(QStringList listdt, float vmax, float vmin)
|
|
||||||
{
|
|
||||||
QString strWellName = listdt.at(1);
|
|
||||||
QString strSlfName = listdt.at(2);
|
|
||||||
QString strLineName = listdt.at(3);
|
|
||||||
QString strType = listdt.at(4);
|
|
||||||
// int nW = listdt.at(5).toInt();
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
QString strAliasName = "深度";
|
|
||||||
if("depthObject" == strType)
|
|
||||||
{
|
|
||||||
strAliasName = "深度";
|
|
||||||
}
|
|
||||||
else if("plObject" == strType)
|
|
||||||
{
|
|
||||||
strAliasName = "频率统计图";
|
|
||||||
}
|
|
||||||
QString strUnit = "";
|
|
||||||
QColor lineColor=QColor(0,0,0);
|
|
||||||
double width=2;
|
|
||||||
QString strScaleType = "";
|
|
||||||
|
|
||||||
//曲线信息栏
|
|
||||||
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, m_strTrackName, strLineName, lineColor);
|
|
||||||
formInfo->m_strUuid = m_strUuid;
|
|
||||||
formInfo->m_strAliasName = strAliasName;
|
|
||||||
formInfo->m_strUnit = strUnit;
|
|
||||||
formInfo->m_strScaleType = strScaleType;
|
|
||||||
formInfo->m_strType = strType;
|
|
||||||
formInfo->m_nJg = 2;
|
|
||||||
formInfo->setLineWidth(width);
|
|
||||||
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_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
void FormTrack::s_addLine(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_addLine";
|
qDebug() << "FormTrack s_addLine";
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,6 @@ public:
|
||||||
public:
|
public:
|
||||||
void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType);
|
void Add(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType);
|
||||||
|
|
||||||
void setDrawDt(QStringList listdt, float vmax, float vmin);
|
|
||||||
|
|
||||||
QJsonObject makeJson();
|
QJsonObject makeJson();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ FormWell::FormWell(QWidget *parent, QString strWellName) :
|
||||||
|
|
||||||
//曲线选中,置顶
|
//曲线选中,置顶
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
||||||
|
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_NewCol(QStringList)), this, SLOT(s_NewCol(QStringList)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FormWell::~FormWell()
|
FormWell::~FormWell()
|
||||||
|
|
@ -41,18 +39,6 @@ FormWell::~FormWell()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FormWell::insertColumn(int nw)
|
|
||||||
{
|
|
||||||
auto table = ui->tableWidget;
|
|
||||||
int ncolCount = table->columnCount();
|
|
||||||
table->insertColumn(ncolCount);
|
|
||||||
table->setColumnWidth(ncolCount, nw);
|
|
||||||
|
|
||||||
table->setHorizontalHeaderItem(ncolCount, new QTableWidgetItem(""));
|
|
||||||
// ncolCount = table->columnCount();
|
|
||||||
return ncolCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWell::s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
void FormWell::s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
{
|
{
|
||||||
//选中了曲线置顶
|
//选中了曲线置顶
|
||||||
|
|
@ -167,8 +153,8 @@ void FormWell::s_NewTrack(QString strUuid, QString strWellName, QString strSlfNa
|
||||||
//ui->tableWidget->update();
|
//ui->tableWidget->update();
|
||||||
|
|
||||||
// 设置右键菜单策略
|
// 设置右键菜单策略
|
||||||
// ui->tableWidget_2->setContextMenuPolicy(Qt::CustomContextMenu);
|
// ui->tableWidget_2->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
// connect(ui->tableWidget_2, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint)));
|
// connect(ui->tableWidget_2, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormWell::s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName)
|
void FormWell::s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName)
|
||||||
|
|
@ -254,98 +240,18 @@ void FormWell::setRowHeight(double dHight, QProgressBar *progressBar, int iSplit
|
||||||
{
|
{
|
||||||
if( ui->tableWidget->cellWidget(1, i) != nullptr )
|
if( ui->tableWidget->cellWidget(1, i) != nullptr )
|
||||||
{
|
{
|
||||||
auto myWidget = ui->tableWidget->cellWidget(2, i);
|
auto myWidget = ui->tableWidget->cellWidget(2, i);
|
||||||
//
|
//
|
||||||
FormDraw *formDraw = (FormDraw*)myWidget;//获得widget
|
FormDraw *formDraw = (FormDraw*)myWidget;//获得widget
|
||||||
if(formDraw)
|
if(formDraw)
|
||||||
{
|
{
|
||||||
//progressBar->setValue(iBeginValue+ i*iSplitWell); // 更新进度条的值
|
//progressBar->setValue(iBeginValue+ i*iSplitWell); // 更新进度条的值
|
||||||
formDraw->setRowHeight(dHight, progressBar, iSplitWell);
|
formDraw->setRowHeight(dHight, progressBar, iSplitWell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormWell::s_NewCol(QStringList listdt)
|
|
||||||
{
|
|
||||||
QString strUuid = listdt.at(0);
|
|
||||||
QString strWellName = listdt.at(1);
|
|
||||||
QString strSlfName = listdt.at(2);
|
|
||||||
QString strLineName = listdt.at(3);
|
|
||||||
QString strType = listdt.at(4);
|
|
||||||
int nW = listdt.at(5).toInt();
|
|
||||||
|
|
||||||
//判断当前井是否与自己同名
|
|
||||||
if(strUuid != m_strUuid || strWellName != m_strWellName)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(nW <= 0)
|
|
||||||
nW = g_iOneWidth;
|
|
||||||
|
|
||||||
//增加1列
|
|
||||||
int columnCount = this->insertColumn(nW);
|
|
||||||
|
|
||||||
//道名
|
|
||||||
QString strTrackName = "道" + QString::number(columnCount+1);
|
|
||||||
if(strType == "depthObject")
|
|
||||||
strTrackName = "深度";
|
|
||||||
|
|
||||||
FormTrack *formTrack = NULL;
|
|
||||||
//总行数
|
|
||||||
for(int i = 0; i< 3; i++)
|
|
||||||
{
|
|
||||||
if(i==0)
|
|
||||||
{
|
|
||||||
//设置高度
|
|
||||||
ui->tableWidget->setRowHeight(i, 100);
|
|
||||||
//
|
|
||||||
QTableWidgetItem* item = new QTableWidgetItem(strTrackName);
|
|
||||||
item->setFlags(item->flags() & (~Qt::ItemIsEditable));
|
|
||||||
item->setTextAlignment(Qt::AlignCenter); //设置文本居中
|
|
||||||
ui->tableWidget->setItem(i, columnCount, item);
|
|
||||||
}
|
|
||||||
else if(i==1)
|
|
||||||
{
|
|
||||||
//设置高度
|
|
||||||
ui->tableWidget->setRowHeight(i, 300);
|
|
||||||
|
|
||||||
//曲线名称栏
|
|
||||||
formTrack = new FormTrack(this, m_strWellName, strTrackName);
|
|
||||||
formTrack->m_strUuid = m_strUuid;
|
|
||||||
formTrack->show();
|
|
||||||
ui->tableWidget->setCellWidget(i, columnCount, formTrack);
|
|
||||||
}
|
|
||||||
else if(i==2)
|
|
||||||
{
|
|
||||||
double dHight = 0;
|
|
||||||
dHight = (g_iY2-g_iY1)*100.0/(double)g_iScale * g_dPixelPerCm;
|
|
||||||
if(g_iShow==1)
|
|
||||||
{
|
|
||||||
//显示刻度
|
|
||||||
dHight = dHight+30;
|
|
||||||
}
|
|
||||||
if(dHight>32767)
|
|
||||||
{
|
|
||||||
dHight = 32767;
|
|
||||||
}
|
|
||||||
|
|
||||||
//设置高度
|
|
||||||
ui->tableWidget->setRowHeight(i, (int)dHight);//7582
|
|
||||||
//曲线绘制栏
|
|
||||||
FormDraw *formDraw = new FormDraw(this, m_strWellName, strTrackName);
|
|
||||||
formDraw->m_strUuid = m_strUuid;
|
|
||||||
formDraw->m_formTrack = formTrack;
|
|
||||||
formDraw->setDrawData(listdt);
|
|
||||||
|
|
||||||
ui->tableWidget->setCellWidget(i, columnCount, formDraw);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// emit CallManage::getInstance()->sig_AddDepth(m_strUuid, strSlfName, strWellName, strTrackName, strLineName, nW);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QJsonObject FormWell::makeJson()
|
QJsonObject FormWell::makeJson()
|
||||||
{
|
{
|
||||||
// 创建根对象
|
// 创建根对象
|
||||||
|
|
@ -361,17 +267,17 @@ QJsonObject FormWell::makeJson()
|
||||||
{
|
{
|
||||||
if( ui->tableWidget->cellWidget(1, i) != nullptr )
|
if( ui->tableWidget->cellWidget(1, i) != nullptr )
|
||||||
{
|
{
|
||||||
auto myWidget = ui->tableWidget->cellWidget(1, i);
|
auto myWidget = ui->tableWidget->cellWidget(1, i);
|
||||||
//
|
//
|
||||||
FormTrack *formTrack = (FormTrack*)myWidget;//获得widget
|
FormTrack *formTrack = (FormTrack*)myWidget;//获得widget
|
||||||
if(formTrack)
|
if(formTrack)
|
||||||
{
|
{
|
||||||
//options
|
//options
|
||||||
QJsonObject formTrackObj;
|
QJsonObject formTrackObj;
|
||||||
formTrackObj["id"] = i;
|
formTrackObj["id"] = i;
|
||||||
formTrackObj["info"] = formTrack->makeJson();
|
formTrackObj["info"] = formTrack->makeJson();
|
||||||
subcaseArray.append(formTrackObj);
|
subcaseArray.append(formTrackObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootObj["formTracks"]=subcaseArray;
|
rootObj["formTracks"]=subcaseArray;
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,6 @@ public:
|
||||||
explicit FormWell(QWidget *parent = nullptr, QString strWellName="");
|
explicit FormWell(QWidget *parent = nullptr, QString strWellName="");
|
||||||
~FormWell();
|
~FormWell();
|
||||||
|
|
||||||
// 插入列,返回列索引
|
|
||||||
int insertColumn(int nw);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::FormWell *ui;
|
Ui::FormWell *ui;
|
||||||
|
|
||||||
|
|
@ -34,8 +31,6 @@ public:
|
||||||
void setRowHeight(double dHight, QProgressBar *progressBar, int iSplit);
|
void setRowHeight(double dHight, QProgressBar *progressBar, int iSplit);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void s_NewCol(QStringList listdt);
|
|
||||||
|
|
||||||
void s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName, QString strType,int nW);
|
void s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName, QString strType,int nW);
|
||||||
//新建空白道,没有曲线
|
//新建空白道,没有曲线
|
||||||
void s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);
|
void s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);
|
||||||
|
|
|
||||||
|
|
@ -383,8 +383,6 @@ void MainWindow::s_showView()
|
||||||
{
|
{
|
||||||
//----
|
//----
|
||||||
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
||||||
// 左侧树
|
|
||||||
mainWindowCurve->m_leftWidgets = m_projectWidgets;
|
|
||||||
m_centerWidgets->addTab(mainWindowCurve, "解释视图");
|
m_centerWidgets->addTab(mainWindowCurve, "解释视图");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -394,8 +392,6 @@ void MainWindow::s_showView()
|
||||||
|
|
||||||
//----
|
//----
|
||||||
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
||||||
// 左侧树
|
|
||||||
mainWindowCurve->m_leftWidgets = m_projectWidgets;
|
|
||||||
m_centerWidgets->addTab(mainWindowCurve, fileName);
|
m_centerWidgets->addTab(mainWindowCurve, fileName);
|
||||||
mainWindowCurve->Open(fileFull);
|
mainWindowCurve->Open(fileFull);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -366,8 +366,7 @@ void MainWindowCurve::initToolBar()
|
||||||
ui->toolBar->addAction(m_LogMudAc);
|
ui->toolBar->addAction(m_LogMudAc);
|
||||||
|
|
||||||
//connect(m_newAc2, &QAction::triggered, this, &MainWindowCurve::s_NewWell);
|
//connect(m_newAc2, &QAction::triggered, this, &MainWindowCurve::s_NewWell);
|
||||||
connect(m_depthAc, &QAction::triggered, this, &MainWindowCurve::s_NewDepth);
|
connect(m_depthAc, &QAction::triggered, this, &MainWindowCurve::s_NewDepth);
|
||||||
connect(m_pinlvAc, &QAction::triggered, this, &MainWindowCurve::s_pinLvAc);
|
|
||||||
// connect(m_compileAc, &QAction::triggered, this, &MainWindow::s_AddOne);
|
// connect(m_compileAc, &QAction::triggered, this, &MainWindow::s_AddOne);
|
||||||
// connect(m_runAc, &QAction::triggered, this, &MainWindow::s_SaveImage);
|
// connect(m_runAc, &QAction::triggered, this, &MainWindow::s_SaveImage);
|
||||||
// connect(m_debugAc, &QAction::triggered, this, &MainWindow::s_DrawImg);
|
// connect(m_debugAc, &QAction::triggered, this, &MainWindow::s_DrawImg);
|
||||||
|
|
@ -658,144 +657,36 @@ void MainWindowCurve::s_NewTrack()
|
||||||
|
|
||||||
void MainWindowCurve::s_NewDepth()
|
void MainWindowCurve::s_NewDepth()
|
||||||
{
|
{
|
||||||
int column = -1;
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||||
|
if(column<0)
|
||||||
|
{
|
||||||
|
//当前没有选中井
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(column%2==0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//空白列
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||||
|
int iWidth = ui->tableWidget_2->columnWidth(column);
|
||||||
|
|
||||||
int nW = 100;
|
int nW = 100;
|
||||||
QString strSlfName = "";
|
|
||||||
QString strLeft = m_leftWidgets->getLeftTreeString();
|
|
||||||
if(strLeft.length() > 0)
|
|
||||||
{
|
|
||||||
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
|
||||||
if (list.size() > 3)
|
|
||||||
{
|
|
||||||
strSlfName = list[0];
|
|
||||||
QString strWellName = list[1];
|
|
||||||
// QString strLineName = list[2];
|
|
||||||
// QString strType = list[3];
|
|
||||||
|
|
||||||
if(!m_listWell.contains(strWellName))
|
|
||||||
{
|
|
||||||
//井没创建,创建井+道+曲线
|
|
||||||
//新建井
|
|
||||||
s_NewWell(strWellName);
|
|
||||||
m_listWell.push_back(strWellName);
|
|
||||||
|
|
||||||
column= 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ui->tableWidget_2->columnCount()==0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int iWidth = 0;
|
|
||||||
if(column < 0)
|
|
||||||
{
|
|
||||||
column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
|
||||||
iWidth = ui->tableWidget_2->columnWidth(column);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(column<0)
|
|
||||||
{
|
|
||||||
//当前没有选中井
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(column%2==0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//空白列
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
|
||||||
|
|
||||||
//设置列宽
|
//设置列宽
|
||||||
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
||||||
|
|
||||||
QStringList dt;
|
|
||||||
dt << m_strUuid;
|
|
||||||
dt << strWellName;
|
|
||||||
dt << strSlfName;
|
|
||||||
dt << "深度";
|
|
||||||
dt << "depthObject";
|
|
||||||
dt << QString::number(nW);
|
|
||||||
//新建道
|
//新建道
|
||||||
emit CallManage::getInstance()->sig_NewCol(dt);
|
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, "", "深度", "depthObject", nW);
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindowCurve::s_pinLvAc()
|
|
||||||
{
|
|
||||||
int column = -1;
|
|
||||||
int nW = 160;
|
|
||||||
QString strSlfName = "";
|
|
||||||
QString strLeft = m_leftWidgets->getLeftTreeString();
|
|
||||||
if(strLeft.length() > 0)
|
|
||||||
{
|
|
||||||
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
|
||||||
if (list.size() > 3)
|
|
||||||
{
|
|
||||||
strSlfName = list[0];
|
|
||||||
QString strWellName = list[1];
|
|
||||||
// QString strLineName = list[2];
|
|
||||||
// QString strType = list[3];
|
|
||||||
|
|
||||||
if(!m_listWell.contains(strWellName))
|
|
||||||
{
|
|
||||||
//井没创建,创建井+道+曲线
|
|
||||||
//新建井
|
|
||||||
s_NewWell(strWellName);
|
|
||||||
m_listWell.push_back(strWellName);
|
|
||||||
|
|
||||||
column= 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ui->tableWidget_2->columnCount()==0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int iWidth = 0;
|
|
||||||
if(column < 0)
|
|
||||||
{
|
|
||||||
column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
|
||||||
iWidth = ui->tableWidget_2->columnWidth(column);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(column<0)
|
|
||||||
{
|
|
||||||
//当前没有选中井
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(column%2==0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//空白列
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
|
||||||
|
|
||||||
//设置列宽
|
|
||||||
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
|
||||||
|
|
||||||
QStringList dt;
|
|
||||||
dt << m_strUuid;
|
|
||||||
dt << strWellName;
|
|
||||||
dt << strSlfName;
|
|
||||||
dt << "";
|
|
||||||
dt << "plObject";
|
|
||||||
dt << QString::number(nW);
|
|
||||||
//新建道
|
|
||||||
emit CallManage::getInstance()->sig_NewCol(dt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName)
|
void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
#include "formwell.h"
|
#include "formwell.h"
|
||||||
#include "geometryutils.h"
|
#include "geometryutils.h"
|
||||||
#include "formmultiheads.h"
|
#include "formmultiheads.h"
|
||||||
#include "qtprojectwidgets.h"
|
|
||||||
|
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
|
@ -60,8 +59,6 @@ public:
|
||||||
|
|
||||||
QDockWidget *m_dock1;
|
QDockWidget *m_dock1;
|
||||||
|
|
||||||
QtProjectWidgets *m_leftWidgets = NULL; //左侧工程区
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//展示所有井
|
//展示所有井
|
||||||
void DisplayWells(QJsonArray wellsArray);
|
void DisplayWells(QJsonArray wellsArray);
|
||||||
|
|
@ -107,8 +104,6 @@ public slots:
|
||||||
void s_NewTrack();//新建道
|
void s_NewTrack();//新建道
|
||||||
|
|
||||||
void s_NewDepth(); // 深度
|
void s_NewDepth(); // 深度
|
||||||
|
|
||||||
void s_pinLvAc(); // 频率统计
|
|
||||||
//
|
//
|
||||||
void s_Save();//保存
|
void s_Save();//保存
|
||||||
//void s_Open(QString fileFull);//打开
|
//void s_Open(QString fileFull);//打开
|
||||||
|
|
|
||||||
|
|
@ -586,12 +586,9 @@ void QMyCustomPlot::s_ClearFillMode(QString strUuid, QString strSlfName, QString
|
||||||
{
|
{
|
||||||
this->removeGraph(1);
|
this->removeGraph(1);
|
||||||
}
|
}
|
||||||
if(graph(0))
|
graph(0)->setBrush(Qt::NoBrush);
|
||||||
{
|
//
|
||||||
graph(0)->setBrush(Qt::NoBrush);
|
replot();
|
||||||
//
|
|
||||||
replot();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,30 +13,6 @@ QMyTreeWidget::~QMyTreeWidget()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QMyTreeWidget::getCurrentItemString()
|
|
||||||
{
|
|
||||||
QString sret = "";
|
|
||||||
QTreeWidgetItem *item = currentItem();
|
|
||||||
if(!item)
|
|
||||||
return sret;
|
|
||||||
if(item->parent()==NULL)
|
|
||||||
{
|
|
||||||
return sret;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString strTreeTag = item->data(0, Qt::UserRole).toString();
|
|
||||||
if (strTreeTag == "wellItem")
|
|
||||||
{
|
|
||||||
//曲线
|
|
||||||
QString strSlfName = item->data(0, Qt::UserRole+1).toString();
|
|
||||||
//井名
|
|
||||||
QString strWellName = item->text(0);
|
|
||||||
|
|
||||||
sret = strSlfName + "#@@#"+ strWellName + "#@@#" +item->text(0)+ "#@@#" + strTreeTag;
|
|
||||||
}
|
|
||||||
return sret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QMyTreeWidget::startDrag(Qt::DropActions supportedActions)
|
void QMyTreeWidget::startDrag(Qt::DropActions supportedActions)
|
||||||
{
|
{
|
||||||
if(currentItem()->parent()==NULL)
|
if(currentItem()->parent()==NULL)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ public:
|
||||||
QMyTreeWidget(QWidget *parent = nullptr);
|
QMyTreeWidget(QWidget *parent = nullptr);
|
||||||
~QMyTreeWidget();
|
~QMyTreeWidget();
|
||||||
|
|
||||||
QString getCurrentItemString();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void startDrag(Qt::DropActions supportedActions);
|
virtual void startDrag(Qt::DropActions supportedActions);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,6 @@ QtProjectWidgets::~QtProjectWidgets()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QtProjectWidgets::getLeftTreeString()
|
|
||||||
{
|
|
||||||
return ui->treeWidget->getCurrentItemString();
|
|
||||||
}
|
|
||||||
|
|
||||||
//初始化树图控件
|
//初始化树图控件
|
||||||
void QtProjectWidgets::initTreeWidget(QString fullPath, QString strProjectName)
|
void QtProjectWidgets::initTreeWidget(QString fullPath, QString strProjectName)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ public:
|
||||||
QtProjectWidgets(QWidget *parent = nullptr);
|
QtProjectWidgets(QWidget *parent = nullptr);
|
||||||
~QtProjectWidgets();
|
~QtProjectWidgets();
|
||||||
|
|
||||||
QString getLeftTreeString();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::QtProjectWidgetsClass *ui;
|
Ui::QtProjectWidgetsClass *ui;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user