]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/playlist.cpp
A bunch of various fixes (encoding, refcount, layout)
[vlc] / modules / gui / qt4 / dialogs / playlist.cpp
index 7f27d339791bbbe22b8f720ed8435e892eedf470..400d5e0d5c66db08d28c930a5f24b6838cb6a1b3 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * playlist.cpp : Playlist dialog
  ****************************************************************************
- * Copyright (C) 2000-2005 the VideoLAN team
- * $Id: wxwidgets.cpp 15731 2006-05-25 14:43:53Z zorglub $
+ * Copyright (C) 2006 the VideoLAN team
+ * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
  *
 #include "dialogs/playlist.hpp"
 #include "util/qvlcframe.hpp"
 #include "qt4.hpp"
-
+#include "components/playlist/panels.hpp"
+#include "components/playlist/selector.hpp"
+#include <QHBoxLayout>
 
 PlaylistDialog *PlaylistDialog::instance = NULL;
 
-PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCFrame( p_intf )
+PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
 {
+    setWindowTitle( qtr( "Playlist" ) );
+    playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
+                                     VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+
+    QHBoxLayout *layout = new QHBoxLayout();
+    selector = new PLSelector( this, p_intf );
+    layout->addWidget( selector, 1 );
+    
+    rightPanel = qobject_cast<PLPanel *>(new StandardPLPanel( this, p_intf,
+                                   p_playlist, p_playlist->p_root_category ) );
+    layout->addWidget( rightPanel, 3 );
+    readSettings( "playlist", QSize( 500,500 ) );
+    setLayout( layout );
 }
 
 PlaylistDialog::~PlaylistDialog()
 {
+    writeSettings( "playlist" );
 }