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