滚动条拖动精度问题改double类型

This commit is contained in:
DESKTOP-450PEFP\mainc 2026-05-27 17:05:04 +08:00
parent 17b67709cd
commit a4be42a4db
7 changed files with 16 additions and 12 deletions

View File

@ -187,7 +187,7 @@ signals:
void sig_changeScale(QString strUuid, int iNewScale);
//自定义滚动条
void sig_vertScrollBarChanged_setGeometry(QString strUuid, double iNewValue, double low, double upper, int ndepth);
void sig_vertScrollBarChanged_setGeometry(QString strUuid, double iNewValue, double low, double upper, double ndepth);
//自定义滚动条
void sig_vertScrollBarChanged(QString strUuid, double iNewValue, double low, double upper);
//自定义滚动条(三图一表)

View File

@ -32,7 +32,7 @@ FormImage::FormImage(QWidget *parent, QString strSlfName, QString strWellName, Q
//打印
//connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santu_Print(QString, int, int)), this, SLOT(vertScrollBarChanged_Print(QString, 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, int)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, int)));
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, double)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, double)));
connect(CallManage::getInstance(), SIGNAL(sig_ResizeDepth(QString, int, float)), this, SLOT(s_ResizeDepth(QString, int, float)));
//黑白图
connect(CallManage::getInstance(), SIGNAL(sig_changeBlack(QString, bool)), this, SLOT(s_changeBlack(QString, bool)));
@ -338,7 +338,7 @@ void FormImage::vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeigh
setGeometry(0, -dDelta, geoRect.width(), geoRect.height());
}
void FormImage::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth)
void FormImage::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth)
{
if (m_strUuid == strUuid)
{
@ -347,7 +347,7 @@ void FormImage::vertScrollBarChanged_setGeometry(QString strUuid, double value,
{
return;
}
m_fTopY = ndepth;
m_fTopY = ddepth;
update();
}

View File

@ -108,7 +108,7 @@ public slots:
//滚动条
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
void vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen);
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth);
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth);
};
#endif // FormImage_H

View File

@ -48,7 +48,7 @@ FormWave::FormWave(QWidget *parent, QString strSlfName, QString strWellName, QSt
//打印
//connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santu_Print(QString, int, int)), this, SLOT(vertScrollBarChanged_Print(QString, 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, int)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, int)));
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, double)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, double)));
connect(CallManage::getInstance(), SIGNAL(sig_ResizeDepth(QString, int, float)), this, SLOT(s_ResizeDepth(QString, int, float)));
//黑白图
connect(CallManage::getInstance(), SIGNAL(sig_changeBlack(QString, bool)), this, SLOT(s_changeBlack(QString, bool)));
@ -92,6 +92,7 @@ void FormWave::setDepthY(float fy1, float fy2)
m_PlotSdep = qAbs(this->m_iY2);
m_fTopY = m_PlotSdep;
qDebug() << " 111###### m_fTopY " << m_fTopY;
}
void FormWave::updateDepthY(float fy1, float fy2)
@ -100,6 +101,7 @@ void FormWave::updateDepthY(float fy1, float fy2)
this->m_iY2 = fy2;
m_fTopY = qAbs(this->m_iY2);
update();
qDebug() << " 222###### m_fTopY " << m_fTopY;
}
bool FormWave::LoadFromSLF_wave()
@ -374,6 +376,7 @@ void FormWave::vertScrollBarChanged(QString strUuid, double value, double low, d
return;
}
m_fTopY = value;
qDebug() << " 333###### m_fTopY " << m_fTopY;
update();
}
@ -394,7 +397,7 @@ void FormWave::vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeight
setGeometry(0, -dDelta, geoRect.width(), geoRect.height());
}
void FormWave::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth)
void FormWave::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth)
{
if (m_strUuid == strUuid)
{
@ -403,7 +406,8 @@ void FormWave::vertScrollBarChanged_setGeometry(QString strUuid, double value, d
{
return;
}
m_fTopY = ndepth;
m_fTopY = ddepth;
qDebug() << " 444###### m_fTopY " << m_fTopY;
update();
}

View File

@ -111,7 +111,7 @@ public slots:
//滚动条
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
void vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen);
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth);
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth);
};
#endif // FormWave_H

View File

@ -144,7 +144,7 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
//自定义滚动条
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, int)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, int)));
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, double)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, double)));
connect(CallManage::getInstance(), SIGNAL(sig_ResizeHeight(QString, int)), this, SLOT(s_ResizeHeight(QString, int)));
@ -12257,7 +12257,7 @@ void QMyCustomPlot::addQCPItemLine(QMyCustomPlot *widget, float cx, float cy, co
pLine->setPoints(myPolygon);
}
void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth)
void QMyCustomPlot::vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth)
{
if(m_strUuid==strUuid)
{

View File

@ -390,7 +390,7 @@ public slots:
void slot_time();
//自定义滚动条
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, int ndepth);
void vertScrollBarChanged_setGeometry(QString strUuid, double value, double low, double upper, double ddepth);
void s_ResizeHeight(QString strUuid, int nPixVal);
//信号槽刷新