summaryrefslogtreecommitdiff
path: root/src/ui/mixerwindow.h
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@pobox.com>2026-05-12 21:32:53 -0400
committerCalvin Morrison <calvin@pobox.com>2026-05-12 21:32:53 -0400
commitf6f7c36909fa161efe53c40e9b4c34856e751536 (patch)
treeeff44527b0be61eb2e19c9f483ed38b72879af11 /src/ui/mixerwindow.h
Initial tmix skeleton — model layer + basic UI
PulseModel: stable PulseDevice objects keyed by PA index, updated in-place via postEvent reconciliation. No bulk rebuilds. Three signals: deviceAdded, deviceRemoved (device changed handled per-device via volumeChanged/muteChanged/nameChanged). MixerWindow: four-tab layout (Output/Input/Playback/Recording), adds and removes individual DeviceWidgets in response to model signals. Builds and links cleanly against TQt3/TDE + libpulse. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/ui/mixerwindow.h')
-rw-r--r--src/ui/mixerwindow.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/ui/mixerwindow.h b/src/ui/mixerwindow.h
new file mode 100644
index 0000000..f6b7be8
--- /dev/null
+++ b/src/ui/mixerwindow.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include <tqwidget.h>
+#include <tqmap.h>
+
+#include "../model/audiodevice.h"
+
+class PulseModel;
+class KTabWidget;
+class TQHBoxLayout;
+
+class MixerWindow : public TQWidget
+{
+ TQ_OBJECT
+
+public:
+ explicit MixerWindow( PulseModel *model, TQWidget *parent = 0 );
+ ~MixerWindow() {}
+
+private slots:
+ void onDeviceAdded( AudioDevice *dev );
+ void onDeviceRemoved( AudioDevice *dev );
+
+public:
+ struct Tab {
+ TQWidget *page;
+ TQHBoxLayout *layout;
+ };
+
+private:
+
+ Tab &tabForCategory( AudioDevice::Category cat );
+
+ PulseModel *m_model;
+ KTabWidget *m_tabs;
+
+ Tab m_output;
+ Tab m_input;
+ Tab m_playback;
+ Tab m_recording;
+
+ TQMap<AudioDevice*, TQWidget*> m_widgets;
+};