1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-05 00:22:31 +02:00

* Remove shuffle & repeat mode slots & signals from ViewManager.

This commit is contained in:
Christian Muehlhaeuser 2013-01-03 19:59:52 +01:00
parent f7f054ed1a
commit 7fa21a38e5
2 changed files with 0 additions and 50 deletions

View File

@ -524,8 +524,6 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
if ( page == m_currentPage )
return;
unlinkPlaylist();
if ( m_stack->indexOf( page->widget() ) < 0 )
{
m_stack->addWidget( page->widget() );
@ -589,35 +587,12 @@ ViewManager::isNewPlaylistPageVisible() const
}
void
ViewManager::unlinkPlaylist()
{
if ( currentPlaylistInterface() )
{
disconnect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ),
this, SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
disconnect( currentPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ),
this, SIGNAL( shuffleModeChanged( bool ) ) );
}
}
void
ViewManager::updateView()
{
if ( currentPlaylistInterface() )
{
connect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ),
SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) );
connect( currentPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ),
SIGNAL( shuffleModeChanged( bool ) ) );
m_infobar->setFilter( currentPage()->filter() );
emit repeatModeChanged( currentPlaylistInterface()->repeatMode() );
emit shuffleModeChanged( currentPlaylistInterface()->shuffled() );
}
/* if ( currentPage()->queueVisible() )
@ -686,24 +661,6 @@ ViewManager::onWidgetDestroyed( QWidget* widget )
}
void
ViewManager::setRepeatMode( Tomahawk::PlaylistModes::RepeatMode mode )
{
if ( currentPlaylistInterface() )
currentPlaylistInterface()->setRepeatMode( mode );
}
void
ViewManager::setShuffled( bool enabled )
{
if ( currentPlaylistInterface() )
{
currentPlaylistInterface()->setShuffled( enabled );
}
}
void
ViewManager::createPlaylist( const Tomahawk::source_ptr& src, const QVariant& contents )
{

View File

@ -108,9 +108,6 @@ public:
bool isTomahawkLoaded() const { return m_loaded; }
signals:
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
void shuffleModeChanged( bool enabled );
void filterAvailable( bool b );
void playClicked();
@ -154,9 +151,6 @@ public slots:
void showQueue() { emit showQueueRequested(); }
void hideQueue() { emit hideQueueRequested(); }
void setRepeatMode( Tomahawk::PlaylistModes::RepeatMode mode );
void setShuffled( bool enabled );
void playlistInterfaceChanged( Tomahawk::playlistinterface_ptr );
// called by the playlist creation dbcmds
@ -174,7 +168,6 @@ private slots:
private:
void setPage( Tomahawk::ViewPage* page, bool trackHistory = true );
void updateView();
void unlinkPlaylist();
Tomahawk::playlist_ptr playlistForInterface( Tomahawk::playlistinterface_ptr plInterface ) const;
Tomahawk::dynplaylist_ptr dynamicPlaylistForInterface( Tomahawk::playlistinterface_ptr plInterface ) const;