You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split the single CatApplet (shown as [DIGI] button in the applet panel) into four independent applets — [CAT], [DAX], [TCI], [IQ] — each with the standard applet affordances:
Drag-handle title bar matching other applets
Pop-out / re-dock via FloatingAppletWindow
Reorder via drag in the applet stack
Toggle button in the top button bar (row 2)
Current architecture
src/gui/CatApplet.cpp (674 lines) contains four stacked sections:
CAT Control (lines 78–196) — rigctld TCP port/status/enable + PTY device list + Flex Serial
TCI Server (lines 197–361) — port, client count, enable toggle
DAX IQ (lines 362–430) — IQ channel dropdown + enable
Registered at AppletPanel.cpp:650-651 as the sole "DIGI" entry in btnRow2. Registration framework (makeEntry) already supports title bar + wrapper + button + persistence.
src/gui/TciApplet.{h,cpp} — TCI section (redesigned to mirror DAX framework)
src/gui/DaxIqApplet.{h,cpp} — DAX IQ section
Delete src/gui/CatApplet.{h,cpp} after migration.
TCI applet redesign (mirrors DAX framework)
Current TCI section is just port + clients + enable. Target design matches the DAX applet's visual pattern:
TCI Server
RX1: [meter──slider]
RX2: [meter──slider]
RX3: [meter──slider]
RX4: [meter──slider]
TX: [meter──slider]
Port: [50001] Clients: N [Enable]
Each meter uses MeterSlider (same widget DAX uses). The slider positions per-channel gain (new concept — TCI doesn't currently gate per-channel). Four TCI RX channels map to DAX channels 1-4 routed to TCI clients. TX meter reflects WSJT-X's TCI TX audio level.
New backing needed:
TciServer gains per-channel gain slots (QHash<int, float> m_rxChannelGain) applied in onDaxAudioReady before resampling.
TX gain already exists (m_txGain from DaxTxGain setting) — rename setting to TciTxGain for clarity, migrate from old key. (Separate from DAX bridge's own gain so toggling DAX doesn't surprise TCI users.)
Per-channel RMS/peak already available in the DAX ready signal; just route to the per-channel meter.
Step-by-step
Phase 1 — Scaffolding (zero behavior change)
Create CatControlApplet.{h,cpp} by copying the CAT Control section's buildUI + wiring from CatApplet lines 78-196. Public API:
void setRigctlServers(RigctlServer**, int count)
void setRigctlPtys(RigctlPty**, int count)
signal void tcpEnabledChanged(bool) / ptyEnabledChanged(bool)
Create DaxApplet.{h,cpp} copying DAX section. Public API:
Update kDefaultOrder: replace "DIGI" with "CAT", "DAX", "TCI", "IQ" in the right slot.
Remove CatApplet forward decl + member from AppletPanel.{h,cpp}. Add four new forward decls + members + accessors (catControlApplet(), daxApplet(), tciApplet(), daxIqApplet()).
Phase 3 — MainWindow wiring
Every place MainWindow calls m_appletPanel->catApplet()->setXxx() needs splitting. Grep shows ~8 call sites — replace each with the matching applet accessor.
Audit signals: daxEnabledChanged, tciEnabledChanged, daxTxGainChanged, etc. — rewire from the correct new applet.
Phase 4 — Per-channel TCI gain (new feature backing)
TciServer::setRxChannelGain(int channel, float gain) — stores in m_rxChannelGain.
In onDaxAudioReady, multiply the incoming DAX audio by the gain for that channel before accumulation.
Emit per-channel RMS level via a new signal tciRxLevel(int channel, float rms) → TCI applet's meter.
Rename DaxTxGain → TciTxGain in TciServer (was reused from DAX setting by [tci] Fix TCI TX timing for WSJT-X #1624). Keep DAX's setting for the DAX bridge. Migrate stored value on first load to avoid user surprise.
Phase 5 — Settings migration
Old Applet_DIGI visibility key → migrate to Applet_CAT (and leave the others at default off). On first run after upgrade, if user had DIGI visible, enable all four; if they had it hidden, all four stay hidden.
Old DaxTxGain continues to drive the DAX bridge (unchanged). New TciTxGain defaults to same value on first load.
Phase 6 — Cleanup
Delete CatApplet.{h,cpp}.
Update CMakeLists.txt — remove CatApplet, add the four new sources.
Update includes across the codebase.
Risk areas
Existing single DAX/TCI control coupling — the enable toggle for CAT currently controls both rigctld (TCP) and PTY. Splitting requires that the new CatControlApplet retains that dual-responsibility.
Layout height — four separate applets with their own title bars will consume more vertical space than the combined DIGI applet. Recommend default all four hidden (user opts in from the button bar) matching the current DIGI default.
DaxTxGain rename — any user depending on the shared setting between DAX bridge and TCI will see a one-time behavior change. Migration code preserves the value but splits it into two independent settings going forward.
Signal wiring churn — every connection in MainWindow that used m_appletPanel->catApplet() needs a source update. Mechanical but easy to miss one.
Button bar row 2 crowding — btnRow2 currently has ~5 buttons (LCK, DIGI, MTR, AG, plus…). Adding 3 more may overflow. Verify visual layout.
Effort estimate
Phase 1 scaffolding: 45 min
Phase 2 registration: 15 min
Phase 3 wiring: 30 min
Phase 4 TCI per-channel gain: 45 min
Phase 5 migration: 15 min
Phase 6 cleanup: 15 min
Total: ~2.5 hrs plus a test pass on CAT connections, DAX audio, TCI multi-channel, DAX IQ each independently.
Commit strategy
One commit per phase for clean history and easy bisect.
Goal
Split the single CatApplet (shown as [DIGI] button in the applet panel) into four independent applets — [CAT], [DAX], [TCI], [IQ] — each with the standard applet affordances:
FloatingAppletWindowCurrent architecture
src/gui/CatApplet.cpp(674 lines) contains four stacked sections:Registered at
AppletPanel.cpp:650-651as the sole "DIGI" entry in btnRow2. Registration framework (makeEntry) already supports title bar + wrapper + button + persistence.Target file layout
New files:
src/gui/CatControlApplet.{h,cpp}— CAT Control section (rigctld + PTY + Flex Serial)src/gui/DaxApplet.{h,cpp}— DAX section (RX meters, TX meter, enable)src/gui/TciApplet.{h,cpp}— TCI section (redesigned to mirror DAX framework)src/gui/DaxIqApplet.{h,cpp}— DAX IQ sectionDelete
src/gui/CatApplet.{h,cpp}after migration.TCI applet redesign (mirrors DAX framework)
Current TCI section is just port + clients + enable. Target design matches the DAX applet's visual pattern:
Each meter uses
MeterSlider(same widget DAX uses). The slider positions per-channel gain (new concept — TCI doesn't currently gate per-channel). Four TCI RX channels map to DAX channels 1-4 routed to TCI clients. TX meter reflects WSJT-X's TCI TX audio level.New backing needed:
TciServergains per-channel gain slots (QHash<int, float> m_rxChannelGain) applied inonDaxAudioReadybefore resampling.m_txGainfromDaxTxGainsetting) — rename setting toTciTxGainfor clarity, migrate from old key. (Separate from DAX bridge's own gain so toggling DAX doesn't surprise TCI users.)Step-by-step
Phase 1 — Scaffolding (zero behavior change)
CatControlApplet.{h,cpp}by copying the CAT Control section's buildUI + wiring from CatApplet lines 78-196. Public API:void setRigctlServers(RigctlServer**, int count)void setRigctlPtys(RigctlPty**, int count)void tcpEnabledChanged(bool)/ptyEnabledChanged(bool)DaxApplet.{h,cpp}copying DAX section. Public API:void setDaxRxLevel(int channel, float rms)/setDaxTxLevel(float rms)void daxTxGainChanged(float)/daxEnabledChanged(bool)TciApplet.{h,cpp}— new design. Public API:void setTciServer(TciServer*)void setTciEnabled(bool)/updateTciStatus()void setTciRxLevel(int channel, float rms)(NEW)void setTciTxLevel(float rms)(NEW)void tciEnabledChanged(bool)/tciRxGainChanged(int ch, float)/tciTxGainChanged(float)DaxIqApplet.{h,cpp}copying DAX IQ section. Public API:void syncDaxIqChannel(int channel)/setDaxIqEnabled(bool)/setDaxIqLevel(int channel, float rms)Phase 2 — Registration
In
AppletPanel.cpp:650-651, replace the single DIGI entry with four:Update
kDefaultOrder: replace"DIGI"with"CAT", "DAX", "TCI", "IQ"in the right slot.Remove CatApplet forward decl + member from AppletPanel.{h,cpp}. Add four new forward decls + members + accessors (
catControlApplet(),daxApplet(),tciApplet(),daxIqApplet()).Phase 3 — MainWindow wiring
m_appletPanel->catApplet()->setXxx()needs splitting. Grep shows ~8 call sites — replace each with the matching applet accessor.daxEnabledChanged,tciEnabledChanged,daxTxGainChanged, etc. — rewire from the correct new applet.Phase 4 — Per-channel TCI gain (new feature backing)
TciServer::setRxChannelGain(int channel, float gain)— stores inm_rxChannelGain.onDaxAudioReady, multiply the incoming DAX audio by the gain for that channel before accumulation.tciRxLevel(int channel, float rms)→ TCI applet's meter.DaxTxGain→TciTxGainin TciServer (was reused from DAX setting by [tci] Fix TCI TX timing for WSJT-X #1624). Keep DAX's setting for the DAX bridge. Migrate stored value on first load to avoid user surprise.Phase 5 — Settings migration
Applet_DIGIvisibility key → migrate toApplet_CAT(and leave the others at default off). On first run after upgrade, if user had DIGI visible, enable all four; if they had it hidden, all four stay hidden.DaxTxGaincontinues to drive the DAX bridge (unchanged). NewTciTxGaindefaults to same value on first load.Phase 6 — Cleanup
CatApplet.{h,cpp}.CMakeLists.txt— remove CatApplet, add the four new sources.Risk areas
m_appletPanel->catApplet()needs a source update. Mechanical but easy to miss one.Effort estimate
Commit strategy
One commit per phase for clean history and easy bisect.