#include "components/playlist/selector.hpp"
PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) :
- BasePlaylistWidget ( _p_intf)
+ p_intf ( _p_intf)
{
- QVBoxLayout *left = new QVBoxLayout( );
+ /* Left Part and design */
+ QWidget *leftW = new QWidget( this );
+ QVBoxLayout *left = new QVBoxLayout( leftW );
+ /* Source Selector */
selector = new PLSelector( this, p_intf, THEPL );
selector->setMaximumWidth( 130 );
left->addWidget( selector );
+ /* Art label */
art = new QLabel( "" );
art->setMinimumHeight( 128 );
art->setMinimumWidth( 128 );
art->setMaximumHeight( 128 );
art->setMaximumWidth( 128 );
art->setScaledContents( true );
-
art->setPixmap( QPixmap( ":/noart.png" ) );
left->addWidget( art );
+ /* Initialisation of the playlist */
playlist_item_t *p_root = playlist_GetPreferredNode( THEPL,
THEPL->p_local_category );
rightPanel = qobject_cast<PLPanel *>(new StandardPLPanel( this,
p_intf, THEPL, p_root ) );
+ /* Connects */
CONNECT( selector, activated( int ), rightPanel, setRoot( int ) );
CONNECT( qobject_cast<StandardPLPanel *>(rightPanel)->model,
this, SIGNAL( rootChanged( int ) ) );
emit rootChanged( p_root->i_id );
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->addLayout( left, 0 );
- layout->addWidget( rightPanel, 10 );
- setLayout( layout );
+ /* Add the two sides of the QSplitter */
+ addWidget( leftW );
+ addWidget( rightPanel );
+
+ /* FIXME Sizing to do */
}
void PlaylistWidget::setArt( QString url )
/******************** Playlist Widgets ****************/
#include <QModelIndex>
+#include <QSplitter>
class QSignalMapper;
class PLSelector;
class PLPanel;
class QPushButton;
-class PlaylistWidget : public BasePlaylistWidget
+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;
QPushButton *addButton;
QLabel *art;
QString prevArt;
+protected:
+ intf_thread_t *p_intf;
private slots:
void setArt( QString );
signals:
#include <vlc/vlc.h>
#include "qt4.hpp"
+#include "../interface_widgets.hpp"
#include <QModelIndex>
#include <QWidget>
{
Q_OBJECT;
public:
- PLPanel( BasePlaylistWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
+ PLPanel( PlaylistWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
{
p_intf = _p_intf;
parent = p;
virtual ~PLPanel() {};
protected:
intf_thread_t *p_intf;
- BasePlaylistWidget *parent;
+ QFrame *parent;
public slots:
virtual void setRoot( int ) = 0;
};
{
Q_OBJECT;
public:
- StandardPLPanel( BasePlaylistWidget *, intf_thread_t *,
+ StandardPLPanel( PlaylistWidget *, intf_thread_t *,
playlist_t *,playlist_item_t * );
virtual ~StandardPLPanel();
protected: