* Playlist Widget. The embedded playlist
**********************************************************************/
-PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i,
- QWidget *_parent )
- : p_intf ( _p_i ), parent( _parent )
+PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i ) : p_intf ( _p_i )
{
setContentsMargins( 3, 3, 3, 3 );
{
getSettings()->beginGroup("Playlist");
getSettings()->setValue( "splitterSizes", saveState() );
- getSettings()->setValue( "GlobalPos", mapToGlobal( pos() ) );
getSettings()->endGroup();
+ msg_Dbg( p_intf, "Playlist Destroyed" );
}
#include "main_interface.hpp"
{
Q_OBJECT;
public:
- PlaylistWidget( intf_thread_t *_p_i, QWidget *parent ) ;
+ PlaylistWidget( intf_thread_t *_p_i );
virtual ~PlaylistWidget();
private:
PLSelector *selector;
PLPanel *rightPanel;
QPushButton *addButton;
ArtLabel *art;
- QWidget *parent;
protected:
intf_thread_t *p_intf;
virtual void dropEvent( QDropEvent *);
getSettings()->beginGroup("playlistdialog");
- playlistWidget = new PlaylistWidget( p_intf, this );
+ playlistWidget = new PlaylistWidget( p_intf );
l->addWidget( playlistWidget );
readSettings( getSettings(), QSize( 600,700 ) );
{
if( !isDocked() )
QVLCTools::saveWidgetPosition( p_intf, "Playlist", playlistWidget );
+
+ delete playlistWidget;
}
settings->beginGroup( "MainWindow" );
If no playlist exist, then create one and attach it to the DockPL*/
if( !playlistWidget )
{
- playlistWidget = new PlaylistWidget( p_intf, this );
+ playlistWidget = new PlaylistWidget( p_intf );
i_pl_dock = PL_UNDOCKED;
/* i_pl_dock = (pl_dock_e)getSettings()
if( i_pl_dock == PL_UNDOCKED )
{
- playlistWidget->setParent( this, Qt::Window );
+ playlistWidget->setWindowFlags( Qt::Window );
/* This will restore the geometry but will not work for position,
because of parenting */
QVLCTools::restoreWidgetPosition( p_intf, "Playlist",
playlistWidget, QSize( 600, 300 ) );
- /* Move it correctly then */
- playlistWidget->move(
- getSettings()->value( "Playlist/GlobalPos" ).toPoint() );
}
else
{