This commit is contained in:
jinyuan 2026-05-15 10:04:37 +08:00
commit b12ca05d1e
5 changed files with 257 additions and 47 deletions

View File

@ -280,6 +280,8 @@ signals:
//Plot重新加载数据
void sig_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName);
//刷新当前井的所有数据
void sig_Refresh_All(QString strUuid, QString strSlfName, QString strWellName);
//编辑曲线,框选拉伸/压缩
void sig_EShiftDepth(QString strSlfName, QString strLineName, int count, QList<double> left_Low_List, QList<double> right_Hight_List);

View File

@ -296,6 +296,7 @@ void MainWindowCurve::initMainToolBar()
{
QSize toolIconSize(18, 18);
ui->mainToolBar->setIconSize(toolIconSize); //设置工具栏图标大小
ui->mainToolBar->setStyleSheet("QToolButton:checked { background-color: rgb(188,216,239); }");
QIcon selectWellIcon(::GetImagePath()+"icon/WellTops.png");
QIcon fixwellsectionHeaderIcon(::GetImagePath()+"icon/fixwellsectionHeader.png");
@ -307,25 +308,11 @@ void MainWindowCurve::initMainToolBar()
QIcon SaveAsPictureIcon(::GetImagePath()+"icon/SaveAsPicture.png");
QIcon SaveAsPdfIcon(::GetImagePath()+"icon/ExportPDF.png");
QIcon SaveAsSvgIcon(::GetImagePath()+"icon/ExportSVG.png");
QIcon doubleHeadIcon(::GetImagePath()+"icon/oneortwohead.png");
QIcon runIcon(":/image/capacity.png");
QIcon debugIcon(":/image/anaysis.png");
QIcon loadIcon(":/image/export.png");
//Main工具栏
QAction* m_selectWellAc = nullptr; //选择井
QAction* m_fixwellsectionHeaderAc = nullptr; //锁头
QAction* m_currtempliteAc = nullptr; //加载图文件
QAction* m_saveastemplateAc = nullptr; //另存为图文件
QAction* m_executeDepthShiftAc = nullptr; //校深
QAction* m_joindepthAc = nullptr; //拼接
QAction* m_ModuleOpenAc = nullptr; //处理方法
QAction* m_SaveAsPictureAc = nullptr; //导出长图
QAction* m_SaveAsPdfAc = nullptr; //导出PDF
QAction* m_SaveAsSvgAc = nullptr; //导出SVG
// QAction* m_runAc = nullptr;//
// QAction* m_debugAc = nullptr; //
// QAction* m_loadAc = nullptr; //加载
m_selectWellAc = new QAction(selectWellIcon, "选择井", this);
m_fixwellsectionHeaderAc = new QAction(fixwellsectionHeaderIcon, "锁头", this);
m_currtempliteAc = new QAction(currtempliteIcon, "加载图文件", this);
@ -336,7 +323,7 @@ void MainWindowCurve::initMainToolBar()
m_SaveAsPictureAc = new QAction(SaveAsPictureIcon, "导出长图", this);
m_SaveAsPdfAc = new QAction(SaveAsPdfIcon, "导出PDF", this);
m_SaveAsSvgAc = new QAction(SaveAsSvgIcon, "导出SVG", this);
// m_debugAc = new QAction(debugIcon, "撤销", this);
m_doubleHeadAc = new QAction(doubleHeadIcon, "单曲线头", this);
// m_loadAc = new QAction(loadIcon, "重做", this);
//m_openAc = new QAction(openFileIcon, "打开", this);
@ -344,24 +331,33 @@ void MainWindowCurve::initMainToolBar()
//add QAction to Widget.
ui->mainToolBar->addAction(m_selectWellAc);
ui->mainToolBar->addAction(m_fixwellsectionHeaderAc);
ui->mainToolBar->addAction(m_fixwellsectionHeaderAc); //锁头
//ui->mainToolBar->addAction(m_currtempliteAc);
ui->mainToolBar->addAction(m_saveastemplateAc);
ui->mainToolBar->addAction(m_executeDepthShiftAc);
ui->mainToolBar->addAction(m_joindepthAc);
ui->mainToolBar->addAction(m_ModuleOpenAc);
ui->mainToolBar->addAction(m_SaveAsPictureAc);//导出长图
ui->mainToolBar->addAction(m_SaveAsPdfAc);//导出PDF
ui->mainToolBar->addAction(m_SaveAsSvgAc);//导出SVG
// ui->mainToolBar->addAction(m_debugAc);
ui->mainToolBar->addAction(m_saveastemplateAc); //另存为图文件
ui->mainToolBar->addSeparator();
ui->mainToolBar->addAction(m_doubleHeadAc); //单曲线头
ui->mainToolBar->addAction(m_executeDepthShiftAc); //校深
ui->mainToolBar->addAction(m_joindepthAc); //拼接
ui->mainToolBar->addAction(m_ModuleOpenAc); //处理方法
ui->mainToolBar->addSeparator();
ui->mainToolBar->addAction(m_SaveAsPictureAc); //导出长图
ui->mainToolBar->addAction(m_SaveAsPdfAc); //导出PDF
ui->mainToolBar->addAction(m_SaveAsSvgAc); //导出SVG
// ui->mainToolBar->addAction(m_loadAc);
//ui->mainToolBar->addAction(m_openAc);
// 设置为可选中
m_fixwellsectionHeaderAc->setCheckable(true); //锁头
m_doubleHeadAc->setCheckable(true); //单曲线头
m_executeDepthShiftAc->setCheckable(true); //校深
m_joindepthAc->setCheckable(true); //拼接
connect(m_selectWellAc, &QAction::triggered, this, &MainWindowCurve::s_selectWell);
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
connect(m_currtempliteAc, &QAction::triggered, this, &MainWindowCurve::s_currtemplite);
connect(m_saveastemplateAc, &QAction::triggered, this, &MainWindowCurve::s_Save);
connect(m_doubleHeadAc, &QAction::triggered, this, &MainWindowCurve::s_DoubleHead);
connect(m_executeDepthShiftAc, &QAction::triggered, this, &MainWindowCurve::s_ExecuteDepthShift);
connect(m_joindepthAc, &QAction::triggered, this, &MainWindowCurve::s_ExecuteMerge);
@ -2612,6 +2608,12 @@ void MainWindowCurve::s_Save()
}
}
//单曲线头
void MainWindowCurve::s_DoubleHead()
{
}
//校深
void MainWindowCurve::s_ExecuteDepthShift()
{
@ -2623,6 +2625,7 @@ void MainWindowCurve::s_ExecuteDepthShift()
}
m_bMerge = false;
ui->toolBar_3->hide();
m_joindepthAc->setChecked(false); //拼接不选中
//
if(ui->toolBar_2->isHidden())
@ -2646,6 +2649,7 @@ void MainWindowCurve::s_ExecuteMerge()
}
m_bMerge = true;
ui->toolBar_2->hide();
m_executeDepthShiftAc->setChecked(false);//校深不选中
//
if(ui->toolBar_3->isHidden())
@ -3036,6 +3040,12 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
int iTableSize_Head = 0;
getTableSize_Head(iTableSize_Head);
//
bool bDoubleHead = true;
if(m_doubleHeadAc->isChecked())
{
bDoubleHead = false;
}
int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (9+3) + iTableSize_Head -1;
//图片高度
int iTotalSize_Height = iHight_Head+iHight_Tail;
@ -3046,8 +3056,14 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
dLastHeight = (m_iY2-m_iY1) *100.0/(double)m_iScale * g_dPixelPerCm - iNum*iHeightOfScreen;
iNum++;
}
iTotalSize_Height += iTableWellTrack_height*2 + (iNum-1)*iHeightOfScreen + (int)dLastHeight;//双道头
//双道头
if(bDoubleHead)
{
iTotalSize_Height += iTableWellTrack_height*2 + (iNum-1)*iHeightOfScreen + (int)dLastHeight;//双道头
}
else{
iTotalSize_Height += iTableWellTrack_height + (iNum-1)*iHeightOfScreen + (int)dLastHeight;//单道头
}
QString filename;
filename=GetProjectFolder();
filename+="temp.tif";
@ -3093,7 +3109,14 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
}
//中间
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, 1);//道头是第1页
//双道头
if(bDoubleHead)
{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, 1);//道头是第1页
}
else{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+1, 1);//道头是第1页
}
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(1);
//
@ -3122,7 +3145,15 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
int iLoop = 0;
for(iLoop = 0; iLoop<iNum; iLoop++)
{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, iLoop+2);//道头是第1页
//双道头
if(bDoubleHead)
{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, iLoop+2);//道头是第1页
}
else{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+1, iLoop+2);//道头是第1页
}
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(iLoop+2);
@ -3186,28 +3217,53 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
{
//pdf,svg
//双道头
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(iNumShow+2);
//
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_wellTrackInfo);
//尾
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail);
//结束
painter.end();
if(bDoubleHead)
{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(iNumShow+2);
//
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_wellTrackInfo);
//尾
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail);
//结束
painter.end();
}
else{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+1, iNumShow+1);
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(iNumShow+1);
//尾
painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail);
//结束
painter.end();
}
}
else
{
//双道头
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(iNumShow+2);
//
images.append(convertToQImage(pPixmap_wellTrackInfo)); // 将QPixmap转换为QImage并存储到列表中
//尾
if(iHight_Tail)
if(bDoubleHead)
{
images.append(convertToQImage(pPixmap_Tail)); // 将QPixmap转换为QImage并存储到列表中
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+2, iNumShow+2);//双道头是最一页
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(iNumShow+2);
//
images.append(convertToQImage(pPixmap_wellTrackInfo)); // 将QPixmap转换为QImage并存储到列表中
//尾
if(iHight_Tail)
{
images.append(convertToQImage(pPixmap_Tail)); // 将QPixmap转换为QImage并存储到列表中
}
}
else{
sprintf(s,"图片生成中,共计%d页正在生成第%d页..", iNumShow+1, iNumShow+1);
mDepthProgress.SetShowName(s);
mDepthProgress.SetDepth(iNumShow+1);
//尾
if(iHight_Tail)
{
images.append(convertToQImage(pPixmap_Tail)); // 将QPixmap转换为QImage并存储到列表中
}
}
}
@ -3218,6 +3274,8 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
{
m_dock1->hide();
m_dock2->hide();
//
m_fixwellsectionHeaderAc->setChecked(false);//锁头不选中
}
//中间
ui->centralwidget->show();
@ -5196,10 +5254,47 @@ void MainWindowCurve::slotContextMenu(QPoint pos)
{
QMenu menu(ui->tableWidget_2);
menu.addAction(QIcon(::GetImagePath() + "antialiasing.png"), "删除当前测井图", this, &MainWindowCurve::slotDeleteSelectWell);
menu.addAction(QIcon(::GetImagePath() + "icon/CopyCoreTxt.png"), "刷新当前测井数据", this, &MainWindowCurve::slotRefreshWell);
menu.exec(ui->tableWidget_2->mapToGlobal(pos));
}
}
//刷新当前井的所有数据
void MainWindowCurve::slotRefreshWell()
{
int colCount = ui->tableWidget_2->columnCount();
//当前列
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
if(column<0)
{
//当前没有选中井
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
return;
}
if(column%2==0)
{
}
else
{
//空白列
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
return;
}
//当前行
QStringList sret = this->getSelectWell_New();
if (sret.length() <= 0)
return;
QString strWellName = sret.at(0);
//直接从选中的井获取data记录slf路径
QString strSlfName = sret.at(1);
//刷新当前井的所有数据
emit CallManage::getInstance()->sig_Refresh_All(m_strUuid, strSlfName, strWellName);
}
void MainWindowCurve::slotDeleteSelectWell()
{
int colCount = ui->tableWidget_2->columnCount();

View File

@ -182,6 +182,22 @@ public slots:
//右键菜单响应函数
void slotContextMenu(QPoint pos);
void slotDeleteSelectWell();
void slotRefreshWell();//刷新井数据
public:
QAction* m_selectWellAc = nullptr; //选择井
QAction* m_fixwellsectionHeaderAc = nullptr; //锁头
QAction* m_currtempliteAc = nullptr; //加载图文件
QAction* m_saveastemplateAc = nullptr; //另存为图文件
QAction* m_doubleHeadAc = nullptr; //单曲线头
QAction* m_executeDepthShiftAc = nullptr; //校深
QAction* m_joindepthAc = nullptr; //拼接
QAction* m_ModuleOpenAc = nullptr; //处理方法
QAction* m_SaveAsPictureAc = nullptr; //导出长图
QAction* m_SaveAsPdfAc = nullptr; //导出PDF
QAction* m_SaveAsSvgAc = nullptr; //导出SVG
// QAction* m_debugAc = nullptr; //
// QAction* m_loadAc = nullptr; //加载
public slots:
void s_NewWell(QString strWellName, QString strSlfName);//新建井
@ -261,6 +277,7 @@ public slots:
void s_showHeadTable(); //显示/隐藏图头
void s_currtemplite(); //加载图文件
void s_Save(); //保存图文件
void s_DoubleHead(); //单曲线头
void s_ExecuteDepthShift(); //校深
void s_ExecuteMerge(); //拼接
void s_ModuleOpen(); //处理算法

View File

@ -195,6 +195,10 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
//Plot重新加载数据
connect(CallManage::getInstance(), SIGNAL(sig_ReloadPlot(QString, QString, QString)), this, SLOT(s_ReloadPlot(QString, QString, QString)));
//刷新当前井的所有数据
connect(CallManage::getInstance(), SIGNAL(sig_Refresh_All(QString, QString, QString)), this, SLOT(s_Refresh_All(QString, QString, QString)));
// 深度属性修改
connect(CallManage::getInstance(), SIGNAL(sig_changeDepthProperty(QVariantList)), this, SLOT(s_changeDepthProperty(QVariantList)));
@ -5895,6 +5899,95 @@ void QMyCustomPlot::s_ReloadPlot(QString strUuid, QString strSlfName, QString st
replot(QCustomPlot::rpQueuedReplot); //刷新曲线
}
//刷新当前井的所有数据
void QMyCustomPlot::s_Refresh_All(QString strUuid, QString strSlfName, QString strWellName)
{
if(m_strUuid == strUuid &&
m_strSlfName == strSlfName &&
m_strWellName == strWellName)
{
}
else
{
return;
}
//曲线
if(m_addRandomGraph && m_strLineName != "CORE_PHYSICS")
{
s_ReloadPlot(m_strUuid, m_strSlfName, m_strLineName);
}
if (m_strLineName == "SWALL_CORE")
{
//井壁取心
RefreshItems_SWallCore();
}
else if (m_strLineName == "GEO_LITH")
{
//录井剖面
RefreshItems_GeoLith();
}
else if (m_strLineName == "WORDS_RELUST")
{
//岩性描述,文字结论
RefreshItems_Text();
}
else if (m_strLineName == "LAYER_DATA")
{
//地质分层
RefreshItems_Layer();
}
else if (m_strLineName == "RESULT")
{
// 解释结论
RefreshItems_Layer();
}
else if (m_strLineName == "IMAGE_DATA")
{
//岩心图片
refreshItemsImage();
}
else if (m_strLineName == "CORE_PHYSICS")
{
// 岩心分析
refreshCorePhysics();
}
//
FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
if (pInfo == NULL)
{
return;
}
QString strType = pInfo->m_strType;
if (strType == "JiegutextObject")
{
//气测/FMT/射孔/文本
RefreshItems_Jiegutext();
}
else if (strType == "gujingObject")
{
//固井
RefreshItems_Gujing();
}
else if (strType == "LogfaceObject")
{
//沉积相
}
else if (strType == "TubingstringObject")
{
//套管组件
RefreshItems_Tubing();
}
else if (strType == "CrackObject")
{
// 裂缝
}
}
void QMyCustomPlot::s_changeDrawProperty(QVariantList vlist)
{
QString strUuid = vlist.at(0).toString();

View File

@ -667,6 +667,9 @@ public slots:
//Plot重新加载数据
void s_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName);
//刷新当前井的所有数据
void s_Refresh_All(QString strUuid, QString strSlfName, QString strWellName);
void s_changeDrawProperty(QVariantList vlist);
// 深度
void s_changeDepthProperty(QVariantList vlist);