mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
* Removed obsolete 'unfilteredTrackCount' PlaylistInterface method / signal.
This commit is contained in:
@@ -43,7 +43,6 @@ public:
|
|||||||
QList<Tomahawk::query_ptr> tracks();
|
QList<Tomahawk::query_ptr> tracks();
|
||||||
|
|
||||||
virtual int trackCount() const { return m_queries.count(); }
|
virtual int trackCount() const { return m_queries.count(); }
|
||||||
virtual int unfilteredTrackCount() const { return m_queries.count(); }
|
|
||||||
|
|
||||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
||||||
|
|
||||||
|
@@ -42,7 +42,6 @@ public:
|
|||||||
virtual QList<Tomahawk::query_ptr> tracks();
|
virtual QList<Tomahawk::query_ptr> tracks();
|
||||||
|
|
||||||
virtual int trackCount() const { return m_queries.count(); }
|
virtual int trackCount() const { return m_queries.count(); }
|
||||||
virtual int unfilteredTrackCount() const { return m_queries.count(); }
|
|
||||||
|
|
||||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
||||||
|
|
||||||
|
@@ -42,7 +42,6 @@ public:
|
|||||||
virtual QList< Tomahawk::query_ptr > tracks() = 0;
|
virtual QList< Tomahawk::query_ptr > tracks() = 0;
|
||||||
virtual bool isFinished() const { return m_finished; }
|
virtual bool isFinished() const { return m_finished; }
|
||||||
|
|
||||||
virtual int unfilteredTrackCount() const = 0;
|
|
||||||
virtual int trackCount() const = 0;
|
virtual int trackCount() const = 0;
|
||||||
|
|
||||||
virtual Tomahawk::result_ptr currentItem() const = 0;
|
virtual Tomahawk::result_ptr currentItem() const = 0;
|
||||||
@@ -78,10 +77,9 @@ public slots:
|
|||||||
virtual void setShuffled( bool enabled ) = 0;
|
virtual void setShuffled( bool enabled ) = 0;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void trackCountChanged( unsigned int tracks );
|
||||||
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
void trackCountChanged( unsigned int tracks );
|
|
||||||
void sourceTrackCountChanged( unsigned int tracks );
|
|
||||||
void latchModeChanged( Tomahawk::PlaylistModes::LatchMode mode );
|
void latchModeChanged( Tomahawk::PlaylistModes::LatchMode mode );
|
||||||
void nextTrackReady();
|
void nextTrackReady();
|
||||||
|
|
||||||
|
@@ -40,13 +40,6 @@ PlaylistPlaylistInterface::~PlaylistPlaylistInterface()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
PlaylistPlaylistInterface::unfilteredTrackCount() const
|
|
||||||
{
|
|
||||||
return ( m_playlist.isNull() ? 0 : m_playlist.data()->entries().count() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
PlaylistPlaylistInterface::trackCount() const
|
PlaylistPlaylistInterface::trackCount() const
|
||||||
{
|
{
|
||||||
|
@@ -44,7 +44,6 @@ public:
|
|||||||
|
|
||||||
virtual QList<Tomahawk::query_ptr> tracks();
|
virtual QList<Tomahawk::query_ptr> tracks();
|
||||||
|
|
||||||
virtual int unfilteredTrackCount() const;
|
|
||||||
virtual int trackCount() const;
|
virtual int trackCount() const;
|
||||||
|
|
||||||
virtual bool hasNextItem() { return false; }
|
virtual bool hasNextItem() { return false; }
|
||||||
|
@@ -42,7 +42,6 @@ public:
|
|||||||
QList<Tomahawk::query_ptr> tracks();
|
QList<Tomahawk::query_ptr> tracks();
|
||||||
|
|
||||||
virtual int trackCount() const { return 1; }
|
virtual int trackCount() const { return 1; }
|
||||||
virtual int unfilteredTrackCount() const { return 1; }
|
|
||||||
|
|
||||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
||||||
virtual bool sourceValid();
|
virtual bool sourceValid();
|
||||||
|
@@ -189,8 +189,6 @@ ViewManager::show( const Tomahawk::playlist_ptr& playlist )
|
|||||||
}
|
}
|
||||||
|
|
||||||
setPage( view );
|
setPage( view );
|
||||||
emit numSourcesChanged( SourceList::instance()->count() );
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,8 +210,6 @@ ViewManager::show( const Tomahawk::dynplaylist_ptr& playlist )
|
|||||||
else
|
else
|
||||||
showQueue();*/
|
showQueue();*/
|
||||||
|
|
||||||
emit numSourcesChanged( SourceList::instance()->count() );
|
|
||||||
|
|
||||||
return m_dynamicWidgets.value( playlist ).data();
|
return m_dynamicWidgets.value( playlist ).data();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,8 +348,6 @@ ViewManager::show( const Tomahawk::collection_ptr& collection )
|
|||||||
setPage( aview );
|
setPage( aview );
|
||||||
}
|
}
|
||||||
|
|
||||||
emit numSourcesChanged( 1 );
|
|
||||||
|
|
||||||
return shown;
|
return shown;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,8 +416,6 @@ ViewManager::showSuperCollection()
|
|||||||
setPage( m_superGridView );
|
setPage( m_superGridView );
|
||||||
}
|
}
|
||||||
|
|
||||||
emit numSourcesChanged( m_superCollections.count() );
|
|
||||||
|
|
||||||
return shown;
|
return shown;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,12 +715,6 @@ ViewManager::unlinkPlaylist()
|
|||||||
{
|
{
|
||||||
if ( currentPlaylistInterface() )
|
if ( currentPlaylistInterface() )
|
||||||
{
|
{
|
||||||
disconnect( currentPlaylistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ),
|
|
||||||
this, SIGNAL( numTracksChanged( unsigned int ) ) );
|
|
||||||
|
|
||||||
disconnect( currentPlaylistInterface().data(), SIGNAL( trackCountChanged( unsigned int ) ),
|
|
||||||
this, SIGNAL( numShownChanged( unsigned int ) ) );
|
|
||||||
|
|
||||||
disconnect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ),
|
disconnect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ),
|
||||||
this, SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
|
this, SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
|
||||||
|
|
||||||
@@ -766,12 +752,6 @@ ViewManager::updateView()
|
|||||||
{
|
{
|
||||||
if ( currentPlaylistInterface() )
|
if ( currentPlaylistInterface() )
|
||||||
{
|
{
|
||||||
connect( currentPlaylistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ),
|
|
||||||
SIGNAL( numTracksChanged( unsigned int ) ) );
|
|
||||||
|
|
||||||
connect( currentPlaylistInterface().data(), SIGNAL( trackCountChanged( unsigned int ) ),
|
|
||||||
SIGNAL( numShownChanged( unsigned int ) ) );
|
|
||||||
|
|
||||||
connect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ),
|
connect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ),
|
||||||
SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
|
SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
|
||||||
|
|
||||||
@@ -783,13 +763,6 @@ ViewManager::updateView()
|
|||||||
|
|
||||||
if ( currentPage()->showStatsBar() && currentPlaylistInterface() )
|
if ( currentPage()->showStatsBar() && currentPlaylistInterface() )
|
||||||
{
|
{
|
||||||
emit numTracksChanged( currentPlaylistInterface()->unfilteredTrackCount() );
|
|
||||||
|
|
||||||
if ( !currentPage()->filter().isEmpty() )
|
|
||||||
emit numShownChanged( currentPlaylistInterface()->trackCount() );
|
|
||||||
else
|
|
||||||
emit numShownChanged( currentPlaylistInterface()->unfilteredTrackCount() );
|
|
||||||
|
|
||||||
emit repeatModeChanged( currentPlaylistInterface()->repeatMode() );
|
emit repeatModeChanged( currentPlaylistInterface()->repeatMode() );
|
||||||
emit shuffleModeChanged( currentPlaylistInterface()->shuffled() );
|
emit shuffleModeChanged( currentPlaylistInterface()->shuffled() );
|
||||||
emit modeChanged( currentPlaylistInterface()->viewMode() );
|
emit modeChanged( currentPlaylistInterface()->viewMode() );
|
||||||
|
@@ -110,11 +110,6 @@ public:
|
|||||||
bool isTomahawkLoaded() const { return m_loaded; }
|
bool isTomahawkLoaded() const { return m_loaded; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void numSourcesChanged( unsigned int sources );
|
|
||||||
void numTracksChanged( unsigned int tracks );
|
|
||||||
void numArtistsChanged( unsigned int artists );
|
|
||||||
void numShownChanged( unsigned int shown );
|
|
||||||
|
|
||||||
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
|
@@ -75,9 +75,6 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel )
|
|||||||
{
|
{
|
||||||
if ( m_model )
|
if ( m_model )
|
||||||
{
|
{
|
||||||
if ( m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 )
|
|
||||||
disconnect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), this, SIGNAL( sourceTrackCountChanged( unsigned int ) ) );
|
|
||||||
|
|
||||||
disconnect( m_model, SIGNAL( loadingStarted() ), this, SIGNAL( loadingStarted() ) );
|
disconnect( m_model, SIGNAL( loadingStarted() ), this, SIGNAL( loadingStarted() ) );
|
||||||
disconnect( m_model, SIGNAL( loadingFinished() ), this, SIGNAL( loadingFinished() ) );
|
disconnect( m_model, SIGNAL( loadingFinished() ), this, SIGNAL( loadingFinished() ) );
|
||||||
}
|
}
|
||||||
@@ -86,9 +83,6 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel )
|
|||||||
|
|
||||||
if ( m_model )
|
if ( m_model )
|
||||||
{
|
{
|
||||||
if ( m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 )
|
|
||||||
connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), playlistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ) );
|
|
||||||
|
|
||||||
connect( m_model, SIGNAL( loadingStarted() ), SIGNAL( loadingStarted() ) );
|
connect( m_model, SIGNAL( loadingStarted() ), SIGNAL( loadingStarted() ) );
|
||||||
connect( m_model, SIGNAL( loadingFinished() ), SIGNAL( loadingFinished() ) );
|
connect( m_model, SIGNAL( loadingFinished() ), SIGNAL( loadingFinished() ) );
|
||||||
}
|
}
|
||||||
|
@@ -45,13 +45,6 @@ PlayableProxyModelPlaylistInterface::~PlayableProxyModelPlaylistInterface()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
PlayableProxyModelPlaylistInterface::unfilteredTrackCount() const
|
|
||||||
{
|
|
||||||
return ( m_proxyModel.isNull() ? 0 : m_proxyModel.data()->sourceModel()->trackCount() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
PlayableProxyModelPlaylistInterface::trackCount() const
|
PlayableProxyModelPlaylistInterface::trackCount() const
|
||||||
{
|
{
|
||||||
|
@@ -41,7 +41,6 @@ public:
|
|||||||
|
|
||||||
virtual QList<Tomahawk::query_ptr> tracks();
|
virtual QList<Tomahawk::query_ptr> tracks();
|
||||||
|
|
||||||
virtual int unfilteredTrackCount() const;
|
|
||||||
virtual int trackCount() const;
|
virtual int trackCount() const;
|
||||||
|
|
||||||
virtual Tomahawk::result_ptr currentItem() const;
|
virtual Tomahawk::result_ptr currentItem() const;
|
||||||
|
@@ -56,16 +56,6 @@ TreeProxyModelPlaylistInterface::filter() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
TreeProxyModelPlaylistInterface::unfilteredTrackCount() const
|
|
||||||
{
|
|
||||||
if ( m_proxyModel.isNull() )
|
|
||||||
return 0;
|
|
||||||
TreeProxyModel* proxyModel = m_proxyModel.data();
|
|
||||||
return proxyModel->sourceModel()->rowCount( QModelIndex() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
TreeProxyModelPlaylistInterface::trackCount() const
|
TreeProxyModelPlaylistInterface::trackCount() const
|
||||||
{
|
{
|
||||||
|
@@ -41,7 +41,6 @@ public:
|
|||||||
|
|
||||||
virtual QList< Tomahawk::query_ptr > tracks() { Q_ASSERT( FALSE ); QList< Tomahawk::query_ptr > queries; return queries; }
|
virtual QList< Tomahawk::query_ptr > tracks() { Q_ASSERT( FALSE ); QList< Tomahawk::query_ptr > queries; return queries; }
|
||||||
|
|
||||||
virtual int unfilteredTrackCount() const;
|
|
||||||
virtual int trackCount() const;
|
virtual int trackCount() const;
|
||||||
|
|
||||||
virtual bool hasNextItem();
|
virtual bool hasNextItem();
|
||||||
|
@@ -54,7 +54,6 @@ public:
|
|||||||
|
|
||||||
// Any one is fine, we keep them all synched
|
// Any one is fine, we keep them all synched
|
||||||
virtual PlaylistModes::RepeatMode repeatMode() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->repeatMode(); }
|
virtual PlaylistModes::RepeatMode repeatMode() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->repeatMode(); }
|
||||||
|
|
||||||
virtual bool shuffled() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->shuffled(); }
|
virtual bool shuffled() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->shuffled(); }
|
||||||
|
|
||||||
// Do nothing
|
// Do nothing
|
||||||
@@ -62,7 +61,6 @@ public:
|
|||||||
virtual Tomahawk::result_ptr siblingItem( int ) { return Tomahawk::result_ptr(); }
|
virtual Tomahawk::result_ptr siblingItem( int ) { return Tomahawk::result_ptr(); }
|
||||||
virtual int trackCount() const { return 0; }
|
virtual int trackCount() const { return 0; }
|
||||||
virtual QList< Tomahawk::query_ptr > tracks() { return QList< Tomahawk::query_ptr >(); }
|
virtual QList< Tomahawk::query_ptr > tracks() { return QList< Tomahawk::query_ptr >(); }
|
||||||
virtual int unfilteredTrackCount() const { return 0; }
|
|
||||||
|
|
||||||
virtual bool hasChildInterface( Tomahawk::playlistinterface_ptr other )
|
virtual bool hasChildInterface( Tomahawk::playlistinterface_ptr other )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user