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/mixerwindow.h | 51 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) (limited to 'src/ui/mixerwindow.h') diff --git a/src/ui/mixerwindow.h b/src/ui/mixerwindow.h index f6b7be8..c472246 100644 --- a/src/ui/mixerwindow.h +++ b/src/ui/mixerwindow.h @@ -1,15 +1,19 @@ #pragma once -#include #include +#include #include "../model/audiodevice.h" class PulseModel; class KTabWidget; class TQHBoxLayout; +class TQWidgetStack; +class TQToolButton; +class DevicesPage; +class TQResizeEvent; -class MixerWindow : public TQWidget +class MixerWindow : public TDEMainWindow { TQ_OBJECT @@ -17,22 +21,49 @@ public: explicit MixerWindow( PulseModel *model, TQWidget *parent = 0 ); ~MixerWindow() {} -private slots: - void onDeviceAdded( AudioDevice *dev ); - void onDeviceRemoved( AudioDevice *dev ); - -public: struct Tab { + TQWidget *scroll; TQWidget *page; TQHBoxLayout *layout; + int count; }; -private: +protected: + bool queryClose(); + bool eventFilter( TQObject *obj, TQEvent *e ); + void showEvent( TQShowEvent *e ); +private slots: + void onDeviceAdded( AudioDevice *dev ); + void onDeviceRemoved( AudioDevice *dev ); + void onDefaultOutputChanged( AudioDevice *dev ); + void showAbout(); + void showPreferences(); + void applySettings(); + void quit(); + void onAppAboutToQuit(); + void toggleDevices(); + +private: Tab &tabForCategory( AudioDevice::Category cat ); + void rebuildView(); + void updateDevicesButton(); + void repositionDevicesBtn(); - PulseModel *m_model; - KTabWidget *m_tabs; + PulseModel *m_model; + KTabWidget *m_tabs; + class PreferencesDlg *m_prefsDlg; + TQWidgetStack *m_outerStack; + TQWidgetStack *m_stack; + TQWidget *m_allPage; + TQWidget *m_allStrip; + TQHBoxLayout *m_allLayout; + int m_allCount; + class TmixTray *m_tray; + TQToolButton *m_devicesBtn; + DevicesPage *m_devicesPage; + bool m_devicesInTabs; // true = DevicesPage is a tab in m_tabs + bool m_quitting; Tab m_output; Tab m_input; -- cgit v1.2.3