mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-24 01:39:42 +01:00
* Removed obsolete 'unfilteredTrackCount' PlaylistInterface method / signal.
This commit is contained in:
parent
2278f5d668
commit
392197608f
@ -43,7 +43,6 @@ public:
|
||||
QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
virtual int trackCount() const { return m_queries.count(); }
|
||||
virtual int unfilteredTrackCount() const { return m_queries.count(); }
|
||||
|
||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
||||
|
||||
|
@ -42,7 +42,6 @@ public:
|
||||
virtual QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
virtual int trackCount() const { return m_queries.count(); }
|
||||
virtual int unfilteredTrackCount() const { return m_queries.count(); }
|
||||
|
||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
||||
|
||||
|
@ -42,7 +42,6 @@ public:
|
||||
virtual QList< Tomahawk::query_ptr > tracks() = 0;
|
||||
virtual bool isFinished() const { return m_finished; }
|
||||
|
||||
virtual int unfilteredTrackCount() const = 0;
|
||||
virtual int trackCount() const = 0;
|
||||
|
||||
virtual Tomahawk::result_ptr currentItem() const = 0;
|
||||
@ -78,10 +77,9 @@ public slots:
|
||||
virtual void setShuffled( bool enabled ) = 0;
|
||||
|
||||
signals:
|
||||
void trackCountChanged( unsigned int tracks );
|
||||
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
||||
void shuffleModeChanged( bool enabled );
|
||||
void trackCountChanged( unsigned int tracks );
|
||||
void sourceTrackCountChanged( unsigned int tracks );
|
||||
void latchModeChanged( Tomahawk::PlaylistModes::LatchMode mode );
|
||||
void nextTrackReady();
|
||||
|
||||
|
@ -40,13 +40,6 @@ PlaylistPlaylistInterface::~PlaylistPlaylistInterface()
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
PlaylistPlaylistInterface::unfilteredTrackCount() const
|
||||
{
|
||||
return ( m_playlist.isNull() ? 0 : m_playlist.data()->entries().count() );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
PlaylistPlaylistInterface::trackCount() const
|
||||
{
|
||||
|
@ -44,7 +44,6 @@ public:
|
||||
|
||||
virtual QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
virtual int unfilteredTrackCount() const;
|
||||
virtual int trackCount() const;
|
||||
|
||||
virtual bool hasNextItem() { return false; }
|
||||
|
@ -42,7 +42,6 @@ public:
|
||||
QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
virtual int trackCount() const { return 1; }
|
||||
virtual int unfilteredTrackCount() const { return 1; }
|
||||
|
||||
virtual Tomahawk::result_ptr siblingItem( int itemsAway );
|
||||
virtual bool sourceValid();
|
||||
|
@ -189,8 +189,6 @@ ViewManager::show( const Tomahawk::playlist_ptr& playlist )
|
||||
}
|
||||
|
||||
setPage( view );
|
||||
emit numSourcesChanged( SourceList::instance()->count() );
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@ -212,8 +210,6 @@ ViewManager::show( const Tomahawk::dynplaylist_ptr& playlist )
|
||||
else
|
||||
showQueue();*/
|
||||
|
||||
emit numSourcesChanged( SourceList::instance()->count() );
|
||||
|
||||
return m_dynamicWidgets.value( playlist ).data();
|
||||
}
|
||||
|
||||
@ -352,8 +348,6 @@ ViewManager::show( const Tomahawk::collection_ptr& collection )
|
||||
setPage( aview );
|
||||
}
|
||||
|
||||
emit numSourcesChanged( 1 );
|
||||
|
||||
return shown;
|
||||
}
|
||||
|
||||
@ -422,8 +416,6 @@ ViewManager::showSuperCollection()
|
||||
setPage( m_superGridView );
|
||||
}
|
||||
|
||||
emit numSourcesChanged( m_superCollections.count() );
|
||||
|
||||
return shown;
|
||||
}
|
||||
|
||||
@ -723,17 +715,11 @@ ViewManager::unlinkPlaylist()
|
||||
{
|
||||
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 ) ),
|
||||
this, SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
|
||||
this, SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
|
||||
|
||||
disconnect( currentPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ),
|
||||
this, SIGNAL( shuffleModeChanged( bool ) ) );
|
||||
this, SIGNAL( shuffleModeChanged( bool ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -766,12 +752,6 @@ ViewManager::updateView()
|
||||
{
|
||||
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 ) ),
|
||||
SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
|
||||
|
||||
@ -783,13 +763,6 @@ ViewManager::updateView()
|
||||
|
||||
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 shuffleModeChanged( currentPlaylistInterface()->shuffled() );
|
||||
emit modeChanged( currentPlaylistInterface()->viewMode() );
|
||||
|
@ -110,11 +110,6 @@ public:
|
||||
bool isTomahawkLoaded() const { return m_loaded; }
|
||||
|
||||
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 shuffleModeChanged( bool enabled );
|
||||
|
||||
|
@ -75,9 +75,6 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel )
|
||||
{
|
||||
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( loadingFinished() ), this, SIGNAL( loadingFinished() ) );
|
||||
}
|
||||
@ -86,9 +83,6 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel )
|
||||
|
||||
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( loadingFinished() ), SIGNAL( loadingFinished() ) );
|
||||
}
|
||||
|
@ -45,13 +45,6 @@ PlayableProxyModelPlaylistInterface::~PlayableProxyModelPlaylistInterface()
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
PlayableProxyModelPlaylistInterface::unfilteredTrackCount() const
|
||||
{
|
||||
return ( m_proxyModel.isNull() ? 0 : m_proxyModel.data()->sourceModel()->trackCount() );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
PlayableProxyModelPlaylistInterface::trackCount() const
|
||||
{
|
||||
|
@ -41,7 +41,6 @@ public:
|
||||
|
||||
virtual QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
virtual int unfilteredTrackCount() const;
|
||||
virtual int trackCount() 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
|
||||
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 int unfilteredTrackCount() const;
|
||||
virtual int trackCount() const;
|
||||
|
||||
virtual bool hasNextItem();
|
||||
|
@ -54,7 +54,6 @@ public:
|
||||
|
||||
// Any one is fine, we keep them all synched
|
||||
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(); }
|
||||
|
||||
// Do nothing
|
||||
@ -62,7 +61,6 @@ public:
|
||||
virtual Tomahawk::result_ptr siblingItem( int ) { return Tomahawk::result_ptr(); }
|
||||
virtual int trackCount() const { return 0; }
|
||||
virtual QList< Tomahawk::query_ptr > tracks() { return QList< Tomahawk::query_ptr >(); }
|
||||
virtual int unfilteredTrackCount() const { return 0; }
|
||||
|
||||
virtual bool hasChildInterface( Tomahawk::playlistinterface_ptr other )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user