mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-02 12:20:45 +02:00
* Remove shuffle & repeat mode slots & signals from ViewManager.
This commit is contained in:
@@ -524,8 +524,6 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
|
|||||||
if ( page == m_currentPage )
|
if ( page == m_currentPage )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unlinkPlaylist();
|
|
||||||
|
|
||||||
if ( m_stack->indexOf( page->widget() ) < 0 )
|
if ( m_stack->indexOf( page->widget() ) < 0 )
|
||||||
{
|
{
|
||||||
m_stack->addWidget( page->widget() );
|
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
|
void
|
||||||
ViewManager::updateView()
|
ViewManager::updateView()
|
||||||
{
|
{
|
||||||
if ( currentPlaylistInterface() )
|
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() );
|
m_infobar->setFilter( currentPage()->filter() );
|
||||||
|
|
||||||
emit repeatModeChanged( currentPlaylistInterface()->repeatMode() );
|
|
||||||
emit shuffleModeChanged( currentPlaylistInterface()->shuffled() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if ( currentPage()->queueVisible() )
|
/* 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
|
void
|
||||||
ViewManager::createPlaylist( const Tomahawk::source_ptr& src, const QVariant& contents )
|
ViewManager::createPlaylist( const Tomahawk::source_ptr& src, const QVariant& contents )
|
||||||
{
|
{
|
||||||
|
@@ -108,9 +108,6 @@ public:
|
|||||||
bool isTomahawkLoaded() const { return m_loaded; }
|
bool isTomahawkLoaded() const { return m_loaded; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
|
|
||||||
void shuffleModeChanged( bool enabled );
|
|
||||||
|
|
||||||
void filterAvailable( bool b );
|
void filterAvailable( bool b );
|
||||||
|
|
||||||
void playClicked();
|
void playClicked();
|
||||||
@@ -154,9 +151,6 @@ public slots:
|
|||||||
void showQueue() { emit showQueueRequested(); }
|
void showQueue() { emit showQueueRequested(); }
|
||||||
void hideQueue() { emit hideQueueRequested(); }
|
void hideQueue() { emit hideQueueRequested(); }
|
||||||
|
|
||||||
void setRepeatMode( Tomahawk::PlaylistModes::RepeatMode mode );
|
|
||||||
void setShuffled( bool enabled );
|
|
||||||
|
|
||||||
void playlistInterfaceChanged( Tomahawk::playlistinterface_ptr );
|
void playlistInterfaceChanged( Tomahawk::playlistinterface_ptr );
|
||||||
|
|
||||||
// called by the playlist creation dbcmds
|
// called by the playlist creation dbcmds
|
||||||
@@ -174,7 +168,6 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void setPage( Tomahawk::ViewPage* page, bool trackHistory = true );
|
void setPage( Tomahawk::ViewPage* page, bool trackHistory = true );
|
||||||
void updateView();
|
void updateView();
|
||||||
void unlinkPlaylist();
|
|
||||||
|
|
||||||
Tomahawk::playlist_ptr playlistForInterface( Tomahawk::playlistinterface_ptr plInterface ) const;
|
Tomahawk::playlist_ptr playlistForInterface( Tomahawk::playlistinterface_ptr plInterface ) const;
|
||||||
Tomahawk::dynplaylist_ptr dynamicPlaylistForInterface( Tomahawk::playlistinterface_ptr plInterface ) const;
|
Tomahawk::dynplaylist_ptr dynamicPlaylistForInterface( Tomahawk::playlistinterface_ptr plInterface ) const;
|
||||||
|
Reference in New Issue
Block a user