- friend class MainInterface;
- friend class VolumeClickHandler;
-protected:
- intf_thread_t *p_intf;
- QWidget *discFrame;
- QWidget *telexFrame;
- QGridLayout *controlLayout;
- InputSlider *slider;
- QPushButton *prevSectionButton, *nextSectionButton, *menuButton;
- QPushButton *playButton, *fullscreenButton, *extSettingsButton;
- QPushButton *telexTransparent, *telexOn;
- QSpinBox *telexPage;
- QToolButton *slowerButton, *fasterButton;
- QHBoxLayout *controlButLayout;
- AdvControlsWidget *advControls;
- QLabel *volMuteLabel;
- QAbstractSlider *volumeSlider;
- VolumeClickHandler *hVolLabel;
-
- bool b_advancedVisible;
- bool b_telexTransparent;
- bool b_telexEnabled;
-protected slots:
- void play();
- void stop();
- void prev();
- void next();
- void updateVolume( int );
- void updateVolume( void );
- void updateInput();
- void fullscreen();
- void extSettings();
- void faster();
- void slower();
- void toggleAdvanced();
- void toggleTeletext();
- void toggleTeletextTransparency();
- void enableTeletext( bool );
-signals:
- void advancedControlsToggled( bool );
-};
-
-/***********************************
- * Fullscreen controller
- ***********************************/
-class FullscreenControllerWidget : public ControlsWidget
-{
- Q_OBJECT
-public:
- FullscreenControllerWidget( intf_thread_t *, MainInterface*, bool, bool );
- virtual ~FullscreenControllerWidget();
-
- /* */
- void attachVout( vout_thread_t *p_vout );
- void detachVout();
- void fullscreenChanged( vout_thread_t *, bool b_fs, int i_timeout );
-
-protected:
- friend class MainInterface;
- friend class VolumeClickHandler;
-
- virtual void mouseMoveEvent( QMouseEvent *event );
- virtual void mousePressEvent( QMouseEvent *event );
- virtual void enterEvent( QEvent *event );
- virtual void leaveEvent( QEvent *event );
- virtual void keyPressEvent( QKeyEvent *event );
-
-private slots:
- void showFSC();
- void planHideFSC();
- void hideFSC();
-
- void slowHideFSC();
-
-
-private:
- QTimer *p_hideTimer;
-#if HAVE_TRANSPARENCY
- QTimer *p_slowHideTimer;
-#endif
-
- int i_mouse_last_x;
- int i_mouse_last_y;
-
- bool b_mouse_over;
-
- bool b_slow_hide_begin;
- int i_slow_hide_timeout;
-
-#ifdef WIN32TRICK
- bool fscHidden;
-#endif
-
- virtual void customEvent( QEvent *event );
-
- vout_thread_t *p_vout;
-
- /* Shared variable between FSC and VLC (protected by a lock) */
- vlc_mutex_t lock;
- bool b_fullscreen;
- int i_hide_timeout; /* FSC hiding timeout, same as mouse hiding timeout */
-};
-
-
-
-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 )