Skip to content

Conversation

@aa5sh
Copy link

@aa5sh aa5sh commented Dec 23, 2025

Introduces the TunableLabel custom widget, enabling mouse wheel and click-based frequency adjustments in RigWidget. RigWidget now uses TunableLabel for freqLabel, handling tuneDeltaRequested signals to update frequency interactively. UI and project files updated to register and use the new component.

Introduces the TunableLabel custom widget, enabling mouse wheel and click-based frequency adjustments in RigWidget. RigWidget now uses TunableLabel for freqLabel, handling tuneDeltaRequested signals to update frequency interactively. UI and project files updated to register and use the new component.
@aa5sh
Copy link
Author

aa5sh commented Dec 23, 2025

A try at #855

Updated include statements for TunableLabel in RigWidget.cpp, RigWidget.h, and RigWidget.ui to use the correct path 'ui/component/TunableLabel.h'. This resolves issues with locating the header file and ensures proper integration of the custom widget.
Changed the header path for the TunableLabel custom widget to use lowercase 'tunablelabel.h' for consistency and to avoid potential case-sensitivity issues on some filesystems.
Changed the Hz to MHz conversion to use 1000000.0 instead of 1'000'000.0 for compatibility with compilers that do not support digit separators.
Updated the include statement to use the correct relative path for tunablelabel.h, ensuring proper compilation and consistency with project structure.
@foldynl
Copy link
Owner

foldynl commented Dec 23, 2025

Thanks. I also tried something similar but with already existing FreqQSpingBox. I tested your solution but it is behaving somewhat unpredictable to me. Maybe it’s my mouse but when I rotate the wheel the frequency changes -+ 0.6 kHz. When I use Ctrl or Shift, it changes by 3 kHz, and with Ctrl+Shift it changes by 15 kHz.

Is it possible that this is caused by my mouse, or what was the intended behavior? For my mouse, the pixel and angle variables in wheelEvent are QPoint(0, 120) or QPoint(0, -120).

Also, some of the comments in effectiveStepHz do not match the code. The multipliers are 5, 25, and 125.

@aa5sh
Copy link
Author

aa5sh commented Dec 23, 2025

I was working on this with my laptop/trackpad and it was acting different than with my mouse. Sorry should have tested it there. I see on my mouse it takes a bit before it changes. I had the multipliers to try and follow what was in that request 1 then 500 then 2500. I'll spend some more time on it tonight.

@foldynl
Copy link
Owner

foldynl commented Dec 23, 2025

Michael, no problem. I'm using a very cheap HP mouse, so it's possible that it makes larger/smaller steps. I haven't tested the trackpad.

@foldynl
Copy link
Owner

foldynl commented Dec 23, 2025

not-tested my variant:
RigWidgetFreqMouse.patch

@aa5sh
Copy link
Author

aa5sh commented Dec 24, 2025

not-tested my variant: RigWidgetFreqMouse.patch

Your patch works more consistently than mine. had to make one change. I know HamLib wants the frequency in Hz. I can cancel this PR since you already had a good solution.

Rig::instance()->setFrequency(ui->freqLabel->value()*1000000);

@aa5sh aa5sh closed this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants