From 0a7b6c9a22c5d2365de9ebc43a04cacf3408e121 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser <muesli@gmail.com> Date: Fri, 1 Jun 2012 07:10:27 +0200 Subject: [PATCH] * Make start- / finishLoading public methods of PlayableModel. --- src/libtomahawk/playlist/PlayableModel.cpp | 4 ++-- src/libtomahawk/playlist/PlayableModel.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/playlist/PlayableModel.cpp b/src/libtomahawk/playlist/PlayableModel.cpp index b6c7347a2..e3b5817cd 100644 --- a/src/libtomahawk/playlist/PlayableModel.cpp +++ b/src/libtomahawk/playlist/PlayableModel.cpp @@ -37,12 +37,12 @@ using namespace Tomahawk; -PlayableModel::PlayableModel( QObject* parent ) +PlayableModel::PlayableModel( QObject* parent, bool loading ) : QAbstractItemModel( parent ) , m_rootItem( new PlayableItem( 0, this ) ) , m_readOnly( true ) , m_style( Detailed ) - , m_loading( true ) + , m_loading( loading ) { connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlaybackStarted( Tomahawk::result_ptr ) ), Qt::DirectConnection ); connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection ); diff --git a/src/libtomahawk/playlist/PlayableModel.h b/src/libtomahawk/playlist/PlayableModel.h index 4a219dee6..2d436c5db 100644 --- a/src/libtomahawk/playlist/PlayableModel.h +++ b/src/libtomahawk/playlist/PlayableModel.h @@ -60,7 +60,7 @@ public: Name = 12 }; - explicit PlayableModel( QObject* parent = 0 ); + explicit PlayableModel( QObject* parent = 0, bool loading = true ); virtual ~PlayableModel(); PlayableModel::PlayableItemStyle style() const { return m_style; } @@ -117,6 +117,9 @@ public: void setItemSize( const QSize& size ) { m_itemSize = size; } + void startLoading(); + void finishLoading(); + signals: void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode ); void shuffleModeChanged( bool enabled ); @@ -156,8 +159,6 @@ public slots: protected: PlayableItem* rootItem() const { return m_rootItem; } - void startLoading(); - void finishLoading(); private slots: void onDataChanged();