追加左侧工具条的按钮处理
This commit is contained in:
parent
fe7d7fa801
commit
54978a9571
|
|
@ -336,20 +336,30 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam
|
||||||
// curv->setSizePolicy(policy);
|
// curv->setSizePolicy(policy);
|
||||||
|
|
||||||
curv->show();
|
curv->show();
|
||||||
|
|
||||||
|
int _nSamples = 0;
|
||||||
if(g_iSupport3D)
|
if(g_iSupport3D)
|
||||||
{
|
{
|
||||||
initWave_3D(curv, strSlfName, strWaveName);
|
initWave_3D(curv, strSlfName, strWaveName, _nSamples);
|
||||||
//DrawImageNew_NoFilter(curv, strSlfName, "");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
initWave(curv, strSlfName, strWaveName);
|
initWave(curv, strSlfName, strWaveName, _nSamples);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||||
|
|
||||||
//
|
//
|
||||||
m_listWaveName.push_back(strWaveName);
|
m_listWaveName.push_back(strWaveName);
|
||||||
|
|
||||||
|
QString strAliasName = "";
|
||||||
|
QString strUnit = "";
|
||||||
|
QColor newlineColor=QColor(0,0,0);
|
||||||
|
double width=2;
|
||||||
|
QString strScaleType = "";
|
||||||
|
//道-对象
|
||||||
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "waveObject");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1196,13 +1206,24 @@ void FormDraw::s_addDrawImage(QString strUuid, QString strSlfName, QString strWe
|
||||||
curv->show();
|
curv->show();
|
||||||
|
|
||||||
//图像 成像
|
//图像 成像
|
||||||
DrawImageNew_NoFilter(curv, strSlfName, "");
|
QString strWaveName = "";
|
||||||
|
int _nSamples = 0;
|
||||||
|
DrawImageNew_NoFilter(curv, strSlfName, strWaveName, _nSamples);
|
||||||
|
|
||||||
//
|
//
|
||||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||||
|
|
||||||
//
|
//
|
||||||
m_listLineName.push_back(strLineName);
|
m_listLineName.push_back(strLineName);
|
||||||
|
|
||||||
|
QString strAliasName = "成图";
|
||||||
|
QString strUnit = "";
|
||||||
|
QColor newlineColor=QColor(0,0,0);
|
||||||
|
double width=2;
|
||||||
|
QString strScaleType = "";
|
||||||
|
//道-对象
|
||||||
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "DrawImageObject");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
||||||
|
|
@ -1395,7 +1416,7 @@ double GetData(int RepCode,char *buffer)
|
||||||
return yy;
|
return yy;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::initWave(QMyCustomPlot *widget, QString strSlfName, QString strWaveName)
|
void FormDraw::initWave(QMyCustomPlot *widget, QString strSlfName, QString strWaveName, int &_nSamples)
|
||||||
{
|
{
|
||||||
CLogIO *logio=new CLogIO();
|
CLogIO *logio=new CLogIO();
|
||||||
logio->Open(strSlfName.toStdString().c_str(), CSlfIO::modeRead);
|
logio->Open(strSlfName.toStdString().c_str(), CSlfIO::modeRead);
|
||||||
|
|
@ -1417,7 +1438,7 @@ void FormDraw::initWave(QMyCustomPlot *widget, QString strSlfName, QString strWa
|
||||||
_Rlev = _wave.DepLevel;
|
_Rlev = _wave.DepLevel;
|
||||||
int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5));
|
int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5));
|
||||||
|
|
||||||
int _nSamples = _wave.TimeSamples;
|
_nSamples = _wave.TimeSamples;
|
||||||
|
|
||||||
char *value=new char[(_nSamples+1)*m_Record*_wave.CodeLen+1];
|
char *value=new char[(_nSamples+1)*m_Record*_wave.CodeLen+1];
|
||||||
logio->ReadWave(index,_SDep,m_Record,(void *)value);
|
logio->ReadWave(index,_SDep,m_Record,(void *)value);
|
||||||
|
|
@ -1523,29 +1544,9 @@ void FormDraw::initWave(QMyCustomPlot *widget, QString strSlfName, QString strWa
|
||||||
colorMap->setGradient(gradient);
|
colorMap->setGradient(gradient);
|
||||||
// 重新缩放数据维度(颜色),以使所有数据点都位于颜色渐变显示的范围内:
|
// 重新缩放数据维度(颜色),以使所有数据点都位于颜色渐变显示的范围内:
|
||||||
colorMap->rescaleDataRange();
|
colorMap->rescaleDataRange();
|
||||||
|
|
||||||
//----调色板--------
|
|
||||||
// widget->plotLayout()->addElement(0, 1, colorScale); // 将其添加到主轴矩形的右侧
|
|
||||||
// colorScale->setType(QCPAxis::atRight); // 刻度应为垂直条,刻度线/坐标轴标签右侧(实际上,右侧已经是默认值)
|
|
||||||
// colorScale->axis()->setLabel("Magnetic Field Strength");
|
|
||||||
// //确保轴rect和色标同步其底边距和顶边距(以便它们对齐):
|
|
||||||
// QCPMarginGroup *marginGroup = new QCPMarginGroup(widget);
|
|
||||||
// widget->axisRect()->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup);
|
|
||||||
// colorScale->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup);
|
|
||||||
|
|
||||||
// 重新缩放键(x)和值(y)轴,以便可以看到整个颜色图:
|
|
||||||
//widget->rescaleAxes();
|
|
||||||
|
|
||||||
QString strAliasName = "";
|
|
||||||
QString strUnit = "";
|
|
||||||
QColor newlineColor=QColor(0,0,0);
|
|
||||||
double width=2;
|
|
||||||
QString strScaleType = "";
|
|
||||||
//道-对象
|
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "waveObject");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString strWaveName)
|
void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString strWaveName, int &_nSamples)
|
||||||
{
|
{
|
||||||
CLogIO *logio=new CLogIO();
|
CLogIO *logio=new CLogIO();
|
||||||
logio->Open(strSlfName.toStdString().c_str(), CSlfIO::modeRead);
|
logio->Open(strSlfName.toStdString().c_str(), CSlfIO::modeRead);
|
||||||
|
|
@ -1566,7 +1567,7 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st
|
||||||
_Rlev = _wave.DepLevel;
|
_Rlev = _wave.DepLevel;
|
||||||
int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5));
|
int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5));
|
||||||
|
|
||||||
int _nSamples = _wave.TimeSamples;
|
_nSamples = _wave.TimeSamples;
|
||||||
|
|
||||||
char *value=new char[(_nSamples+1)*m_Record*_wave.CodeLen+1];
|
char *value=new char[(_nSamples+1)*m_Record*_wave.CodeLen+1];
|
||||||
logio->ReadWave(index,_SDep,m_Record,(void *)value);
|
logio->ReadWave(index,_SDep,m_Record,(void *)value);
|
||||||
|
|
@ -1838,26 +1839,6 @@ void FormDraw::initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString st
|
||||||
colorMap->setGradient(gradient);
|
colorMap->setGradient(gradient);
|
||||||
// 重新缩放数据维度(颜色),以使所有数据点都位于颜色渐变显示的范围内:
|
// 重新缩放数据维度(颜色),以使所有数据点都位于颜色渐变显示的范围内:
|
||||||
colorMap->rescaleDataRange();
|
colorMap->rescaleDataRange();
|
||||||
|
|
||||||
//----调色板--------
|
|
||||||
// widget->plotLayout()->addElement(0, 1, colorScale); // 将其添加到主轴矩形的右侧
|
|
||||||
// colorScale->setType(QCPAxis::atRight); // 刻度应为垂直条,刻度线/坐标轴标签右侧(实际上,右侧已经是默认值)
|
|
||||||
// colorScale->axis()->setLabel("Magnetic Field Strength");
|
|
||||||
// //确保轴rect和色标同步其底边距和顶边距(以便它们对齐):
|
|
||||||
// QCPMarginGroup *marginGroup = new QCPMarginGroup(widget);
|
|
||||||
// widget->axisRect()->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup);
|
|
||||||
// colorScale->setMarginGroup(QCP::msBottom|QCP::msTop, marginGroup);
|
|
||||||
|
|
||||||
// 重新缩放键(x)和值(y)轴,以便可以看到整个颜色图:
|
|
||||||
//widget->rescaleAxes();
|
|
||||||
|
|
||||||
QString strAliasName = "";
|
|
||||||
QString strUnit = "";
|
|
||||||
QColor newlineColor=QColor(0,0,0);
|
|
||||||
double width=2;
|
|
||||||
QString strScaleType = "";
|
|
||||||
//道-对象
|
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "waveObject");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 搜索所有配色方案名
|
// 搜索所有配色方案名
|
||||||
|
|
@ -1895,7 +1876,7 @@ int FormDraw::getColorConfig(QVector <QString> &qFiles)
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, QString strWaveName)
|
void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, QString &strWaveName, int &_nSamples)
|
||||||
{
|
{
|
||||||
if(strSlfName.isEmpty()) return;
|
if(strSlfName.isEmpty()) return;
|
||||||
if(strWaveName=="" || strWaveName=="AC") strWaveName="DYNIMAGE";
|
if(strWaveName=="" || strWaveName=="AC") strWaveName="DYNIMAGE";
|
||||||
|
|
@ -1919,7 +1900,7 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName,
|
||||||
_Rlev = _wave.DepLevel;
|
_Rlev = _wave.DepLevel;
|
||||||
int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5));
|
int m_Record=(float)(fabs((_EDep-_SDep)/_Rlev+0.5));
|
||||||
|
|
||||||
int _nSamples = _wave.TimeSamples;
|
_nSamples = _wave.TimeSamples;
|
||||||
|
|
||||||
char *value=new char[(_nSamples+1)*m_Record*_wave.CodeLen+1];
|
char *value=new char[(_nSamples+1)*m_Record*_wave.CodeLen+1];
|
||||||
logio->ReadWave(index,_SDep,m_Record,(void *)value);
|
logio->ReadWave(index,_SDep,m_Record,(void *)value);
|
||||||
|
|
@ -2061,14 +2042,6 @@ void FormDraw::DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName,
|
||||||
|
|
||||||
// 重新缩放键(x)和值(y)轴,以便可以看到整个颜色图:
|
// 重新缩放键(x)和值(y)轴,以便可以看到整个颜色图:
|
||||||
//widget->rescaleAxes();
|
//widget->rescaleAxes();
|
||||||
|
|
||||||
QString strAliasName = "成图";
|
|
||||||
QString strUnit = "";
|
|
||||||
QColor newlineColor=QColor(0,0,0);
|
|
||||||
double width=2;
|
|
||||||
QString strScaleType = "";
|
|
||||||
//道-对象
|
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "DrawImageObject");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,13 @@ public:
|
||||||
void setupSelectionDemo(QMyCustomPlot *customPlot);
|
void setupSelectionDemo(QMyCustomPlot *customPlot);
|
||||||
|
|
||||||
//波列
|
//波列
|
||||||
void initWave(QMyCustomPlot *widget, QString strSlfName, QString strWaveName);
|
void initWave(QMyCustomPlot *widget, QString strSlfName, QString strWaveName, int &_nSamples);
|
||||||
void initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString strWaveName);
|
void initWave_3D(QMyCustomPlot *widget, QString strSlfName, QString strWaveName, int &_nSamples);
|
||||||
void initWave2(QMyCustomPlot *widget, QString strSlfName, QString strWaveName);
|
void initWave2(QMyCustomPlot *widget, QString strSlfName, QString strWaveName);
|
||||||
|
|
||||||
//图像-3d成图
|
//图像-3d成图
|
||||||
int getColorConfig(QVector <QString> &qFiles);
|
int getColorConfig(QVector <QString> &qFiles);
|
||||||
void DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, QString strWaveName);
|
void DrawImageNew_NoFilter(QMyCustomPlot *widget, QString strSlfName, QString &strWaveName, int &_nSamples);
|
||||||
|
|
||||||
//表格曲线
|
//表格曲线
|
||||||
void initTableLine(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
void initTableLine(QMyCustomPlot *widget, QString strSlfName, QString strLineName);
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,11 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
||||||
//岩心分析,不绘制左右范围
|
//岩心分析,不绘制左右范围
|
||||||
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "岩心实验数据");
|
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "岩心实验数据");
|
||||||
}
|
}
|
||||||
|
else if(m_strLineName=="FRAC_HOLE.TABLE")
|
||||||
|
{
|
||||||
|
//蝌蚪图,不绘制左右范围
|
||||||
|
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, "蝌蚪图");
|
||||||
|
}
|
||||||
else if(m_strLineName=="井眼垮塌矢量图"
|
else if(m_strLineName=="井眼垮塌矢量图"
|
||||||
|| m_strLineName=="井斜方位图")
|
|| m_strLineName=="井斜方位图")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -365,18 +365,25 @@ void MainWindowCurve::initToolBar()
|
||||||
ui->toolBar->addAction(m_TDTAc);
|
ui->toolBar->addAction(m_TDTAc);
|
||||||
ui->toolBar->addAction(m_LogMudAc);
|
ui->toolBar->addAction(m_LogMudAc);
|
||||||
|
|
||||||
//connect(m_newAc2, &QAction::triggered, this, &MainWindowCurve::s_NewWell);
|
connect(m_blankTrackAc, &QAction::triggered, this, &MainWindowCurve::s_NewTrack);
|
||||||
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_logsAc, &QAction::triggered, this, &MainWindowCurve::s_NewLogs);//曲线
|
||||||
connect(m_roseAc, &QAction::triggered, this, &MainWindowCurve::s_roseAc);
|
connect(m_waveAc, &QAction::triggered, this, &MainWindowCurve::s_NewWave);//波列
|
||||||
// connect(m_compileAc, &QAction::triggered, this, &MainWindow::s_AddOne);
|
connect(m_OGResultAc, &QAction::triggered, this, &MainWindowCurve::s_NewOGResult);//解释结论道
|
||||||
// connect(m_runAc, &QAction::triggered, this, &MainWindow::s_SaveImage);
|
connect(m_gujingAc, &QAction::triggered, this, &MainWindowCurve::s_NewGujing);//固井结论道
|
||||||
// connect(m_debugAc, &QAction::triggered, this, &MainWindow::s_DrawImg);
|
connect(m_sidecoreAc, &QAction::triggered, this, &MainWindowCurve::s_NewSideCore);//井壁取心
|
||||||
// connect(m_loadAc, &QAction::triggered, this, &MainWindow::s_DrawLine);
|
connect(m_coreAc, &QAction::triggered, this, &MainWindowCurve::s_NewCore);//岩心分析
|
||||||
connect(m_ganzhuangtuAc, &QAction::triggered, this, &MainWindowCurve::s_NewGanZhuangTu);
|
connect(m_mudloggingAc, &QAction::triggered, this, &MainWindowCurve::s_NewMudlogging);//录井剖面
|
||||||
connect(m_collapseAc, &QAction::triggered, this, &MainWindowCurve::s_Jykt);
|
connect(m_txtAc, &QAction::triggered, this, &MainWindowCurve::s_NewTxt);//岩性描述
|
||||||
connect(m_deviAc, &QAction::triggered, this, &MainWindowCurve::s_Denv);
|
connect(m_coreimageAc, &QAction::triggered, this, &MainWindowCurve::s_NewCoreImage);//岩心照片
|
||||||
connect(m_electric_imagingAc, &QAction::triggered, this, &MainWindowCurve::s_DrawImage);
|
connect(m_showdipAc, &QAction::triggered, this, &MainWindowCurve::s_NewShowDip);//蝌蚪图
|
||||||
|
|
||||||
|
connect(m_pinlvAc, &QAction::triggered, this, &MainWindowCurve::s_pinLvAc);//频率统计图
|
||||||
|
connect(m_ganzhuangtuAc, &QAction::triggered, this, &MainWindowCurve::s_NewGanZhuangTu);//杆状图
|
||||||
|
connect(m_roseAc, &QAction::triggered, this, &MainWindowCurve::s_roseAc);//玫瑰图
|
||||||
|
connect(m_collapseAc, &QAction::triggered, this, &MainWindowCurve::s_Jykt);//井眼垮塌矢量图
|
||||||
|
connect(m_deviAc, &QAction::triggered, this, &MainWindowCurve::s_Denv);//井斜方位图
|
||||||
|
connect(m_electric_imagingAc, &QAction::triggered, this, &MainWindowCurve::s_DrawImage);//图像
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList MainWindowCurve::insertCol(int nW)
|
QStringList MainWindowCurve::insertCol(int nW)
|
||||||
|
|
@ -444,6 +451,41 @@ QStringList MainWindowCurve::insertCol(int nW)
|
||||||
return sret;
|
return sret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList MainWindowCurve::getSelectWell()
|
||||||
|
{
|
||||||
|
QStringList sret;
|
||||||
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
|
{
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||||
|
if(column<0)
|
||||||
|
{
|
||||||
|
//当前没有选中井
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(column%2==0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//空白列
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||||
|
//直接从选中的井获取,data记录slf路径
|
||||||
|
QString strSlfName = ui->tableWidget_2->item(0, column)->data(Qt::UserRole+1).toString();
|
||||||
|
|
||||||
|
sret << strWellName << strSlfName;
|
||||||
|
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindowCurve::loadStyle(const QString &qssFile)
|
void MainWindowCurve::loadStyle(const QString &qssFile)
|
||||||
{
|
{
|
||||||
//加载样式表
|
//加载样式表
|
||||||
|
|
@ -706,69 +748,36 @@ void MainWindowCurve::onItemClicked(QTableWidgetItem* item)
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowCurve::s_NewTrack()
|
void MainWindowCurve::s_NewTrack()
|
||||||
{
|
|
||||||
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();
|
|
||||||
//新建道
|
|
||||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, "", "", "");
|
|
||||||
|
|
||||||
int iWidth = ui->tableWidget_2->columnWidth(column);
|
|
||||||
//设置列宽
|
|
||||||
ui->tableWidget_2->setColumnWidth(column, iWidth+g_iOneWidth);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindowCurve::s_NewDepth()
|
|
||||||
{
|
{
|
||||||
int column = -1;
|
int column = -1;
|
||||||
int nW = 100;
|
QString strSlfName = "";
|
||||||
// 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, strSlfName);
|
|
||||||
// m_listWell.push_back(strWellName);
|
|
||||||
|
|
||||||
// column= 0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
//如果视图为空,则根据左侧选中的井来创建空白道
|
||||||
if(ui->tableWidget_2->columnCount()==0)
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
{
|
{
|
||||||
return;
|
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, strSlfName);
|
||||||
|
m_listWell.push_back(strWellName);
|
||||||
|
|
||||||
|
column= 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iWidth = 0;
|
int iWidth = 0;
|
||||||
|
|
@ -793,9 +802,80 @@ void MainWindowCurve::s_NewDepth()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||||
|
//新建道
|
||||||
|
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, "", "", "");
|
||||||
|
|
||||||
|
//int iWidth = ui->tableWidget_2->columnWidth(column);
|
||||||
|
//设置列宽
|
||||||
|
ui->tableWidget_2->setColumnWidth(column, iWidth+g_iOneWidth);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindowCurve::s_NewDepth()
|
||||||
|
{
|
||||||
|
int column = -1;
|
||||||
|
int nW = 100;
|
||||||
|
QString strSlfName = "";
|
||||||
|
|
||||||
|
//如果视图为空,则根据左侧选中的井来创建深度道
|
||||||
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
|
{
|
||||||
|
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, strSlfName);
|
||||||
|
m_listWell.push_back(strWellName);
|
||||||
|
|
||||||
|
column= 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int iWidth = 0;
|
||||||
|
if(column < 0)
|
||||||
|
{
|
||||||
|
column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||||
|
iWidth = ui->tableWidget_2->columnWidth(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||||
//直接从选中的井获取,data记录slf路径
|
//直接从选中的井获取,data记录slf路径
|
||||||
QString strSlfName = ui->tableWidget_2->item(0, column)->data(Qt::UserRole+1).toString();
|
if(strSlfName=="")
|
||||||
|
{
|
||||||
|
strSlfName = ui->tableWidget_2->item(0, column)->data(Qt::UserRole+1).toString();
|
||||||
|
}
|
||||||
|
|
||||||
//设置列宽
|
//设置列宽
|
||||||
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
||||||
|
|
@ -811,46 +891,137 @@ void MainWindowCurve::s_NewDepth()
|
||||||
emit CallManage::getInstance()->sig_NewCol(dt);
|
emit CallManage::getInstance()->sig_NewCol(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowCurve::s_pinLvAc()
|
//曲线
|
||||||
|
void MainWindowCurve::s_NewLogs()
|
||||||
{
|
{
|
||||||
int nW = 160;
|
QStringList sret = this->getSelectWell();
|
||||||
QStringList sret = this->insertCol(nW);
|
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QStringList dt;
|
//新建井+道+曲线(首条)
|
||||||
dt << m_strUuid;
|
NewWellAndTrack(sret.at(0), sret.at(1), "AC", "curveObject");
|
||||||
dt << sret.at(0);
|
|
||||||
dt << sret.at(1);
|
|
||||||
dt << "";
|
|
||||||
dt << "plObject";
|
|
||||||
dt << QString::number(nW);
|
|
||||||
//新建道
|
|
||||||
emit CallManage::getInstance()->sig_NewCol(dt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowCurve::s_NewGanZhuangTu()
|
//波列
|
||||||
|
void MainWindowCurve::s_NewWave()
|
||||||
{
|
{
|
||||||
// QString strSlfName = "";
|
QStringList sret = this->getSelectWell();
|
||||||
// QString strLeft = m_leftWidgets->getLeftTreeString();
|
if(sret.length() <= 0)
|
||||||
// if(strLeft.length() > 0)
|
return;
|
||||||
// {
|
|
||||||
// QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
//新建井+道+曲线(首条)
|
||||||
// if (list.size() > 3)
|
NewWellAndTrack(sret.at(0), sret.at(1), "STAIMAGE", "waveObject");
|
||||||
// {
|
}
|
||||||
// strSlfName = list[0];
|
|
||||||
// }
|
//解释结论
|
||||||
// }
|
void MainWindowCurve::s_NewOGResult()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "RESULT", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
//固井结论道
|
||||||
|
void MainWindowCurve::s_NewGujing()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "GUJING1_RESULT", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
//井壁取心
|
||||||
|
void MainWindowCurve::s_NewSideCore()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "SWALL_CORE", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
//岩心分析
|
||||||
|
void MainWindowCurve::s_NewCore()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "CORE_PHYSICS", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
//录井剖面
|
||||||
|
void MainWindowCurve::s_NewMudlogging()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "GEO_LITH", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
//岩性描述
|
||||||
|
void MainWindowCurve::s_NewTxt()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "WORDS_RELUST", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
//岩心照片
|
||||||
|
void MainWindowCurve::s_NewCoreImage()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "IMAGE_DATA", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
//蝌蚪图
|
||||||
|
void MainWindowCurve::s_NewShowDip()
|
||||||
|
{
|
||||||
|
QStringList sret = this->getSelectWell();
|
||||||
|
if(sret.length() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//新建井+道+曲线(首条)
|
||||||
|
NewWellAndTrack(sret.at(0), sret.at(1), "FRAC_HOLE.TABLE", "tableObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindowCurve::s_pinLvAc()
|
||||||
|
{
|
||||||
|
int column = -1;
|
||||||
|
int nW = 160;
|
||||||
|
|
||||||
if(ui->tableWidget_2->columnCount()==0)
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
int iWidth = 0;
|
||||||
|
if(column < 0)
|
||||||
|
{
|
||||||
|
column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||||
|
iWidth = ui->tableWidget_2->columnWidth(column);
|
||||||
|
}
|
||||||
|
|
||||||
if(column<0)
|
if(column<0)
|
||||||
{
|
{
|
||||||
//当前没有选中井
|
//当前没有选中井
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -860,6 +1031,50 @@ void MainWindowCurve::s_NewGanZhuangTu()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//空白列
|
//空白列
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||||
|
//直接从选中的井获取,data记录slf路径
|
||||||
|
QString strSlfName = ui->tableWidget_2->item(0, column)->data(Qt::UserRole+1).toString();
|
||||||
|
|
||||||
|
//设置列宽
|
||||||
|
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_NewGanZhuangTu()
|
||||||
|
{
|
||||||
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -898,17 +1113,6 @@ void MainWindowCurve::s_roseAc()
|
||||||
//井眼垮塌矢量图
|
//井眼垮塌矢量图
|
||||||
void MainWindowCurve::s_Jykt()
|
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)
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public:
|
||||||
// 返回 strWellName << strSlfName
|
// 返回 strWellName << strSlfName
|
||||||
QStringList insertCol(int nW);
|
QStringList insertCol(int nW);
|
||||||
|
|
||||||
|
// 返回 strWellName << strSlfName
|
||||||
|
QStringList getSelectWell();
|
||||||
|
|
||||||
//停靠
|
//停靠
|
||||||
void dockLayout();
|
void dockLayout();
|
||||||
|
|
||||||
|
|
@ -107,10 +110,18 @@ public slots:
|
||||||
void s_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void s_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, 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);//新建曲线,带属性
|
||||||
|
|
||||||
void s_NewTrack();//新建道
|
void s_NewTrack(); //新建道
|
||||||
|
void s_NewDepth(); // 深度
|
||||||
void s_NewDepth(); // 深度
|
void s_NewLogs(); // 曲线
|
||||||
|
void s_NewWave(); // 波列
|
||||||
|
void s_NewOGResult(); // 解释结论道
|
||||||
|
void s_NewGujing(); // 固井结论道
|
||||||
|
void s_NewSideCore(); // 井壁取心
|
||||||
|
void s_NewCore(); // 岩心分析
|
||||||
|
void s_NewMudlogging(); // 录井剖面
|
||||||
|
void s_NewTxt(); // 岩性描述
|
||||||
|
void s_NewCoreImage(); // 岩心照片
|
||||||
|
void s_NewShowDip(); // 蝌蚪图
|
||||||
void s_pinLvAc(); // 频率统计
|
void s_pinLvAc(); // 频率统计
|
||||||
void s_NewGanZhuangTu(); // 杆状图
|
void s_NewGanZhuangTu(); // 杆状图
|
||||||
void s_roseAc(); // 玫瑰图
|
void s_roseAc(); // 玫瑰图
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user