mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-21 00:12:06 +02:00
Bundle all playlist interfaces and export the meta interface
This commit is contained in:
parent
087b35cc89
commit
b14280b96c
@ -38,6 +38,7 @@
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Closure.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "MetaPlaylistInterface.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@ -51,6 +52,7 @@ CollectionViewPage::CollectionViewPage( const Tomahawk::collection_ptr& collecti
|
||||
, m_model( 0 )
|
||||
, m_flatModel( 0 )
|
||||
, m_albumModel( 0 )
|
||||
, m_playlistInterface( new MetaPlaylistInterface() )
|
||||
{
|
||||
qRegisterMetaType< CollectionViewPageMode >( "CollectionViewPageMode" );
|
||||
|
||||
@ -114,6 +116,10 @@ CollectionViewPage::CollectionViewPage( const Tomahawk::collection_ptr& collecti
|
||||
|
||||
connect( m_header, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) );
|
||||
|
||||
m_playlistInterface->addChildInterface( m_trackView->playlistInterface() );
|
||||
m_playlistInterface->addChildInterface( m_albumView->playlistInterface() );
|
||||
m_playlistInterface->addChildInterface( m_columnView->proxyModel()->playlistInterface() );
|
||||
|
||||
loadCollection( collection );
|
||||
}
|
||||
|
||||
@ -266,7 +272,7 @@ CollectionViewPage::setCurrentMode( CollectionViewPageMode mode )
|
||||
Tomahawk::playlistinterface_ptr
|
||||
CollectionViewPage::playlistInterface() const
|
||||
{
|
||||
return m_columnView->proxyModel()->playlistInterface();
|
||||
return m_playlistInterface.objectCast<Tomahawk::PlaylistInterface>();
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,6 +34,10 @@ class PlayableModel;
|
||||
class PlaylistModel;
|
||||
class FilterHeader;
|
||||
|
||||
namespace Tomahawk {
|
||||
class MetaPlaylistInterface;
|
||||
}
|
||||
|
||||
class DLLEXPORT CollectionViewPage : public QWidget, public Tomahawk::ViewPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -90,6 +94,7 @@ private:
|
||||
PlayableModel* m_flatModel;
|
||||
PlayableModel* m_albumModel;
|
||||
QStackedWidget* m_stack;
|
||||
QSharedPointer<Tomahawk::MetaPlaylistInterface> m_playlistInterface;
|
||||
|
||||
Tomahawk::collection_ptr m_collection;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user