summaryrefslogtreecommitdiff
path: root/src/ui/tmixpopup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/tmixpopup.h')
-rw-r--r--src/ui/tmixpopup.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/ui/tmixpopup.h b/src/ui/tmixpopup.h
new file mode 100644
index 0000000..4dbdc9a
--- /dev/null
+++ b/src/ui/tmixpopup.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include <tqwidget.h>
+#include <tqdatetime.h>
+
+class PulseModel;
+class AudioDevice;
+class DeviceWidget;
+class TQVBoxLayout;
+class TQPushButton;
+
+class TmixPopup : public TQWidget
+{
+ TQ_OBJECT
+
+public:
+ explicit TmixPopup( PulseModel *model, 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 );
+
+private:
+ void setDevice( AudioDevice *dev );
+
+ PulseModel *m_model;
+ DeviceWidget *m_devWidget;
+ TQVBoxLayout *m_layout;
+ TQTime m_hideTime;
+};