+class VolumeClickHandler : public QObject
+{
+public:
+ VolumeClickHandler( intf_thread_t *_p_intf, ControlsWidget *_m ) :QObject(_m)
+ {m = _m; p_intf = _p_intf; }
+ virtual ~VolumeClickHandler() {};
+ bool eventFilter( QObject *obj, QEvent *e )
+ {
+ if (e->type() == QEvent::MouseButtonPress )
+ {
+ aout_VolumeMute( p_intf, NULL );
+ audio_volume_t i_volume;
+ aout_VolumeGet( p_intf, &i_volume );
+ m->updateVolume( i_volume * VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
+ return true;
+ }
+ return false;
+ }
+private:
+ ControlsWidget *m;
+ intf_thread_t *p_intf;
+};
+
+#include <QLabel>
+#include <QMouseEvent>
+class TimeLabel : public QLabel
+{
+ Q_OBJECT
+ void mousePressEvent( QMouseEvent *event )
+ {
+ emit timeLabelClicked();
+ }
+ void mouseDoubleClickEvent( QMouseEvent *event )
+ {
+ emit timeLabelDoubleClicked();
+ }
+signals:
+ void timeLabelClicked();
+ void timeLabelDoubleClicked();
+};