From e776bc768cf9afca1867200e25d64d315cd72a3e Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Fri, 15 May 2026 10:10:04 -0400 Subject: Full mixer implementation — tray, popup, prefs, devices tab with port indicators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the complete tmix feature set built since the initial skeleton: balance knob, level meters, KLed mute button, system tray with scroll-wheel volume and recording indicator, tray popup, preferences dialog, right-click context menus, single-instance enforcement, scroll area, window geometry persistence, and Devices tab with PA card profile switcher and live port availability indicators (2-column layout, in-place updates on plug/unplug). Co-Authored-By: Claude Sonnet 4.6 --- src/ui/devicewidget.h | 55 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 11 deletions(-) (limited to 'src/ui/devicewidget.h') diff --git a/src/ui/devicewidget.h b/src/ui/devicewidget.h index 4a6cead..a5532bf 100644 --- a/src/ui/devicewidget.h +++ b/src/ui/devicewidget.h @@ -2,33 +2,66 @@ #include #include +#include +#include class AudioDevice; +class PulseModel; +class KLed; +class KLedButton; +class LevelMeter; class TQSlider; -class TQToolButton; +class BalanceKnob; class TQLabel; -class TQVBoxLayout; +class TQRadioButton; +class TQContextMenuEvent; +class TQFrame; class DeviceWidget : public TQWidget { TQ_OBJECT public: - DeviceWidget( AudioDevice *device, TQWidget *parent = 0 ); + DeviceWidget( AudioDevice *device, PulseModel *model, TQWidget *parent = 0 ); ~DeviceWidget() {} AudioDevice *device() const { return m_device; } + LevelMeter *levelMeter() const { return m_levelMeter; } + void setSeparatorVisible( bool v ); + +protected: + void contextMenuEvent( TQContextMenuEvent *e ); private slots: - void onVolumeChanged( int v ); // slider → device - void onMuteToggled(); // button → device - void onDeviceVolume( int v ); // device → slider - void onDeviceMute( bool m ); // device → button + void onVolumeChanged( int v ); + void onBalanceChanged( int v ); + void onMuteClicked(); + void onToggleMute(); + void onSetDefault(); + void onDefaultClicked(); + void onMoveToSink( int id ); + void onDefaultChanged( AudioDevice *dev ); + void onRecordingActive( bool active ); + + void onDeviceVolume( int v ); + void onDeviceMute( bool m ); + void onDevicePan( int p ); + void onDeviceLevel( float level ); void onDeviceName( const TQString &name ); private: - AudioDevice *m_device; - TQSlider *m_slider; - TQToolButton *m_muteButton; - TQLabel *m_label; + AudioDevice *m_device; + PulseModel *m_model; + TQFrame *m_sep; + TQSlider *m_volSlider; + BalanceKnob *m_balanceDial; + KLedButton *m_muteLed; + KLed *m_recordingLed; // null unless Input + TQRadioButton *m_defaultBtn; // null for Playback/Recording + TQLabel *m_volLabel; + LevelMeter *m_levelMeter; + TQWidget *m_label; + TQLabel *m_iconLabel; + + TQPtrList m_moveTargets; // populated by context menu build }; -- cgit v1.2.3