diff options
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; }; |
