Commit 6a25ed7c authored by Jakob Leben's avatar Jakob Leben

Qt4: let PLModel and PLSelector use MainInputManager instead of PlaylistEventManager

parent 24a911ff
......@@ -32,7 +32,6 @@
#include "components/playlist/playlist_model.hpp"
#include "dialogs/mediainfo.hpp"
#include "dialogs/playlist.hpp"
#include "playlist.hpp"
#include <vlc_intf_strings.h>
#include "pixmaps/types/type_unknown.xpm"
......@@ -65,7 +64,6 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
{
p_intf = _p_intf;
p_playlist = _p_playlist;
plEM = new PlaylistEventManager( _p_playlist );
i_cached_id = -1;
i_cached_input_id = -1;
i_popup_item = i_popup_parent = -1;
......@@ -91,14 +89,15 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
this, processInputItemUpdate( input_item_t *) );
CONNECT( THEMIM, inputChanged( input_thread_t * ),
this, processInputItemUpdate( input_thread_t* ) );
CONNECT( plEM, itemAdded( int, int ), this, processItemAppend( int, int ) );
CONNECT( plEM, itemRemoved( int ), this, processItemRemoval( int ) );
CONNECT( THEMIM, playlistItemAppended( int, int ),
this, processItemAppend( int, int ) );
CONNECT( THEMIM, playlistItemRemoved( int ),
this, processItemRemoval( int ) );
}
PLModel::~PLModel()
{
delete rootItem;
delete plEM;
}
Qt::DropActions PLModel::supportedDropActions() const
......
......@@ -44,7 +44,6 @@
#include <QAbstractItemModel>
#include <QVariant>
class PlaylistEventManager;
class QSignalMapper;
class PLItem;
......@@ -100,7 +99,6 @@ public:
private:
/* General */
PlaylistEventManager *plEM;
PLItem *rootItem;
PLItem *currentItem;
......
......@@ -108,11 +108,9 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf )
setDropIndicatorShown(true);
invisibleRootItem()->setFlags( invisibleRootItem()->flags() & ~Qt::ItemIsDropEnabled );
plEM = new PlaylistEventManager( THEPL );
CONNECT( plEM, itemAdded( int, int ),
CONNECT( THEMIM, playlistItemAppended( int, int ),
this, plItemAdded( int, int ) );
CONNECT( plEM, itemRemoved( int ),
CONNECT( THEMIM, playlistItemRemoved( int ),
this, plItemRemoved( int ) );
CONNECT( THEMIM->getIM(), metaChanged( input_item_t *),
this, inputItemUpdate( input_item_t * ) );
......@@ -131,8 +129,6 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf )
PLSelector::~PLSelector()
{
delete plEM;
if( podcastsParent )
{
int c = podcastsParent->childCount();
......
......@@ -42,7 +42,6 @@
#include "qt4.hpp"
class PlaylistWidget;
class PlaylistEventManager;
enum SelectorItemType {
CATEGORY_TYPE,
......@@ -136,7 +135,6 @@ private:
PLSelItem * addPodcastItem( playlist_item_t *p_item );
inline PLSelItem * itemWidget( QTreeWidgetItem * );
intf_thread_t *p_intf;
PlaylistEventManager *plEM;
QTreeWidgetItem *podcastsParent;
int podcastsParentId;
private slots:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment