void PlayableItemWidget::onRadioChanged( const RadioStation& station ) { if ( station == m_rs ) { // This is the current radio station if ( !station.title().isEmpty() ) setText( station.title() ); } else { // this is not the current radio station } }
void PlaybackControlsWidget::onTuningIn( const RadioStation& station ) { setScrobbleTrack( false ); ui->status->setText( tr("Tuning...") ); ui->device->setText( station.title() ); ui->play->setChecked( true ); aApp->playAction()->setChecked( true ); if ( !m_movie ) { m_movie = new QMovie( ":/loading_radio.gif", "GIF", this ); m_movie->setCacheMode( QMovie::CacheAll ); } ui->icon->setMovie( m_movie ); m_movie->start(); ui->progressBar->setTrack( Track() ); aApp->playAction()->setEnabled( true ); aApp->loveAction()->setEnabled( false ); aApp->banAction()->setEnabled( false ); aApp->skipAction()->setEnabled( false ); aApp->tagAction()->setEnabled( false ); aApp->shareAction()->setEnabled( false ); ui->controls->show(); }