mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-26 15:25:04 +02:00
handle failing stations
Show setup when station is over
This commit is contained in:
@@ -65,7 +65,7 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
|
|||||||
m_layout->addWidget( m_view, 1 );
|
m_layout->addWidget( m_view, 1 );
|
||||||
|
|
||||||
connect( m_model, SIGNAL( collapseFromTo( int, int ) ), m_view, SLOT( collapseEntries( int, int ) ) );
|
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 );
|
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
|
void
|
||||||
DynamicWidget::pausePressed()
|
DynamicWidget::pausePressed()
|
||||||
{
|
{
|
||||||
@@ -256,6 +267,7 @@ DynamicWidget::stopStation()
|
|||||||
|
|
||||||
// TODO until i add a qwidget interface
|
// TODO until i add a qwidget interface
|
||||||
QMetaObject::invokeMethod( m_steering, "fadeOut", Qt::DirectConnection );
|
QMetaObject::invokeMethod( m_steering, "fadeOut", Qt::DirectConnection );
|
||||||
|
m_setup->fadeIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -81,6 +81,7 @@ public slots:
|
|||||||
|
|
||||||
void playPressed();
|
void playPressed();
|
||||||
void pausePressed();
|
void pausePressed();
|
||||||
|
void stationFailed( const QString& );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void generate( int = -1 );
|
void generate( int = -1 );
|
||||||
|
Reference in New Issue
Block a user