diff options
| author | Calvin Morrison <calvin@pobox.com> | 2026-05-15 10:10:04 -0400 |
|---|---|---|
| committer | Calvin Morrison <calvin@pobox.com> | 2026-05-15 10:10:04 -0400 |
| commit | e776bc768cf9afca1867200e25d64d315cd72a3e (patch) | |
| tree | 6745527b939c9d37147d7dc98e8664437ee433f6 /src/ui/devicewidget.h | |
| parent | 4e602e78cdfc210ab7781668df2a88afb923258b (diff) | |
Full mixer implementation — tray, popup, prefs, devices tab with port indicators
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 <noreply@anthropic.com>
Diffstat (limited to 'src/ui/devicewidget.h')
| -rw-r--r-- | src/ui/devicewidget.h | 55 |
1 files changed, 44 insertions, 11 deletions
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 <tqwidget.h> #include <tqstring.h> +#include <tqpixmap.h> +#include <tqptrlist.h> 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<AudioDevice> m_moveTargets; // populated by context menu build }; |
