From eda26ea320655eb5d685070eb7b8107c18b5ca32 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Fri, 12 Jun 2026 15:02:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=81=93=E5=A4=B4=E5=A4=AA?= =?UTF-8?q?=E9=AB=98=EF=BC=8C=E5=8D=A0=E6=BB=A1=E6=95=B4=E4=B8=AA=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8A=93=E6=80=95=E5=A4=B1=E8=B4=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 31be6d7..886e4ef 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -3752,6 +3752,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, //切换回锁头模式 m_fixwellsectionHeaderAc->setChecked(true); + //全部显示道头,方便抓拍道头 ShowTableHead_All(); ui->tableWidget_2->verticalScrollBar()->setValue(0); @@ -4035,6 +4036,15 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, images.append(convertToQImage(pPixmap_wellTrackInfo)); // 将QPixmap转换为QImage并存储到列表中 } + //------------------------- + //部分显示道头,方便抓拍曲线(不然如果道头太高,占满整个界面,会导致曲线部分抓怕失败) + ShowTableHead_One(); + //获取井well前2行的高度 + int iTableSize_Head_ForGrab = 0; + getTableSize_Head(iTableSize_Head_ForGrab); + int iTableWellTrack_height_ForGrab = ui->tableWidget_2->rowHeight(0) + (top+3) + iTableSize_Head_ForGrab -1 +2; + //------------------------- + double newValue = 0; double newValue_last = 0; //int iPreH = 6; @@ -4073,7 +4083,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, { //最后1页 ui->centralwidget->setGeometry(geoRect.x(), geoRect.y(), iMaxWidth, iHight+40); - QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height, iMaxWidth, dLastHeight)); + QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height_ForGrab, iMaxWidth, dLastHeight)); //保存,方便查看 if(g_iDebug) { @@ -4091,7 +4101,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, } else{ ui->centralwidget->setGeometry(geoRect.x(), geoRect.y(), iMaxWidth, iHight+40); - QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height, iMaxWidth, iHeightOfScreen-2)); + QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height_ForGrab, iMaxWidth, iHeightOfScreen-2)); //保存,方便查看 if(g_iDebug) {