1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-26 07:14:47 +02:00

handle failing stations

Show setup when station is over
This commit is contained in:
Leo Franchi
2011-02-12 21:48:21 -05:00
parent 4a47053533
commit 46f3f4377a
2 changed files with 14 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
m_layout->addWidget( m_view, 1 );
connect( m_model, SIGNAL( collapseFromTo( int, int ) ), m_view, SLOT( collapseEntries( int, int ) ) );
connect( m_model, SIGNAL( trackGenerationFailure( QString ) ), m_view, SLOT( showMessage( QString ) ) );
connect( m_model, SIGNAL( trackGenerationFailure( QString ) ), this, SLOT( stationFailed( QString ) ) );
m_setup = new DynamicSetupWidget( playlist, this );
@@ -227,6 +227,17 @@ DynamicWidget::generate( int num )
}
}
void
DynamicWidget::stationFailed( const QString& msg )
{
m_view->showMessage( msg );
if( m_runningOnDemand ) {
stopStation();
}
}
void
DynamicWidget::pausePressed()
{
@@ -256,6 +267,7 @@ DynamicWidget::stopStation()
// TODO until i add a qwidget interface
QMetaObject::invokeMethod( m_steering, "fadeOut", Qt::DirectConnection );
m_setup->fadeIn();
}
void

View File

@@ -81,6 +81,7 @@ public slots:
void playPressed();
void pausePressed();
void stationFailed( const QString& );
private slots:
void generate( int = -1 );