diff options
| author | Calvin Morrison <calvin@pobox.com> | 2026-05-15 15:02:25 -0400 |
|---|---|---|
| committer | Calvin Morrison <calvin@pobox.com> | 2026-05-15 15:02:25 -0400 |
| commit | e0c8fb0cdcb9c95e3efa60322c1733df0a965650 (patch) | |
| tree | fac3f3dfd2b7d0c0e4e854387be91117088288af /src/ui/tmixpopup.h | |
| parent | e776bc768cf9afca1867200e25d64d315cd72a3e (diff) | |
Recording popup, level meters, UX polish
- Recording tray icon opens popup (mics + active recording streams)
- Recording stream level meters forward from parent source signal
- RecordingTray subclass for single-click (no double-click needed)
- Context menu Set Default Output/Input shows checkmark when active
- Last DeviceWidget in each row hides its right separator
- Popup horizontal layout, configurable content (output/mic/apps)
- Single-click tray, right-click menu for Open Mixer
- Desktop file, icon, CMake install rules
- Window bring-to-front across workspaces (KWin::forceActiveWindow)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/ui/tmixpopup.h')
| -rw-r--r-- | src/ui/tmixpopup.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/ui/tmixpopup.h b/src/ui/tmixpopup.h index 4dbdc9a..527f7f7 100644 --- a/src/ui/tmixpopup.h +++ b/src/ui/tmixpopup.h @@ -2,41 +2,46 @@ #include <tqwidget.h> #include <tqdatetime.h> +#include <tqptrlist.h> class PulseModel; class AudioDevice; class DeviceWidget; +class TQHBoxLayout; class TQVBoxLayout; -class TQPushButton; class TmixPopup : public TQWidget { TQ_OBJECT public: - explicit TmixPopup( PulseModel *model, TQWidget *parent = 0 ); + TmixPopup( PulseModel *model, + bool showOutput, bool showMic, bool showApps, + bool showRecording = false, + TQWidget *parent = 0 ); - // Position relative to tray icon and show, or hide if already visible. void toggleAt( const TQPoint &trayGlobalPos, const TQSize &traySize ); - - // True for ~300ms after hiding — prevents re-show on the same click. bool justHidden() const; -signals: - void showMixerRequested(); - protected: void hideEvent( TQHideEvent *e ); void wheelEvent( TQWheelEvent *e ); private slots: void onDefaultOutputChanged( AudioDevice *dev ); + void onDeviceAdded( AudioDevice *dev ); + void onDeviceRemoved( AudioDevice *dev ); private: - void setDevice( AudioDevice *dev ); - - PulseModel *m_model; - DeviceWidget *m_devWidget; - TQVBoxLayout *m_layout; - TQTime m_hideTime; + void rebuild(); + + PulseModel *m_model; + bool m_showOutput; + bool m_showMic; + bool m_showApps; + bool m_showRecording; + TQVBoxLayout *m_outerLayout; + TQWidget *m_devContainer; + TQPtrList<DeviceWidget> m_devWidgets; + TQTime m_hideTime; }; |
