#include "main_interface.hpp"
#include "input_manager.hpp"
-#include "pixmaps/art.xpm"
-#include <vlc/vout.h>
+#include <vlc_vout.h>
#include <QLabel>
#include <QSpacerItem>
#include <QPushButton>
#include <QHBoxLayout>
#include <QMenu>
+#include <QPalette>
+#include <QResizeEvent>
#define ICON_SIZE 128
QSize VideoWidget::sizeHint() const
{
- fprintf( stderr, "Video Size %ix%i\n", widgetSize.width(), widgetSize.height() );
return widgetSize;
}
return NULL;
}
p_vout = p_nvout;
- setMinimumSize( 1,1 );
+ setMinimumSize( 16, 16 );
return (void*)winId();
}
QSize BackgroundWidget::sizeHint() const
{
- fprintf( stderr, "BG %ix%i\n", widgetSize.width(), widgetSize.height() );
return widgetSize;
}
left->addWidget( selector );
art = new QLabel( "" );
+ art->setMinimumHeight( 128 );
+ art->setMinimumWidth( 128 );
art->setMaximumHeight( 128 );
art->setMaximumWidth( 128 );
art->setScaledContents( true );
- art->setPixmap( QPixmap( art_xpm ) ); //":/vlc128.png" ) );
+
+ art->setPixmap( QPixmap( ":/noart.png" ) );
left->addWidget( art );
playlist_item_t *p_root = playlist_GetPreferredNode( THEPL,
CONNECT( selector, activated( int ), rightPanel, setRoot( int ) );
- CONNECT( qobject_cast<StandardPLPanel *>(rightPanel)->model, artSet( QString ) , this, setArt( QString ) );
+ CONNECT( qobject_cast<StandardPLPanel *>(rightPanel)->model,
+ artSet( QString ) , this, setArt( QString ) );
+ /* Forward removal requests from the selector to the main panel */
+ CONNECT( qobject_cast<PLSelector *>(selector)->model,
+ shouldRemove( int ),
+ qobject_cast<StandardPLPanel *>(rightPanel), removeItem(int) );
connect( selector, SIGNAL(activated( int )),
this, SIGNAL( rootChanged( int ) ) );
void PlaylistWidget::setArt( QString url )
{
- if( prevArt != url )
- {
- fprintf( stderr, "Display %s\n", qta( url ) );
+ if( url.isNull() )
+ art->setPixmap( QPixmap( ":/noart.png" ) );
+ else if( prevArt != url )
art->setPixmap( QPixmap( url ) );
- prevArt = url;
- }
+ prevArt = url;
}
PlaylistWidget::~PlaylistWidget()