]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/interface_widgets.cpp
Implement color change for colorthres and extract filters. Fix dial for rotate filter.
[vlc] / modules / gui / qt4 / components / interface_widgets.cpp
index 3607bcf0d1a6d95c827f5c399e5e8be3212618ed..58e14ea278f261576d1184d53e3be0b3b1493690 100644 (file)
@@ -27,8 +27,7 @@
 #include "main_interface.hpp"
 #include "input_manager.hpp"
 
-#include "pixmaps/art.xpm"
-#include <vlc/vout.h>
+#include <vlc_vout.h>
 
 #include <QLabel>
 #include <QSpacerItem>
@@ -36,6 +35,8 @@
 #include <QPushButton>
 #include <QHBoxLayout>
 #include <QMenu>
+#include <QPalette>
+#include <QResizeEvent>
 
 #define ICON_SIZE 128
 
@@ -90,7 +91,7 @@ void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
         return NULL;
     }
     p_vout = p_nvout;
-    setMinimumSize( 1,1 );
+    setMinimumSize( 16, 16 );
     return (void*)winId();
 }
 
@@ -286,10 +287,13 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) :
     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,
@@ -300,7 +304,12 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) :
 
     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 ) ) );
@@ -314,11 +323,11 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) :
 
 void PlaylistWidget::setArt( QString url )
 {
-    if( prevArt != url )
-    {
+    if( url.isNull() )
+        art->setPixmap( QPixmap( ":/noart.png" ) );
+    else if( prevArt != url )
         art->setPixmap( QPixmap( url ) );
-        prevArt = url;
-    }
+    prevArt = url;
 }
 
 PlaylistWidget::~PlaylistWidget()