Skip to content

Single-Click Spectrum/Waterfall Tuning (Configurable Click-to-Tune Behavior) #342

Description

@kxkayser

Single-Click Spectrum/Waterfall Tuning (Configurable Click-to-Tune Behavior)

Labels: enhancement, GUI, spectrum


What

Add a user-configurable option to tune the active slice to a frequency by
single-clicking anywhere on the spectrum or waterfall display. When enabled,
a single left-click on the panadapter immediately moves the slice VFO to the
clicked frequency (snapped to the current step size). The existing behavior —
where a click may pan/drag or requires a double-click to tune — would remain
available as the alternative mode.

The setting would live in Radio Setup → Display (or a right-click context
menu toggle on the spectrum) and persist via AppSettings across sessions.


Why

Operators migrating from Thetis (ANAN radios) or Hermes-Lite 2
software expect single-click-to-tune on the panadapter as the default
interaction model. In those clients, a single left-click immediately QSYs
to the clicked frequency — no modifier key, no double-click, no drag
required. This is the fastest possible way to chase DX or move to a spot
on the waterfall.

AetherSDR's current click behavior (step-snapped click-to-tune) may conflict
with left-click-drag panning on some builds or feel sluggish to operators
accustomed to the single-click paradigm. Making it explicitly configurable
closes the ergonomic gap for ANAN/Hermes-Lite users who are evaluating
AetherSDR as a cross-radio Linux client.


How Other Clients Do It

Thetis (OpenHPSDR — ANAN radios)

Thetis implements single left-click to tune on both the panadapter
spectrum and the waterfall. Clicking anywhere in either view immediately
centers the active VFO on the clicked frequency, snapped to the current
step size. There is no drag-to-pan with left button; panning is done with
right-click-drag or scroll. This makes one-click QSY the primary interaction.

Hermes-Lite 2 (quisk, PowerSDR-HPSDR)

quisk and its derivatives also use single-click-to-tune on the panadapter.
A click sets the RX frequency immediately; holding a modifier (Ctrl) may
place a second VFO or perform another action.

SmartSDR for Windows (reference client)

SmartSDR uses single left-click on the panadapter to tune the active
slice. The slice center-line snaps to the clicked frequency. This is the
behavior AetherSDR is ultimately aiming to replicate.

SDR# / SDR++

Both use single left-click on the spectrum to set the demodulator frequency.
Right-click or scroll pans the view.


Suggested Behavior

New setting

AppSettings key: "SpectrumSingleClickTune"
Type: bool ("True" / "False")
Default: "True"   ← align with SmartSDR and Thetis out of the box

When SpectrumSingleClickTune = True

  1. User single left-clicks anywhere on the SpectrumWidget (FFT pane
    or waterfall pane).
  2. AetherSDR converts the pixel X-coordinate to a frequency using the current
    panadapter center and bandwidth.
  3. The result is snapped to the active slice's current step size (same logic
    already used by scroll-wheel tuning).
  4. A slice set <id> RF_frequency=<freq> command is sent immediately.
  5. The slice marker and VFO display update as the radio echoes the status back.
  6. No drag threshold — the tune fires on mouseReleaseEvent if the mouse
    has not moved more than ~4 px (to avoid eating the start of a drag-to-pan
    gesture).

When SpectrumSingleClickTune = False

Behavior reverts to whatever the pre-existing click handling does (double-click
to tune, or click-only tunes after a short delay). This preserves the workflow
for users who prefer click-to-pan.

UI surface

  • Radio Setup → Display tab: checkbox labeled
    ☑ Single-click spectrum/waterfall to tune
    with a short tooltip: "Click anywhere on the panadapter to QSY the active
    slice. Disable if you prefer click-to-pan."
  • Alternatively (or additionally): right-click context menu on the spectrum
    (SpectrumOverlayMenu) could offer a "Click tunes / Click pans" toggle
    for quick access without opening the setup dialog.

Multi-slice behavior

If multiple slices are visible in the same panadapter, single-click should tune
whichever slice is currently TX-assigned (or the primary/active slice),
consistent with how scroll-wheel tuning behaves today. It should not
accidentally switch the active slice — that interaction belongs to clicking a
slice marker badge.


Protocol Hints

Frequency set command (already used by SpectrumWidget scroll and
FrequencyDial):

C<seq>|slice set <slice_id> RF_frequency=<freq_in_MHz>

Example:

C42|slice set 0 RF_frequency=14.225000

The radio echoes back:

S<handle>|slice 0 RF_frequency=14.225000 ...

SliceModel::setFrequency() → emits commandReady(cmd)RadioModel sends
via TCP. No new protocol work needed; this is purely a SpectrumWidget
input-handling change wired through the existing SliceModel setter.

Implementation note: The pixel-to-frequency conversion already exists in
SpectrumWidget for the click-to-tune and scroll-to-tune paths. The only
change required is:

  1. Add the AppSettings key and a getter.
  2. In SpectrumWidget::mouseReleaseEvent(), check the setting and fire the
    tune if the mouse hasn't drifted beyond the drag threshold.
  3. Add the checkbox to RadioSetupDialog (Display tab).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions