mirror of
https://github.com/JS8Call-improved/JS8Call-improved
synced 2026-08-13 17:47:36 -04:00
Eliminate changeFreq SIGNAL and SLOT macro usage
This commit is contained in:
parent
41eddc6e2e
commit
0961695fae
6 changed files with 21 additions and 27 deletions
11
plotter.cpp
11
plotter.cpp
|
|
@ -624,19 +624,16 @@ CPlotter::wheelEvent(QWheelEvent * event)
|
|||
return;
|
||||
}
|
||||
|
||||
int const dir = delta.y() > 0 ? 1 : -1;
|
||||
int newFreq = freq();
|
||||
int const dir = delta.y() > 0 ? 1 : -1;
|
||||
|
||||
if(event->modifiers() & Qt::ControlModifier)
|
||||
{
|
||||
newFreq += dir;
|
||||
emit changeFreq(freq() + dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
newFreq = newFreq / 10 * 10 + dir * 10;
|
||||
emit changeFreq(freq() / 10 * 10 + dir * 10);
|
||||
}
|
||||
|
||||
emit setFreq1(newFreq);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -659,7 +656,7 @@ CPlotter::mouseReleaseEvent(QMouseEvent * event)
|
|||
auto const x = std::clamp(static_cast<int>(event->position().x()), 0, m_w);
|
||||
auto const newFreq = static_cast<int>(freqFromX(x) + 0.5);
|
||||
|
||||
emit setFreq1(newFreq);
|
||||
emit changeFreq(newFreq);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue