*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
+ * Rafaël Carré <funman@videolanorg>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <QWidget>
#include <QFrame>
+#define VOLUME_MAX 200
class ResizeEvent;
class QPalette;
QWidget *frame;
intf_thread_t *p_intf;
vlc_mutex_t lock;
+signals:
+ void askResize();
+ void askVideoToShow();
+private slots:
+ void SetMinSize();
};
/******************** Background Widget ****************/
QLabel *label;
QHBoxLayout *backgroundLayout;
virtual void resizeEvent( QResizeEvent *e );
+ virtual void contextMenuEvent( QContextMenuEvent *event );
int DrawBackground();
int CleanBackground();
intf_thread_t *p_intf;
-private slots:
+public slots:
void setArt( QString );
};
void enableVideo( bool );
private:
intf_thread_t *p_intf;
- QPushButton *normalButton;
- QPushButton *fullscreenButton, *snapshotButton;
+ QPushButton *normalButton, *recordButton, *ABButton;
+ QPushButton *snapshotButton, *frameButton;
private slots:
void normal();
void snapshot();
- void fullscreen();
+ void frame();
+ void fromAtoB();
+ void record();
};
+
+
class InputSlider;
class QSlider;
class QGridLayout;
{
Q_OBJECT
public:
- ControlsWidget( intf_thread_t *);
+ ControlsWidget( intf_thread_t *, bool );
virtual ~ControlsWidget();
QPushButton *playlistButton;
QSlider *volumeSlider;
void setStatus( int );
void enableInput( bool );
+ void enableVideo( bool );
public slots:
void setNavigation( int );
void updateOnTimer();
friend class MainInterface;
friend class VolumeClickHandler;
private:
- intf_thread_t *p_intf;
- QFrame *discFrame;
- QGridLayout *controlLayout;
+ intf_thread_t *p_intf;
+ QFrame *discFrame;
+ QGridLayout *controlLayout;
InputSlider *slider;
- QPushButton *prevSectionButton, *nextSectionButton, *menuButton;
- QPushButton *playButton;
- QPushButton *slowerButton, *fasterButton;
+ QPushButton *prevSectionButton, *nextSectionButton, *menuButton;
+ QPushButton *playButton, *fullscreenButton;
+ QPushButton *slowerButton, *fasterButton;
+ AdvControlsWidget *advControls;
+ QLabel *volMuteLabel;
+
+ bool b_advancedVisible;
private slots:
void play();
void stop();
void updateVolume( int );
void fullscreen();
void extSettings();
- void prefs();
void faster();
void slower();
+ void toggleAdvanced();
+signals:
+ void advancedControlsToggled( bool );
};
class VolumeClickHandler : public QObject
virtual ~VolumeClickHandler() {};
bool eventFilter( QObject *obj, QEvent *e )
{
- if (e->type() == QEvent::MouseButtonPress )
+ 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;
intf_thread_t *p_intf;
};
+#include <QLabel>
+#include <QMouseEvent>
+class TimeLabel : public QLabel
+{
+ Q_OBJECT
+ void mousePressEvent( QMouseEvent *event )
+ {
+ if( event->button() == Qt::LeftButton ) emit timeLabelClicked();
+ }
+ void mouseDoubleClickEvent( QMouseEvent *event )
+ {
+ emit timeLabelDoubleClicked();
+ }
+signals:
+ void timeLabelClicked();
+ void timeLabelDoubleClicked();
+};
/******************** Playlist Widgets ****************/
#include <QModelIndex>
void artSet( QString );
};
+
+/******************** Speed Control Widgets ****************/
+class SpeedControlWidget : public QFrame
+{
+ Q_OBJECT
+public:
+ SpeedControlWidget( intf_thread_t *);
+ virtual ~SpeedControlWidget();
+ void updateControls( int );
+private:
+ intf_thread_t *p_intf;
+ QSlider *speedSlider;
+ QPushButton *normalSpeedButton;
+private slots:
+ void updateRate( int );
+ void resetRate();
+};
+
+
#endif