From e4bcd5afc6aefe1ab4fdc12090a1dea481857e62 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 19:58:42 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=89=E5=9B=BE?= =?UTF-8?q?=E4=B8=80=E8=A1=A8=E7=9A=84pdf=E5=87=BA=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CallManage/CallManage.h | 8 +++++--- logPlus/formdraw.cpp | 6 ++++-- logPlus/formline.cpp | 23 +++++++++++++++++++++-- logPlus/formline.h | 3 ++- logPlus/mainwindowcurve.cpp | 8 ++++---- logPlus/qmycustomplot.cpp | 8 ++++---- logPlus/qmycustomplot.h | 4 ++-- 7 files changed, 42 insertions(+), 18 deletions(-) diff --git a/CallManage/CallManage.h b/CallManage/CallManage.h index 67b6192..e86eb55 100644 --- a/CallManage/CallManage.h +++ b/CallManage/CallManage.h @@ -177,11 +177,13 @@ signals: void sig_changeScale(QString strUuid, int iNewScale); //自定义滚动条 - void sig_vertScrollBarChanged_setGeometry(QString strUuid, int iNewValue, int low, int upper); + void sig_vertScrollBarChanged_setGeometry(QString strUuid, double iNewValue, double low, double upper); //自定义滚动条 - void sig_vertScrollBarChanged(QString strUuid, int iNewValue, int low, int upper); + void sig_vertScrollBarChanged(QString strUuid, double iNewValue, double low, double upper); //自定义滚动条(三图一表) - void sig_vertScrollBarChanged_santuyibiao(QString strUuid, int iNewValue, int low, int upper); + void sig_vertScrollBarChanged_santuyibiao(QString strUuid, double iNewValue, double low, double upper); + //自定义滚动条(三图一表,打印) + void sig_vertScrollBarChanged_santu_Print(QString strUuid, int iNum, int iHeightOfScreen); //改变深度 void sig_changeDepth(QString strUuid, QString strSlfName, QString strWellName, int iY1, int iY2); diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index b826dce..d8e296b 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -3496,7 +3496,8 @@ void FormDraw::setRowHeight(double dHight, QProgressBar *progressBar, int iSplit if(form) { int nw = form->geometry().width(); - form->setGeometry(0, 0, nw, (int)dHight); + form->setGeometry(form->geometry().x(), form->geometry().y(), nw, (int)dHight); + //form->setGeometry(0, 0, nw, (int)dHight); form->updateDepthY(m_iY1, m_iY2); //emit CallManage::getInstance()->sig_ChangeLeftScale(m_strUuid, form->m_strSlfName, m_strWellName, m_strTrackName, form->m_strLineName, form->m_iX1); @@ -4066,7 +4067,8 @@ FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QStrin ntmpw = (g_iOneWidth*4)* g_dPixelPerCm; } //curv->setGeometry(0, 0, ntmpw - 2, (int)dHight); - curv->setGeometry(0, 0, ntmpw - 2, (int)32767);//斜井三图一表,固定最大值,方便上下滚动 + //curv->setGeometry(0, 0, ntmpw - 2, (int)32767);//斜井三图一表,固定最大值,方便上下滚动 + curv->setGeometry(curv->geometry().x(), curv->geometry().y(), ntmpw - 2, (int)30000); curv->show(); //斜井三图一表 diff --git a/logPlus/formline.cpp b/logPlus/formline.cpp index ffb4ed9..435048b 100644 --- a/logPlus/formline.cpp +++ b/logPlus/formline.cpp @@ -22,7 +22,9 @@ FormLine::FormLine(QWidget *parent, QString strSlfName, QString strWellName, QSt connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)), this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant))); //自定义滚动条 - connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santuyibiao(QString, int, int, int)), this, SLOT(vertScrollBarChanged(QString, int, int, int))); + connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santuyibiao(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double))); + //打印 + connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santu_Print(QString, int, int)), this, SLOT(vertScrollBarChanged_Print(QString, int, int))); } @@ -324,7 +326,7 @@ void FormLine::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString } //自定义滚动条 -void FormLine::vertScrollBarChanged(QString strUuid, int value, int low, int upper) +void FormLine::vertScrollBarChanged(QString strUuid, double value, double low, double upper) { if(m_strUuid==strUuid) { @@ -342,6 +344,23 @@ void FormLine::vertScrollBarChanged(QString strUuid, int value, int low, int upp setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height()); } +//打印 +void FormLine::vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen) +{ + if(m_strUuid==strUuid) + { + } + else + { + return; + } + //上移或下移 + QRect geoRect = geometry(); + // + double dDelta = iHeightOfScreen*(iNum-1); + setGeometry(0, -dDelta, geoRect.width(), geoRect.height()); +} + void FormLine::wheelEvent(QWheelEvent *event) // 滚轮事件 { emit CallManage::getInstance()->sig_mouseWheel(event); diff --git a/logPlus/formline.h b/logPlus/formline.h index 5b935a3..5abe734 100644 --- a/logPlus/formline.h +++ b/logPlus/formline.h @@ -41,7 +41,8 @@ public slots: QString strGroup, QString strProperty, QVariant variant); //滚动条 - void vertScrollBarChanged(QString strUuid, int value, int low, int upper); + void vertScrollBarChanged(QString strUuid, double value, double low, double upper); + void vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen); }; #endif // FORMLINE_H diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 8d611a9..7c92152 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -252,7 +252,7 @@ void MainWindowCurve::vertScrollBarChanged(int value) } if(m_iCurPage == iNumShow) { - int iCurValue = dDelta - (iNumShow-1)*dScrollHeight; + double iCurValue = dDelta - (iNumShow-1)*dScrollHeight; //通知界面重设范围 emit CallManage::getInstance()->sig_vertScrollBarChanged_setGeometry(m_strUuid, iCurValue, dScrollHeight_setGeometry, 0); } @@ -260,14 +260,14 @@ void MainWindowCurve::vertScrollBarChanged(int value) { m_iCurPage = iNumShow; //通知界面重设范围 - int iCurValue = (iNumShow-1)*dScrollHeight + upper; + double iCurValue = (iNumShow-1)*dScrollHeight + upper; emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, iCurValue, -m_iY1, -m_iY2);//(iNumShow-1)*dScrollHeight_setGeometry } else if(value==upper) { m_iCurPage = 1; //通知界面重设范围 - int iCurValue = upper; + double iCurValue = upper; emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, iCurValue, -m_iY1, -m_iY2);//(iNumShow-1)*dScrollHeight_setGeometry } @@ -2888,7 +2888,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, //通知界面重设范围 emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, newValue, -m_iY1, -m_iY2); //通知界面重设范围(三图一表) - emit CallManage::getInstance()->sig_vertScrollBarChanged_santuyibiao(m_strUuid, newValue, -m_iY1, -m_iY2); + emit CallManage::getInstance()->sig_vertScrollBarChanged_santu_Print(m_strUuid, iLoop+1, iHeightOfScreen); if(iLoop==iNum-1) { diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 38943bc..6982de0 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -129,8 +129,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString, QString))); //自定义滚动条 - connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged(QString, int, int, int)), this, SLOT(vertScrollBarChanged(QString, int, int, int))); - connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, int, int, int)), this, SLOT(vertScrollBarChanged_setGeometry(QString, int, int, int))); + connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double))); + connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double))); //曲线选中,置顶 connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString))); @@ -11930,7 +11930,7 @@ void QMyCustomPlot::addQCPItemLine(QMyCustomPlot *widget, float cx, float cy, co pLine->setPoints(myPolygon); } -void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, int value, int low, int upper) +void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper) { if(m_strUuid==strUuid) { @@ -11950,7 +11950,7 @@ void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, int value, } //自定义滚动条 -void QMyCustomPlot::vertScrollBarChanged(QString strUuid, int value, int low, int upper) +void QMyCustomPlot::vertScrollBarChanged(QString strUuid, double value, double low, double upper) { if(m_strUuid==strUuid) { diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index ae82630..f4dacde 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -407,8 +407,8 @@ signals: public slots: void slot_time(); //自定义滚动条 - void vertScrollBarChanged(QString strUuid, int value, int low, int upper); - void vertScrollBarChanged_setGeometry(QString strUuid, int value, int low, int upper); + void vertScrollBarChanged(QString strUuid, double value, double low, double upper); + void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper); //信号槽刷新 void slot_replot(); From 526f0eeb95a4d07f27271a6c1310b16a4ff963bd Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 21:31:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=87=BA=E5=9B=BE2?= =?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2=E4=B9=8B=E9=97=B4=E7=9A=84=E9=BB=91?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 7c92152..042b6dd 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -2755,6 +2755,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, { iHeightOfScreen = g_iHeight_MyCustom; } + iHeightOfScreen = iHeightOfScreen - 2; double dScrollHeight = iHeightOfScreen/g_dPixelPerCm/100.0 * (double)m_iScale; double dDeep = m_iY2-m_iY1; @@ -2784,7 +2785,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, int iTableSize_Head = 0; getTableSize_Head(iTableSize_Head); // - int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (9+3) + iTableSize_Head; + int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (9+3) + iTableSize_Head -1; //图片高度 int iTotalSize_Height = iHight_Head+iHight_Tail; int iNum = dDeep/dScrollHeight; @@ -2894,7 +2895,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-2)); + QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height, iMaxWidth, dLastHeight)); //保存,方便查看 if(g_iDebug) { @@ -2903,7 +2904,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, if(IsBmp == 0 || IsBmp == 4) { //pdf,svg - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen-2)*iLoop, pPixmap); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*iLoop, pPixmap); } else { @@ -2912,7 +2913,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, iMaxWidth, iHeightOfScreen)); //保存,方便查看 if(g_iDebug) { @@ -2921,7 +2922,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, if(IsBmp == 0 || IsBmp == 4) { //pdf,svg - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen-2)*iLoop, pPixmap); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*iLoop, pPixmap); } else { @@ -2938,9 +2939,9 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, mDepthProgress.SetShowName(s); mDepthProgress.SetDepth(iNumShow+2); // - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen-2)*(iNum-1) + (dLastHeight-2), pPixmap_wellTrackInfo); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_wellTrackInfo); //尾 - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen-2)*(iNum-1) + (dLastHeight-2), pPixmap_Tail); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail); //结束 painter.end(); } From 9576333127b4fe71179ae4b83935ebe762ee9b8e Mon Sep 17 00:00:00 2001 From: "DESKTOP-450PEFP\\mainc" Date: Wed, 29 Apr 2026 10:41:34 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=AE=BD=E5=BA=A6=E6=94=B9double?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 10 +++++----- logPlus/mainwindowcurve.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 8d611a9..8db6a9f 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -2151,7 +2151,7 @@ void MainWindowCurve::s_ClearSetCurve() } } -QStringList MainWindowCurve::insertCol(int nW) +QStringList MainWindowCurve::insertCol(double dW) { QStringList sret; int column = -1; @@ -2213,7 +2213,7 @@ QStringList MainWindowCurve::insertCol(int nW) } //设置列宽 - ui->tableWidget_2->setColumnWidth(column, iWidth+nW*g_dPixelPerCm); + ui->tableWidget_2->setColumnWidth(column, iWidth+dW*g_dPixelPerCm); return sret; } @@ -3456,8 +3456,8 @@ void MainWindowCurve::s_NewTrack() void MainWindowCurve::s_NewDepth() { int column = -1; - int nW = 2; - QStringList sret = this->insertCol(nW); + double dW = 1.2; + QStringList sret = this->insertCol(dW); if (sret.length() <= 0) return; @@ -3467,7 +3467,7 @@ void MainWindowCurve::s_NewDepth() dt << sret.at(1); dt << "深度"; dt << "depthObject"; - dt << QString::number(nW); + dt << QString::number(dW); //新建道 emit CallManage::getInstance()->sig_NewCol(dt); } diff --git a/logPlus/mainwindowcurve.h b/logPlus/mainwindowcurve.h index 203a1de..ffda537 100644 --- a/logPlus/mainwindowcurve.h +++ b/logPlus/mainwindowcurve.h @@ -118,7 +118,7 @@ public: QJsonArray m_tailsArray; // 返回 strWellName << strSlfName - QStringList insertCol(int nW); + QStringList insertCol(double dW); // 返回 strWellName << strSlfName QStringList getSelectWell(); From 8f59098bb215ce21d0733791576f88a284b37c57 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Wed, 29 Apr 2026 11:57:57 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=AF=8F=E9=A1=B5=E5=83=8F=E7=B4=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A410000=EF=BC=8C=E5=8F=AF=E5=9C=A8config\config?= =?UTF-8?q?.ini=E9=85=8D=E7=BD=AEiHeight?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindow.cpp | 2 +- logPlus/qtcommonclass.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/logPlus/mainwindow.cpp b/logPlus/mainwindow.cpp index afed732..4e05acd 100644 --- a/logPlus/mainwindow.cpp +++ b/logPlus/mainwindow.cpp @@ -173,7 +173,7 @@ void MainWindow::ReadConfig() //(0:采用最大30000像素高度, 1:采用屏幕工作区域高度, 其他数字:高度采用g_iHeight_MyCustom的值) int iHeight = 10000; //读取,MyCustom界面高度 - //qtCommon->readHeight(configPath, iHeight); + qtCommon->readHeight(configPath, iHeight); g_iHeight_MyCustom = iHeight; //Debug模式 diff --git a/logPlus/qtcommonclass.cpp b/logPlus/qtcommonclass.cpp index 73d4be2..b4c7843 100644 --- a/logPlus/qtcommonclass.cpp +++ b/logPlus/qtcommonclass.cpp @@ -51,7 +51,7 @@ double QtCommonClass::readHeight(QString filePathName, int &iHeight) { QSettings set(filePathName, QSettings::IniFormat); set.beginGroup("config"); - iHeight = set.value("iHeight", "1").toInt(); + iHeight = set.value("iHeight", "10000").toInt(); set.endGroup(); return 0; From adc2be3afd76ca3b4183d1fd60fc6e7b1ff6b676 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Wed, 29 Apr 2026 15:20:23 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=A0=A1=E6=AD=A3=E7=BA=BF=E6=AE=B5?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=90=8E=EF=BC=8C=E7=BD=AE=E4=B8=BAnull?= =?UTF-8?q?=E5=B9=B6=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/qmycustomplot.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 6982de0..781daa8 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -4888,7 +4888,9 @@ void QMyCustomPlot::s_DelSelectShiftLineFromPlot(QString strUuid, QString strSlf { TransparentDraggableLine *pDraggableLine = (TransparentDraggableLine *)m_SelectShiftLine; pDraggableLine->deleteRect(); + m_SelectShiftLine = nullptr; } + replot(); } //清除全部分段线 @@ -4914,7 +4916,9 @@ void QMyCustomPlot::s_DelAllShiftLineFromPlot(QString strUuid, QString strSlfNam pDraggableLine = (TransparentDraggableLine*)it.value(); it++; pDraggableLine->deleteRect(); + m_SelectShiftLine = nullptr; } + this->replot(); } //执行校正