From 1ce7355e58aa78df2f6d511647004825c02f60ed Mon Sep 17 00:00:00 2001 From: "DESKTOP-450PEFP\\mainc" Date: Mon, 27 Apr 2026 16:24:32 +0800 Subject: [PATCH 1/7] replot --- logPlus/qmycustomplot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index c068cb6..961fa60 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -11845,7 +11845,7 @@ void QMyCustomPlot::vertScrollBarChanged(QString strUuid, int value, int low, in xAxis->setRange(-value, xAxis->range().size(), Qt::AlignRight); const QCPRange& rg = xAxis->range(); this->updateDepthY(rg.lower, rg.upper); - replot(); + replot(QCustomPlot::rpQueuedRefresh); } } else{ @@ -11854,7 +11854,7 @@ void QMyCustomPlot::vertScrollBarChanged(QString strUuid, int value, int low, in this->yAxis->setRange(-value, this->yAxis->range().size(), Qt::AlignRight); const QCPRange& rg = yAxis->range(); this->updateDepthY(rg.lower, rg.upper); - replot(); + replot(QCustomPlot::rpQueuedRefresh); } } } From 8c7bf0fed076f801a5a40b31c0a6cfca66cd81f7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-450PEFP\\mainc" Date: Tue, 28 Apr 2026 10:29:48 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/formdraw.cpp | 24 ++---------------------- logPlus/logplus.vcxproj | 2 -- logPlus/logplus.vcxproj.filters | 6 ------ logPlus/qmycustomplot.h | 4 ++-- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index dfbeb8d..326bcb4 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -134,11 +134,6 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, m_strTrackName, strLineName); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; - if ("depthObject" == strType || "waveObject" == strType) - { - curv->m_bRowGridVisible = false; - curv->m_bColGridVisible = false; - } curv->setDepthY(m_iY1, m_iY2); curv->initGeometry(m_strUuid, m_iScale, dW); curv->show(); @@ -3020,8 +3015,6 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri } else if (strLineName == "RESULT") { - curv->setRowGridVisible(false); - curv->setColGridVisible(false); //解释结论 initResult(curv, strSlfName, strLineName); } @@ -3057,8 +3050,6 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri } else if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT") { - curv->setRowGridVisible(false); - curv->setColGridVisible(false); //固井结论 if(listOtherProperty.size()>=3) { @@ -3346,8 +3337,6 @@ void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellNam QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strWaveName); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; - curv->m_bRowGridVisible = false; - curv->m_bColGridVisible = false; curv->setDepthY(m_iY1, m_iY2); double nW = m_nTrackW; @@ -4418,8 +4407,6 @@ void FormDraw::initMCals(QMyCustomPlot *widget, QString strSlfName, QString strL widget->xAxis->grid()->setVisible(false); widget->yAxis->grid()->setVisible(false); // - widget->m_bRowGridVisible = false; - widget->m_bColGridVisible = false; //------------------- int iMyWidth = widget->axisRect(0)->width(); @@ -4698,7 +4685,8 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi //AppendConsole(PAI_INFO, "FormDraw initForm ReadCurve end"); widget->setInteractions(QCP::iSelectLegend | QCP::iSelectPlottables); - + widget->setRowGridVisible(true); + widget->setColGridVisible(true); widget->setScaleX(vmin, vmax); widget->setDepthY(m_iY1, m_iY2); widget->initGeometry(m_strUuid, m_iScale, g_iOneWidth); @@ -5253,8 +5241,6 @@ void FormDraw::initKedou(QMyCustomPlot *widget, QString strSlfName, QString strL widget->xAxis->grid()->setVisible(false); widget->yAxis->grid()->setVisible(false); // - widget->m_bRowGridVisible = false; - widget->m_bColGridVisible = false; int iMyWidth = widget->axisRect(0)->width(); float vmax = iMyWidth; @@ -5302,8 +5288,6 @@ void FormDraw::initGanzhuang(QMyCustomPlot *widget, QString strSlfName, QString widget->xAxis->grid()->setVisible(false); widget->yAxis->grid()->setVisible(false); // - widget->m_bRowGridVisible = false; - widget->m_bColGridVisible = false; int iMyWidth = widget->axisRect(0)->width(); float vmax = iMyWidth; @@ -5355,8 +5339,6 @@ void FormDraw::initJykt(QMyCustomPlot *widget, QString strSlfName, QString strLi widget->xAxis->grid()->setVisible(false); widget->yAxis->grid()->setVisible(false); // - widget->m_bRowGridVisible = false; - widget->m_bColGridVisible = false; //------------------- m_LeftVal = 0; @@ -5413,8 +5395,6 @@ void FormDraw::initDenv(QMyCustomPlot *widget, QString strSlfName, QString strLi widget->xAxis->grid()->setVisible(false); widget->yAxis->grid()->setVisible(false); // - widget->m_bRowGridVisible = false; - widget->m_bColGridVisible = false; //------------------- m_LeftVal = 0; diff --git a/logPlus/logplus.vcxproj b/logPlus/logplus.vcxproj index b85e2eb..fbe80be 100644 --- a/logPlus/logplus.vcxproj +++ b/logPlus/logplus.vcxproj @@ -12,7 +12,6 @@ - @@ -199,7 +198,6 @@ - diff --git a/logPlus/logplus.vcxproj.filters b/logPlus/logplus.vcxproj.filters index ba0d1cd..8b97628 100644 --- a/logPlus/logplus.vcxproj.filters +++ b/logPlus/logplus.vcxproj.filters @@ -313,9 +313,6 @@ Header Files - - Header Files - Header Files @@ -537,9 +534,6 @@ Source Files - - Source Files - libtiff\libtiff diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index 46bf45d..529b635 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -254,8 +254,8 @@ public: bool m_bFirstTimeConnect=true; //初次绑定编辑曲线信号槽。 bool m_bPriviewRightList=false; //当前是否正在预览曲线。 - bool m_bRowGridVisible = true; // 网格横轴是否显示 - bool m_bColGridVisible = true; // 网格纵轴是否显示 + bool m_bRowGridVisible = false; // 网格横轴是否显示 + bool m_bColGridVisible = false; // 网格纵轴是否显示 int m_nxiGrid = 1; // 细网格间隔 QPen m_xiPen; int m_nzhongGrid = 2; // 中网格间隔 From 1e4d815759044ea154c72bdfa86ae0ba929f3e5b Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 11:05:59 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=A7=E9=87=8F?= =?UTF-8?q?=E6=9B=B2=E7=BA=BF=E4=B8=8A=E4=B8=8B=E6=BB=9A=E5=8A=A8=E5=8D=A1?= =?UTF-8?q?=E9=A1=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CallManage/CallManage.h | 2 + logPlus/formdraw.cpp | 12 +++ logPlus/mainwindow.cpp | 3 +- logPlus/mainwindowcurve.cpp | 143 +++++++++++++++++++++++++----------- logPlus/mainwindowcurve.h | 2 +- logPlus/qmycustomplot.cpp | 21 ++++++ logPlus/qmycustomplot.h | 1 + 7 files changed, 139 insertions(+), 45 deletions(-) diff --git a/CallManage/CallManage.h b/CallManage/CallManage.h index 87e496a..73b128a 100644 --- a/CallManage/CallManage.h +++ b/CallManage/CallManage.h @@ -176,6 +176,8 @@ signals: //改变缩放比例 void sig_changeScale(QString strUuid, int iNewScale); + //自定义滚动条 + void sig_vertScrollBarChanged_setGeometry(QString strUuid, int iNewValue, int low, int upper); //自定义滚动条 void sig_vertScrollBarChanged(QString strUuid, int iNewValue, int low, int upper); diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 326bcb4..d69ac1c 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -13,6 +13,7 @@ #include "formline.h" #include "PropertyWidget.h" #include "DrawTvd.h" +#include "DepthProgress.h" //以下参数从配置文件读取 extern int g_iOneWidth; //道宽 @@ -480,6 +481,11 @@ void FormDraw::DisplayLines(QJsonArray linesArray) } } + //进度提示 + char s[200]; + DepthProgress mDepthProgress; + mDepthProgress.CreatProgress(0, iCount,"加载.."); + for (int id = 0; id < iCount; id++) { if (mapLines.contains(id)) @@ -578,10 +584,16 @@ void FormDraw::DisplayLines(QJsonArray linesArray) { DisplayType_One(lineObjInfo); } + //中间 + sprintf(s,"加载中,共计%d条,正在加载第%d条..", iCount, id); + mDepthProgress.SetShowName(s); + mDepthProgress.SetDepth(id); } } } } + // + mDepthProgress.DelProgress(); } // 岩心分析 diff --git a/logPlus/mainwindow.cpp b/logPlus/mainwindow.cpp index 2659f4f..afed732 100644 --- a/logPlus/mainwindow.cpp +++ b/logPlus/mainwindow.cpp @@ -170,8 +170,9 @@ void MainWindow::ReadConfig() qtCommon->readShowScale(configPath, iShow); g_iShow = iShow; + //(0:采用最大30000像素高度, 1:采用屏幕工作区域高度, 其他数字:高度采用g_iHeight_MyCustom的值) + int iHeight = 10000; //读取,MyCustom界面高度 - int iHeight = 1; //qtCommon->readHeight(configPath, iHeight); g_iHeight_MyCustom = iHeight; diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index aeeb1ac..6a80c51 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -222,8 +222,53 @@ void MainWindowCurve::s_mouseWheel(QWheelEvent *event) //自定义滚动条 void MainWindowCurve::vertScrollBarChanged(int value) { - //通知界面缩放 - emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, value, -m_iY1, -m_iY2); + int low = -m_iY1; + int upper = -m_iY2; + + int iHeightOfScreen = 30000;//QApplication::desktop()->height(); + if(g_iHeight_MyCustom == 0) + { + iHeightOfScreen = 30000; + } + else if(g_iHeight_MyCustom == 1) + { + iHeightOfScreen = g_WorkSpace_Height; + } + else + { + iHeightOfScreen = g_iHeight_MyCustom; + } + + double dScrollHeight = (iHeightOfScreen-g_WorkSpace_Height)/g_dPixelPerCm/100.0 * (double)m_iScale; + + double dScrollHeight_setGeometry = iHeightOfScreen/g_dPixelPerCm/100.0 * (double)m_iScale; + // + double dDelta = value - upper; + int iNumShow = dDelta/dScrollHeight; + if(dDelta - (iNumShow * dScrollHeight) > 0) + { + iNumShow++; + } + if(m_iCurPage == iNumShow) + { + int iCurValue = dDelta - (iNumShow-1)*dScrollHeight; + //通知界面重设范围 + emit CallManage::getInstance()->sig_vertScrollBarChanged_setGeometry(m_strUuid, iCurValue, dScrollHeight_setGeometry, 0); + } + else if(iNumShow>0) + { + m_iCurPage = iNumShow; + //通知界面重设范围 + emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, (iNumShow-1)*dScrollHeight_setGeometry, -m_iY1, -m_iY2); + +// // +// int iCurValue = dDelta - (iNumShow-1)*dScrollHeight; +// //通知界面重设范围 +// emit CallManage::getInstance()->sig_vertScrollBarChanged_setGeometry(m_strUuid, iCurValue, dScrollHeight, 0); + } + + //通知界面重设范围 + //emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, value, -m_iY1, -m_iY2); } @@ -2562,15 +2607,15 @@ void copyFile(const QString &sourcePath, const QString &destinationPath) { // =4 to svg void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, QString strTmpName) { - //Small模式,出图的原始图片是否采用小图片(默认0:大图--缺点出图时占用内存大, 1:小图--缺点小图拼接容易有缝隙) - if(g_iSmallPrint==0) - { - //首先调整为最大图,减少打印空隙 - //MyCustom界面高度g_iHeight_MyCustom的值 (0:采用最大30000像素高度, 1:采用屏幕工作区域高度, 其他数字:高度采用g_iHeight_MyCustom的值) - g_iHeight_MyCustom = 0; - //打印出图,改变深度 - changeDepthForPrint(); - } +// //Small模式,出图的原始图片是否采用小图片(默认0:大图--缺点出图时占用内存大, 1:小图--缺点小图拼接容易有缝隙) +// if(g_iSmallPrint==0) +// { +// //首先调整为最大图,减少打印空隙 +// //MyCustom界面高度g_iHeight_MyCustom的值 (0:采用最大30000像素高度, 1:采用屏幕工作区域高度, 其他数字:高度采用g_iHeight_MyCustom的值) +// g_iHeight_MyCustom = 0; +// //打印出图,改变深度 +// changeDepthForPrint(); +// } printer.setPageMargins(0.0,0.0,0.0,0.0,QPrinter::DevicePixel); @@ -2815,6 +2860,8 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, images.append(convertToQImage(pPixmap_wellTrackInfo)); // 将QPixmap转换为QImage并存储到列表中 } + double newValue = 0; + double newValue_last = 0; //int iPreH = 6; int iLoop = 0; for(iLoop = 0; iLoopverticalScrollBar->setValue(newValue);//设置右侧滚动条 + + newValue_last = newValue; + //ui->verticalScrollBar->setValue(newValue);//设置右侧滚动条 + //通知界面重设范围 + emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, newValue, -m_iY1, -m_iY2); + if(iLoop==iNum-1) { //最后1页 @@ -2961,16 +3013,17 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, mDepthProgress.DelProgress(); //Small模式,出图的原始图片是否采用小图片(默认0:大图--缺点出图时占用内存大, 1:小图--缺点小图拼接容易有缝隙) - if(g_iSmallPrint==0) - { - //恢复调整为最小图,减少卡顿 - //MyCustom界面高度g_iHeight_MyCustom的值 (0:采用最大30000像素高度, 1:采用屏幕工作区域高度, 其他数字:高度采用g_iHeight_MyCustom的值) - g_iHeight_MyCustom = 1; - //打印出图,改变深度 - changeDepthForPrint(); - } +// if(g_iSmallPrint==0) +// { +// //恢复调整为最小图,减少卡顿 +// //MyCustom界面高度g_iHeight_MyCustom的值 (0:采用最大30000像素高度, 1:采用屏幕工作区域高度, 其他数字:高度采用g_iHeight_MyCustom的值) +// g_iHeight_MyCustom = 1; +// //打印出图,改变深度 +// changeDepthForPrint(); +// } - ui->verticalScrollBar->setValue(-m_iY2);//设置右侧滚动条 + //ui->verticalScrollBar->setValue(-m_iY1);//设置右侧滚动条 + ui->verticalScrollBar->setValue(newValue_last);//设置右侧滚动条 if(bOK) { QMessageBox::information(NULL,"提示","图件输出完成!",QMessageBox::Ok); @@ -4144,8 +4197,11 @@ void MainWindowCurve::Open(QString fileFull) //重置右侧滚动条 ui->verticalScrollBar->setRange(-m_iY2, -m_iY1); ui->verticalScrollBar->setValue(-m_iY2); + + QMessageBox::information(NULL,"提示","模板加载完成!",QMessageBox::Ok); } else { qWarning() << "JSON 模板文件打开失败:" << file.errorString(); + QMessageBox::information(NULL,"提示","模板加载失败!",QMessageBox::Ok); } } @@ -4419,16 +4475,31 @@ void MainWindowCurve::changeDepthForPrint() progressBar->hide(); - double dHight = 0; - dHight = (m_iY2-m_iY1)*100.0/(double)m_iScale * g_dPixelPerCm; - if(g_iShow==1) +// double dHight = 0; +// dHight = (m_iY2-m_iY1)*100.0/(double)m_iScale * g_dPixelPerCm; +// if(g_iShow==1) +// { +// //显示刻度 +// dHight = dHight+30; +// } +// if(dHight>32767) +// { +// dHight = 32767; +// } + + // 屏幕高度 + int iHeightOfScreen = 30000;//QApplication::desktop()->height(); + if(g_iHeight_MyCustom == 0) { - //显示刻度 - dHight = dHight+30; + iHeightOfScreen = 30000; } - if(dHight>32767) + else if(g_iHeight_MyCustom == 1) { - dHight = 32767; + iHeightOfScreen = g_WorkSpace_Height; + } + else + { + iHeightOfScreen = g_iHeight_MyCustom; } //-------------------- @@ -4456,26 +4527,12 @@ void MainWindowCurve::changeDepthForPrint() FormWell *widgetWell = (FormWell*)myWidget;//获得widget if(widgetWell) { - widgetWell->setRowHeight(dHight, progressBar, iSplit); + widgetWell->setRowHeight(iHeightOfScreen, progressBar, iSplit); } } } } - // 屏幕高度 - int iHeightOfScreen = 30000;//QApplication::desktop()->height(); - if(g_iHeight_MyCustom == 0) - { - iHeightOfScreen = 30000; - } - else if(g_iHeight_MyCustom == 1) - { - iHeightOfScreen = g_WorkSpace_Height; - } - else - { - iHeightOfScreen = g_iHeight_MyCustom; - } // //获取井well前2行的高度 int iTableSize_Head = 100 + m_nObjLayerH; diff --git a/logPlus/mainwindowcurve.h b/logPlus/mainwindowcurve.h index 9486b63..203a1de 100644 --- a/logPlus/mainwindowcurve.h +++ b/logPlus/mainwindowcurve.h @@ -91,7 +91,7 @@ public: int m_iScale=200; double m_iY1=-1000; double m_iY2=0; - + int m_iCurPage = 1;//当前页 public: //展示所有井 void DisplayWells(QJsonArray wellsArray); diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 1d97c6f..403a986 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -11910,6 +11910,25 @@ 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) +{ + if(m_strUuid==strUuid) + { + } + else + { + return; + } + //上移或下移 + QRect geoRect = geometry(); + // + double dDelta = value; //- upper + double dPercent = dDelta / (low-upper); + + setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height()); + return; +} + //自定义滚动条 void QMyCustomPlot::vertScrollBarChanged(QString strUuid, int value, int low, int upper) { @@ -11920,6 +11939,8 @@ void QMyCustomPlot::vertScrollBarChanged(QString strUuid, int value, int low, in { return; } + QRect geoRect = geometry(); + setGeometry(0, 0, geoRect.width(), geoRect.height()); // FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName); diff --git a/logPlus/qmycustomplot.h b/logPlus/qmycustomplot.h index 529b635..ae82630 100644 --- a/logPlus/qmycustomplot.h +++ b/logPlus/qmycustomplot.h @@ -408,6 +408,7 @@ 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 slot_replot(); From 3045e761fe6ddc80fda927f03efa598dcb167351 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 11:19:52 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/formdraw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index d69ac1c..64a7360 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -585,9 +585,9 @@ void FormDraw::DisplayLines(QJsonArray linesArray) DisplayType_One(lineObjInfo); } //中间 - sprintf(s,"加载中,共计%d条,正在加载第%d条..", iCount, id); + sprintf(s,"加载中,共计%d条,正在加载第%d条..", iCount, id+1); mDepthProgress.SetShowName(s); - mDepthProgress.SetDepth(id); + mDepthProgress.SetDepth(id+1); } } } From 90cecd6f40ad54e726e5412c37360abf51ab3293 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 11:40:30 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=85=B3=E8=81=94=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E4=BF=A1=E5=8F=B7=E6=A7=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/qmycustomplot.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 403a986..c8e9798 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -130,6 +130,7 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel //自定义滚动条 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_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString))); From 6c4f89f705b29f7cc55af71f9929da4adfd3a332 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 12:27:59 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=B7=B1=E5=BA=A6=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E4=BC=98=E5=8C=96=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CallManage/CallManage.h | 2 ++ logPlus/formline.cpp | 2 +- logPlus/mainwindowcurve.cpp | 16 +++++++--------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CallManage/CallManage.h b/CallManage/CallManage.h index 73b128a..67b6192 100644 --- a/CallManage/CallManage.h +++ b/CallManage/CallManage.h @@ -180,6 +180,8 @@ signals: void sig_vertScrollBarChanged_setGeometry(QString strUuid, int iNewValue, int low, int upper); //自定义滚动条 void sig_vertScrollBarChanged(QString strUuid, int iNewValue, int low, int upper); + //自定义滚动条(三图一表) + void sig_vertScrollBarChanged_santuyibiao(QString strUuid, int iNewValue, int low, int upper); //改变深度 void sig_changeDepth(QString strUuid, QString strSlfName, QString strWellName, int iY1, int iY2); diff --git a/logPlus/formline.cpp b/logPlus/formline.cpp index 7e4a77e..ffb4ed9 100644 --- a/logPlus/formline.cpp +++ b/logPlus/formline.cpp @@ -22,7 +22,7 @@ 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(QString, int, int, int)), this, SLOT(vertScrollBarChanged(QString, int, int, int))); + connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santuyibiao(QString, int, int, int)), this, SLOT(vertScrollBarChanged(QString, int, int, int))); } diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 6a80c51..d8d3798 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -117,6 +117,7 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) : ui->tableWidget_2->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); //隐藏垂直滚动条 //自定义滚动条 ui->verticalScrollBar->setRange(-m_iY2, -m_iY1); + ui->verticalScrollBar->setValue(-m_iY2); connect(ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vertScrollBarChanged(int))); connect(this, SIGNAL(sig_NewTrackChangeWidth(QString, double)), this, SLOT(s_NewTrackChangeWidth(QString, double))); @@ -259,17 +260,11 @@ void MainWindowCurve::vertScrollBarChanged(int value) { m_iCurPage = iNumShow; //通知界面重设范围 - emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, (iNumShow-1)*dScrollHeight_setGeometry, -m_iY1, -m_iY2); - -// // -// int iCurValue = dDelta - (iNumShow-1)*dScrollHeight; -// //通知界面重设范围 -// emit CallManage::getInstance()->sig_vertScrollBarChanged_setGeometry(m_strUuid, iCurValue, dScrollHeight, 0); + emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, value, -m_iY1, -m_iY2);//(iNumShow-1)*dScrollHeight_setGeometry } - //通知界面重设范围 - //emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, value, -m_iY1, -m_iY2); - + //通知界面重设范围(三图一表) + emit CallManage::getInstance()->sig_vertScrollBarChanged_santuyibiao(m_strUuid, value, -m_iY1, -m_iY2); } //初始化工具栏 @@ -2883,6 +2878,8 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, //ui->verticalScrollBar->setValue(newValue);//设置右侧滚动条 //通知界面重设范围 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); if(iLoop==iNum-1) { @@ -4392,6 +4389,7 @@ void MainWindowCurve::s_changeDepth(QString strUuid, QString strSlfName, QString m_iY2 = iY2; //自定义滚动条 ui->verticalScrollBar->setRange(-m_iY2, -m_iY1); + ui->verticalScrollBar->setValue(-m_iY2); double dHight = 0; dHight = (m_iY2-m_iY1)*100.0/(double)m_iScale * g_dPixelPerCm; From bbc6e19ec109f07b1578b13208c6d7e78b526871 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 14:23:49 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=9C=80?= =?UTF-8?q?=E9=A1=B6=E7=AB=AF=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index d8d3798..8d611a9 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -260,8 +260,17 @@ void MainWindowCurve::vertScrollBarChanged(int value) { m_iCurPage = iNumShow; //通知界面重设范围 - emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, value, -m_iY1, -m_iY2);//(iNumShow-1)*dScrollHeight_setGeometry + int 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; + emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, iCurValue, -m_iY1, -m_iY2);//(iNumShow-1)*dScrollHeight_setGeometry + } + //通知界面重设范围(三图一表) emit CallManage::getInstance()->sig_vertScrollBarChanged_santuyibiao(m_strUuid, value, -m_iY1, -m_iY2);