* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
+ * Jean-Baptiste Kempf <jb@videolan.org>
*
* 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
#define _INTFWIDGETS_H_
#include <vlc/vlc.h>
-#include <vlc/intf.h>
+#include <vlc_interface.h>
+
+#include <vlc_aout.h>
+#include "qt4.hpp"
+
#include <QWidget>
#include <QFrame>
-#include <QPalette>
-#include <QResizeEvent>
-#include <QPixmap>
+class ResizeEvent;
+class QPalette;
+class QPixmap;
class QLabel;
class QHBoxLayout;
QWidget *frame;
intf_thread_t *p_intf;
vlc_mutex_t lock;
+signals:
+ void askResize();
+private slots:
+ void SetMinSize();
};
/******************** Background Widget ****************/
int DrawBackground();
int CleanBackground();
intf_thread_t *p_intf;
+private slots:
+ void setArt( QString );
};
class VisualSelector : public QFrame
virtual ~VisualSelector();
private:
intf_thread_t *p_intf;
+ QLabel *current;
+private slots:
+ void prev();
+ void next();
+};
+
+class QPushButton;
+class AdvControlsWidget : public QFrame
+{
+ Q_OBJECT
+public:
+ AdvControlsWidget( intf_thread_t *);
+ virtual ~AdvControlsWidget();
+ void enableInput( bool );
+ void enableVideo( bool );
+private:
+ intf_thread_t *p_intf;
+ QPushButton *normalButton, *recordButton, *ABButton;
+ QPushButton *snapshotButton, *frameButton;
+private slots:
+ void normal();
+ void snapshot();
+ void frame();
+ void fromAtoB();
+ void record();
+};
+
+class InputSlider;
+class QSlider;
+class QGridLayout;
+class VolumeClickHandler;
+class ControlsWidget : public QFrame
+{
+ Q_OBJECT
+public:
+ 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();
+protected:
+ friend class MainInterface;
+ friend class VolumeClickHandler;
+private:
+ intf_thread_t *p_intf;
+ QFrame *discFrame;
+ QGridLayout *controlLayout;
+ InputSlider *slider;
+ QPushButton *prevSectionButton, *nextSectionButton, *menuButton;
+ QPushButton *playButton, *fullscreenButton;
+ QPushButton *slowerButton, *fasterButton;
+ AdvControlsWidget *advControls;
+
+ bool b_advancedVisible;
+private slots:
+ void play();
+ void stop();
+ void prev();
+ void next();
+ void updateVolume( int );
+ void fullscreen();
+ void extSettings();
+ void prefs();
+ void faster();
+ void slower();
+ void toggleAdvanced();
+signals:
+ void advancedControlsToggled( bool );
+};
+
+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 );
+ return true;
+ }
+ return false;
+ }
+private:
+ ControlsWidget *m;
+ intf_thread_t *p_intf;
};
-/******************** Playlist Widget ****************/
+
+/******************** Playlist Widgets ****************/
#include <QModelIndex>
+#include <QSplitter>
class QSignalMapper;
class PLSelector;
class PLPanel;
+class QPushButton;
-class PlaylistWidget : public QFrame
+class PlaylistWidget : public QSplitter
{
Q_OBJECT;
public:
- PlaylistWidget( intf_thread_t * );
+ PlaylistWidget( intf_thread_t *_p_i ) ;
virtual ~PlaylistWidget();
QSize widgetSize;
virtual QSize sizeHint() const;
private:
PLSelector *selector;
PLPanel *rightPanel;
- intf_thread_t *p_intf;
+ QPushButton *addButton;
+ QLabel *art;
+ QString prevArt;
+protected:
+ intf_thread_t *p_intf;
private slots:
- void undock();
+ void setArt( QString );
+signals:
+ void rootChanged( int );
+ void artSet( QString );
};
#endif