radioapp/radiouiengine/src/radiomonitorservice.cpp
changeset 53 bb6ed1806599
parent 50 c44f9bb56771
child 57 21be958eb3ce
equal deleted inserted replaced
50:c44f9bb56771 53:bb6ed1806599
   125     const RadioStation station = stationModel.currentStation();
   125     const RadioStation station = stationModel.currentStation();
   126 
   126 
   127     QVariantList notificationList;
   127     QVariantList notificationList;
   128     QVariant notification;
   128     QVariant notification;
   129 
   129 
       
   130     notification.setValue( RadioNotificationData( RadioServiceNotification::Region, mUiEngine.api().region() ) );
       
   131     notificationList.append( notification );
       
   132 
   130     RadioStatus::Status radioStatus = determineRadioStatus();
   133     RadioStatus::Status radioStatus = determineRadioStatus();
   131     notification.setValue( RadioNotificationData( RadioServiceNotification::RadioStatus, radioStatus ) );
   134     notification.setValue( RadioNotificationData( RadioServiceNotification::RadioStatus, radioStatus ) );
   132     notificationList.append( notification );
   135     notificationList.append( notification );
   133 
   136 
   134     notification.setValue( RadioNotificationData( RadioServiceNotification::FavoriteCount, stationModel.favoriteCount() ) );
   137     notification.setValue( RadioNotificationData( RadioServiceNotification::FavoriteCount, stationModel.favoriteCount() ) );
   144         notification.setValue( RadioNotificationData( RadioServiceNotification::Name, station.name() ) );
   147         notification.setValue( RadioNotificationData( RadioServiceNotification::Name, station.name() ) );
   145         notificationList.append( notification );
   148         notificationList.append( notification );
   146     }
   149     }
   147 
   150 
   148     if ( station.genre() > 0 ) {
   151     if ( station.genre() > 0 ) {
   149         notification.setValue( RadioNotificationData( RadioServiceNotification::Genre,
   152         notification.setValue( RadioNotificationData( RadioServiceNotification::Genre, station.genre() ) );
   150                         mUiEngine.api().genreToString( station.genre(), GenreTarget::HomeScreen ) ) );
       
   151         notificationList.append( notification );
   153         notificationList.append( notification );
   152     }
   154     }
   153 
   155 
   154     if ( !station.radioText().isEmpty() ) {
   156     if ( !station.radioText().isEmpty() ) {
   155         const QString trimmedRadioText = trimHtmlTags( station.radioText() );
   157         const QString trimmedRadioText = trimHtmlTags( station.radioText() );
   224 
   226 
   225     QVariantList list;
   227     QVariantList list;
   226     QVariant notification;
   228     QVariant notification;
   227 
   229 
   228     if ( station.hasDataChanged( RadioStation::GenreChanged ) ) {
   230     if ( station.hasDataChanged( RadioStation::GenreChanged ) ) {
   229         const QString genre = uiEngine.genreToString( station.genre(), GenreTarget::HomeScreen );
   231         notification.setValue( RadioNotificationData( RadioServiceNotification::Genre, station.genre() ) );
   230         notification.setValue( RadioNotificationData( RadioServiceNotification::Genre, genre ) );
       
   231         list.append( notification );
   232         list.append( notification );
   232     }
   233     }
   233 
   234 
   234     if ( station.hasDataChanged( RadioStation::DynamicPsChanged ) ) {
   235     if ( station.hasDataChanged( RadioStation::DynamicPsChanged ) ) {
   235         notification.setValue( RadioNotificationData( RadioServiceNotification::DynamicPS, station.dynamicPsText() ) );
   236         notification.setValue( RadioNotificationData( RadioServiceNotification::DynamicPS, station.dynamicPsText() ) );