diff -r e14766a36cdc -r c44f9bb56771 radioapp/radiouiengine/src/radiomonitorservice.cpp --- a/radioapp/radiouiengine/src/radiomonitorservice.cpp Thu Sep 02 20:26:56 2010 +0300 +++ b/radioapp/radiouiengine/src/radiomonitorservice.cpp Fri Sep 17 08:29:29 2010 +0300 @@ -71,10 +71,18 @@ void RadioMonitorService::init() { RadioStationModel* stationModel = &mUiEngine.api().stationModel(); + Radio::connect( stationModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(notifyFavoriteCount()) ); + Radio::connect( stationModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(notifyLocalCount()) ); Radio::connect( stationModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(notifyFavoriteCount()) ); + Radio::connect( stationModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(notifyLocalCount()) ); Radio::connect( stationModel, SIGNAL(favoriteChanged(RadioStation)), this, SLOT(notifyFavoriteCount()) ); + Radio::connect( stationModel, SIGNAL(favoriteChanged(RadioStation)), + this, SLOT(notifyLocalCount()) ); Radio::connect( stationModel, SIGNAL(stationDataChanged(RadioStation)), this, SLOT(notifyStationChange(RadioStation)) ); Radio::connect( stationModel, SIGNAL(radioTextReceived(RadioStation)), @@ -126,6 +134,9 @@ notification.setValue( RadioNotificationData( RadioServiceNotification::FavoriteCount, stationModel.favoriteCount() ) ); notificationList.append( notification ); + notification.setValue( RadioNotificationData( RadioServiceNotification::LocalCount, stationModel.localCount() ) ); + notificationList.append( notification ); + notification.setValue( RadioNotificationData( RadioServiceNotification::Frequency, RadioStation::parseFrequency( station.frequency() ) ) ); notificationList.append( notification ); @@ -194,6 +205,16 @@ * Private slot * */ +void RadioMonitorService::notifyLocalCount() +{ + const int localCount = mUiEngine.api().stationModel().localCount(); + RUN_NOTIFY( LocalCount, localCount ); +} + +/*! + * Private slot + * + */ void RadioMonitorService::notifyStationChange( const RadioStation& station ) { RadioUiEngine& uiEngine = mUiEngine.api();