Merge pull request #1444 from pinkavaj/pi-depr5

Replace deprecated QWheelEvent functions
This commit is contained in:
Edouard Griffiths 2022-09-24 23:06:01 +02:00 committed by GitHub
commit b1e91e9dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -3674,7 +3674,7 @@ void GLSpectrum::channelMarkerMove(QWheelEvent *event, int mul)
continue;
}
if (m_channelMarkerStates[i]->m_rect.contains(event->pos()))
if (m_channelMarkerStates[i]->m_rect.contains(event->position()))
{
int freq = m_channelMarkerStates[i]->m_channelMarker->getCenterFrequency();

View File

@ -213,7 +213,7 @@ private:
QMatrix4x4 m_glMatrixDsbFreqScale;
QMatrix4x4 m_glMatrixHistogram;
QMatrix4x4 m_glMatrixDsbHistogram;
QRect m_rect;
QRectF m_rect;
ChannelMarkerState(ChannelMarker* channelMarker) :
m_channelMarker(channelMarker)

View File

@ -70,7 +70,7 @@ bool GraphicsViewZoom::eventFilter(QObject *object, QEvent *event)
QWheelEvent* wheelEvent = static_cast<QWheelEvent*>(event);
if (QApplication::keyboardModifiers() == m_modifiers)
{
if (wheelEvent->orientation() == Qt::Vertical)
if (wheelEvent->angleDelta().y() != 0)
{
double angle = wheelEvent->angleDelta().y();
double factor = qPow(m_zoomFactorBase, angle);

View File

@ -367,7 +367,7 @@ void ValueDial::mouseMoveEvent(QMouseEvent *event)
void ValueDial::wheelEvent(QWheelEvent *event)
{
int i;
i = (event->x() - 1) / m_digitWidth;
i = (event->position().x() - 1) / m_digitWidth;
if (m_text[i] != m_groupSeparator) {
m_hightlightedDigit = i;
@ -386,7 +386,7 @@ void ValueDial::wheelEvent(QWheelEvent *event)
if (m_animationState == 0)
{
if (event->delta() < 0)
if (event->angleDelta().y() < 0)
{
if (event->modifiers() & Qt::ShiftModifier) {
e *= 5;

View File

@ -414,7 +414,7 @@ void ValueDialZ::wheelEvent(QWheelEvent* event)
{
int i;
i = (event->x() - 1) / m_digitWidth;
i = (event->position().x() - 1) / m_digitWidth;
if ((m_text[i] != m_groupSeparator) && (m_text[i] != m_decSeparator)) {
m_hightlightedDigit = i;
@ -439,7 +439,7 @@ void ValueDialZ::wheelEvent(QWheelEvent* event)
{
qint64 e = findExponent(m_hightlightedDigit);
if(event->delta() < 0)
if(event->angleDelta().y() < 0)
{
if (event->modifiers() & Qt::ShiftModifier) {
e *= 5;