1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 19:30:21 +02:00

Add UI to auto-update and save/restore state

This commit is contained in:
Leo Franchi
2011-10-12 10:20:55 -04:00
parent 31a9c75c08
commit 9556414bf5
16 changed files with 231 additions and 31 deletions

View File

@@ -109,6 +109,7 @@ ViewManager::ViewManager( QObject* parent )
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( applyFilter() ) );
connect( m_infobar, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) );
connect( m_infobar, SIGNAL( autoUpdateChanged( int ) ), SLOT( autoUpdateChanged( int ) ) );
/* connect( m_infobar, SIGNAL( flatMode() ), SLOT( setTableMode() ) );
connect( m_infobar, SIGNAL( artistMode() ), SLOT( setTreeMode() ) );
connect( m_infobar, SIGNAL( albumMode() ), SLOT( setAlbumMode() ) );*/
@@ -506,6 +507,13 @@ ViewManager::applyFilter()
}
void
ViewManager::autoUpdateChanged( int state )
{
currentPage()->setAutoUpdate( state == Qt::Checked );
}
void
ViewManager::setPage( ViewPage* page, bool trackHistory )
{
@@ -656,6 +664,8 @@ ViewManager::updateView()
emit modesAvailable( currentPage()->showModes() );
emit filterAvailable( currentPage()->showFilter() );
emit autoUpdateAvailable( currentPage()->canAutoUpdate() );
/* if ( !currentPage()->showStatsBar() && !currentPage()->showModes() && !currentPage()->showFilter() )
m_topbar->setVisible( false );
else