From 3cccf4f88412c6501f200d8dc7c176de9b555d3d Mon Sep 17 00:00:00 2001 From: jiayulong Date: Thu, 14 May 2026 16:32:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BA=95=E6=AC=A1=EF=BC=8C=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E5=88=B7=E6=96=B0=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E7=AE=97=E6=B3=95=E6=9B=B4=E6=96=B0=E5=90=8E=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/CallManage.h | 2 + logPlus/mainwindowcurve.cpp | 58 +++++++++++++++++------ logPlus/mainwindowcurve.h | 16 +++++++ logPlus/qmycustomplot.cpp | 93 +++++++++++++++++++++++++++++++++++++ logPlus/qmycustomplot.h | 3 ++ 5 files changed, 157 insertions(+), 15 deletions(-) diff --git a/logPlus/CallManage.h b/logPlus/CallManage.h index d8b5235..bd9e2cd 100644 --- a/logPlus/CallManage.h +++ b/logPlus/CallManage.h @@ -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 left_Low_List, QList right_Hight_List); diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 47df0a1..531faaa 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -293,6 +293,7 @@ void MainWindowCurve::initMainToolBar() { QSize toolIconSize(18, 18); ui->mainToolBar->setIconSize(toolIconSize); //设置工具栏图标大小 +// ui->mainToolBar->setStyleSheet("QToolButton:checked { background-color: red; }"); QIcon selectWellIcon(::GetImagePath()+"icon/WellTops.png"); QIcon fixwellsectionHeaderIcon(::GetImagePath()+"icon/fixwellsectionHeader.png"); @@ -309,20 +310,6 @@ void MainWindowCurve::initMainToolBar() 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); @@ -350,11 +337,15 @@ void MainWindowCurve::initMainToolBar() 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_loadAc); //ui->mainToolBar->addAction(m_openAc); + // 设置为可选中 +// m_fixwellsectionHeaderAc->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); @@ -5189,10 +5180,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(); diff --git a/logPlus/mainwindowcurve.h b/logPlus/mainwindowcurve.h index 84aacef..5c0a415 100644 --- a/logPlus/mainwindowcurve.h +++ b/logPlus/mainwindowcurve.h @@ -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_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; //加载 public slots: void s_NewWell(QString strWellName, QString strSlfName);//新建井 diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index ac9bcd9..48caeaf 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -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(); diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index d158ca6..340c222 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -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); From 1563ef410cf9a2ab8c62f9a81f13c2fe78ce6fb7 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Thu, 14 May 2026 17:11:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=94=81=E5=A4=B4=EF=BC=8C=E6=A0=A1?= =?UTF-8?q?=E6=B7=B1=EF=BC=8C=E6=8B=BC=E6=8E=A5=E6=8C=89=E9=92=AE=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=90=8E=EF=BC=8C=E5=91=88=E7=8E=B0=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E6=95=88=E6=9E=9C=EF=BC=8C=E5=BA=95=E8=89=B2=E5=8F=98=E8=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 20 ++++++++++++-------- logPlus/mainwindowcurve.h | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 531faaa..03a8201 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -293,7 +293,7 @@ void MainWindowCurve::initMainToolBar() { QSize toolIconSize(18, 18); ui->mainToolBar->setIconSize(toolIconSize); //设置工具栏图标大小 -// ui->mainToolBar->setStyleSheet("QToolButton:checked { background-color: red; }"); + ui->mainToolBar->setStyleSheet("QToolButton:checked { background-color: rgb(188,216,239); }"); QIcon selectWellIcon(::GetImagePath()+"icon/WellTops.png"); QIcon fixwellsectionHeaderIcon(::GetImagePath()+"icon/fixwellsectionHeader.png"); @@ -328,11 +328,11 @@ 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_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 @@ -342,9 +342,9 @@ void MainWindowCurve::initMainToolBar() //ui->mainToolBar->addAction(m_openAc); // 设置为可选中 -// m_fixwellsectionHeaderAc->setCheckable(true); -// m_executeDepthShiftAc->setCheckable(true); // 设置为可选中 -// m_joindepthAc->setCheckable(true); // 设置为可选中 + m_fixwellsectionHeaderAc->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); @@ -2611,6 +2611,7 @@ void MainWindowCurve::s_ExecuteDepthShift() } m_bMerge = false; ui->toolBar_3->hide(); + m_joindepthAc->setChecked(false); //拼接不选中 // if(ui->toolBar_2->isHidden()) @@ -2634,6 +2635,7 @@ void MainWindowCurve::s_ExecuteMerge() } m_bMerge = true; ui->toolBar_2->hide(); + m_executeDepthShiftAc->setChecked(false);//校深不选中 // if(ui->toolBar_3->isHidden()) @@ -3202,6 +3204,8 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, { m_dock1->hide(); m_dock2->hide(); + // + m_fixwellsectionHeaderAc->setChecked(false);//锁头不选中 } //中间 ui->centralwidget->show(); diff --git a/logPlus/mainwindowcurve.h b/logPlus/mainwindowcurve.h index 5c0a415..464c05c 100644 --- a/logPlus/mainwindowcurve.h +++ b/logPlus/mainwindowcurve.h @@ -195,7 +195,7 @@ public: QAction* m_SaveAsPictureAc = nullptr; //导出长图 QAction* m_SaveAsPdfAc = nullptr; //导出PDF QAction* m_SaveAsSvgAc = nullptr; //导出SVG -// QAction* m_runAc = nullptr;// + //QAction* m_doubleHeadAc = nullptr; //单曲线头 // QAction* m_debugAc = nullptr; // // QAction* m_loadAc = nullptr; //加载 From e039ee426fa47d75ea15fe31584bc1f27a495fe7 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Thu, 14 May 2026 17:52:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8F=82=E7=85=A7=E5=90=88=E5=90=8C?= =?UTF-8?q?=EF=BC=8Ctoolbar=E8=BF=BD=E5=8A=A0=E5=8D=95=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=E5=A4=B4=E6=8C=89=E9=92=AE,=E5=87=BA=E5=9B=BE=E6=97=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=8F=AA=E6=89=93=E5=8D=B01=E4=B8=AA?= =?UTF-8?q?=E6=9B=B2=E7=BA=BF=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 119 +++++++++++++++++++++++++++--------- logPlus/mainwindowcurve.h | 3 +- 2 files changed, 93 insertions(+), 29 deletions(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 03a8201..2eb0f5a 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -305,8 +305,8 @@ 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工具栏 @@ -320,7 +320,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); @@ -331,18 +331,21 @@ void MainWindowCurve::initMainToolBar() ui->mainToolBar->addAction(m_fixwellsectionHeaderAc); //锁头 //ui->mainToolBar->addAction(m_currtempliteAc); 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->addAction(m_SaveAsPictureAc);//导出长图 - ui->mainToolBar->addAction(m_SaveAsPdfAc);//导出PDF - ui->mainToolBar->addAction(m_SaveAsSvgAc);//导出SVG -// ui->mainToolBar->addAction(m_debugAc); + 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); //拼接 @@ -350,6 +353,8 @@ void MainWindowCurve::initMainToolBar() 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); @@ -2600,6 +2605,12 @@ void MainWindowCurve::s_Save() } } +//单曲线头 +void MainWindowCurve::s_DoubleHead() +{ + +} + //校深 void MainWindowCurve::s_ExecuteDepthShift() { @@ -3022,6 +3033,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; @@ -3032,8 +3049,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"; @@ -3079,7 +3102,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); // @@ -3108,7 +3138,15 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, int iLoop = 0; for(iLoop = 0; iLoop