mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-02 09:46:38 -04:00
Merge pull request #1444 from pinkavaj/pi-depr5
Replace deprecated QWheelEvent functions
This commit is contained in:
commit
b1e91e9dd2
@ -3674,7 +3674,7 @@ void GLSpectrum::channelMarkerMove(QWheelEvent *event, int mul)
|
|||||||
continue;
|
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();
|
int freq = m_channelMarkerStates[i]->m_channelMarker->getCenterFrequency();
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ private:
|
|||||||
QMatrix4x4 m_glMatrixDsbFreqScale;
|
QMatrix4x4 m_glMatrixDsbFreqScale;
|
||||||
QMatrix4x4 m_glMatrixHistogram;
|
QMatrix4x4 m_glMatrixHistogram;
|
||||||
QMatrix4x4 m_glMatrixDsbHistogram;
|
QMatrix4x4 m_glMatrixDsbHistogram;
|
||||||
QRect m_rect;
|
QRectF m_rect;
|
||||||
|
|
||||||
ChannelMarkerState(ChannelMarker* channelMarker) :
|
ChannelMarkerState(ChannelMarker* channelMarker) :
|
||||||
m_channelMarker(channelMarker)
|
m_channelMarker(channelMarker)
|
||||||
|
@ -70,7 +70,7 @@ bool GraphicsViewZoom::eventFilter(QObject *object, QEvent *event)
|
|||||||
QWheelEvent* wheelEvent = static_cast<QWheelEvent*>(event);
|
QWheelEvent* wheelEvent = static_cast<QWheelEvent*>(event);
|
||||||
if (QApplication::keyboardModifiers() == m_modifiers)
|
if (QApplication::keyboardModifiers() == m_modifiers)
|
||||||
{
|
{
|
||||||
if (wheelEvent->orientation() == Qt::Vertical)
|
if (wheelEvent->angleDelta().y() != 0)
|
||||||
{
|
{
|
||||||
double angle = wheelEvent->angleDelta().y();
|
double angle = wheelEvent->angleDelta().y();
|
||||||
double factor = qPow(m_zoomFactorBase, angle);
|
double factor = qPow(m_zoomFactorBase, angle);
|
||||||
|
@ -367,7 +367,7 @@ void ValueDial::mouseMoveEvent(QMouseEvent *event)
|
|||||||
void ValueDial::wheelEvent(QWheelEvent *event)
|
void ValueDial::wheelEvent(QWheelEvent *event)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
i = (event->x() - 1) / m_digitWidth;
|
i = (event->position().x() - 1) / m_digitWidth;
|
||||||
|
|
||||||
if (m_text[i] != m_groupSeparator) {
|
if (m_text[i] != m_groupSeparator) {
|
||||||
m_hightlightedDigit = i;
|
m_hightlightedDigit = i;
|
||||||
@ -386,7 +386,7 @@ void ValueDial::wheelEvent(QWheelEvent *event)
|
|||||||
|
|
||||||
if (m_animationState == 0)
|
if (m_animationState == 0)
|
||||||
{
|
{
|
||||||
if (event->delta() < 0)
|
if (event->angleDelta().y() < 0)
|
||||||
{
|
{
|
||||||
if (event->modifiers() & Qt::ShiftModifier) {
|
if (event->modifiers() & Qt::ShiftModifier) {
|
||||||
e *= 5;
|
e *= 5;
|
||||||
|
@ -414,7 +414,7 @@ void ValueDialZ::wheelEvent(QWheelEvent* event)
|
|||||||
{
|
{
|
||||||
int i;
|
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)) {
|
if ((m_text[i] != m_groupSeparator) && (m_text[i] != m_decSeparator)) {
|
||||||
m_hightlightedDigit = i;
|
m_hightlightedDigit = i;
|
||||||
@ -439,7 +439,7 @@ void ValueDialZ::wheelEvent(QWheelEvent* event)
|
|||||||
{
|
{
|
||||||
qint64 e = findExponent(m_hightlightedDigit);
|
qint64 e = findExponent(m_hightlightedDigit);
|
||||||
|
|
||||||
if(event->delta() < 0)
|
if(event->angleDelta().y() < 0)
|
||||||
{
|
{
|
||||||
if (event->modifiers() & Qt::ShiftModifier) {
|
if (event->modifiers() & Qt::ShiftModifier) {
|
||||||
e *= 5;
|
e *= 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user