mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
* Make start- / finishLoading public methods of PlayableModel.
This commit is contained in:
@@ -37,12 +37,12 @@
|
|||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
|
|
||||||
PlayableModel::PlayableModel( QObject* parent )
|
PlayableModel::PlayableModel( QObject* parent, bool loading )
|
||||||
: QAbstractItemModel( parent )
|
: QAbstractItemModel( parent )
|
||||||
, m_rootItem( new PlayableItem( 0, this ) )
|
, m_rootItem( new PlayableItem( 0, this ) )
|
||||||
, m_readOnly( true )
|
, m_readOnly( true )
|
||||||
, m_style( Detailed )
|
, 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( started( Tomahawk::result_ptr ) ), SLOT( onPlaybackStarted( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
||||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
||||||
|
@@ -60,7 +60,7 @@ public:
|
|||||||
Name = 12
|
Name = 12
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit PlayableModel( QObject* parent = 0 );
|
explicit PlayableModel( QObject* parent = 0, bool loading = true );
|
||||||
virtual ~PlayableModel();
|
virtual ~PlayableModel();
|
||||||
|
|
||||||
PlayableModel::PlayableItemStyle style() const { return m_style; }
|
PlayableModel::PlayableItemStyle style() const { return m_style; }
|
||||||
@@ -117,6 +117,9 @@ public:
|
|||||||
|
|
||||||
void setItemSize( const QSize& size ) { m_itemSize = size; }
|
void setItemSize( const QSize& size ) { m_itemSize = size; }
|
||||||
|
|
||||||
|
void startLoading();
|
||||||
|
void finishLoading();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
@@ -156,8 +159,6 @@ public slots:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
PlayableItem* rootItem() const { return m_rootItem; }
|
PlayableItem* rootItem() const { return m_rootItem; }
|
||||||
void startLoading();
|
|
||||||
void finishLoading();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onDataChanged();
|
void onDataChanged();
|
||||||
|
Reference in New Issue
Block a user