Skip to content

feat(cw): reusable RangeSlider widget; replace Lo/Hi pitch sliders; add WPM range control #3331

@K5PTB

Description

@K5PTB

What and why

The CW toolbar's pitch control uses two separate "Lo:" / "Hi:" sliders with manual clamp logic to prevent them crossing. There is no way for the user to set a WPM search range at all — ggmorse searches a fixed set of speeds determined by its internal downsample step.

This PR addresses both with a new reusable widget.

New reusable widget — RangeSlider

src/gui/RangeSlider.h/.cpp is a standalone Qt double-ended slider widget with no external dependencies. It may be useful beyond the CW panel wherever a bounded range needs to be set interactively (e.g. filter passband, frequency scan range, AGC thresholds).

API:

// Constructor
RangeSlider(int min, int max, int low, int high,
            const QString& label, const QString& unit,
            QWidget* parent = nullptr);

// Signal
void rangeChanged(int low, int high);

// Slots
void setLow(int);
void setHigh(int);
void setRange(int low, int high);

The label parameter is rendered as a dim prefix inside the widget's left margin — no separate QLabel needed in the toolbar layout.

CW toolbar changes

  • Pitch: replaces the two-slider Lo/Hi pair with a single RangeSlider (300–1200 Hz, default 500–700 Hz)
  • WPM: adds a new RangeSlider (5–60 WPM, default 15–40 WPM) — this control did not previously exist
  • ggmorse speed search: ds reduced from 10 → 2, so every 2 WPM in the configured range is tested (previously 5, 15, 25 … missed 10, 20, 30, 40, 50 entirely)

Implementation

Draft PR: #3330

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    CWCW keying, decode, and operationGUIUser interfaceenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is taken

    Type

    No type
    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