equal
deleted
inserted
replaced
93 { |
93 { |
94 return mFavoriteIcon; |
94 return mFavoriteIcon; |
95 } |
95 } |
96 |
96 |
97 /*! |
97 /*! |
|
98 * |
|
99 */ |
|
100 void RadioStationsView::setNonFavoriteIcon( const HbIcon& nonFavoriteIcon ) |
|
101 { |
|
102 mNonFavoriteIcon = nonFavoriteIcon; |
|
103 } |
|
104 |
|
105 /*! |
|
106 * |
|
107 */ |
|
108 HbIcon RadioStationsView::nonFavoriteIcon() const |
|
109 { |
|
110 return mNonFavoriteIcon; |
|
111 } |
|
112 |
|
113 /*! |
98 * Private slot |
114 * Private slot |
99 * |
115 * |
100 */ |
116 */ |
101 void RadioStationsView::handleClick( const QModelIndex& index ) |
117 void RadioStationsView::handleClick( const QModelIndex& index ) |
102 { |
118 { |
301 mFilterModel->setFilterRole( RadioRole::IsFavoriteRole ); |
317 mFilterModel->setFilterRole( RadioRole::IsFavoriteRole ); |
302 mFilterModel->setSourceModel( &mUiEngine->stationModel() ); |
318 mFilterModel->setSourceModel( &mUiEngine->stationModel() ); |
303 |
319 |
304 loadSection( DOCML::FILE_STATIONSVIEW, DOCML::SV_SECTION_SHOW_ALL_STATIONS ); |
320 loadSection( DOCML::FILE_STATIONSVIEW, DOCML::SV_SECTION_SHOW_ALL_STATIONS ); |
305 |
321 |
306 if ( !mFavoriteIcon.isNull() && !mNowPlayingIcon.isNull() ) { |
322 if ( !mFavoriteIcon.isNull() && !mNonFavoriteIcon.isNull() && !mNowPlayingIcon.isNull() ) { |
307 mModel->setIcons( mFavoriteIcon.qicon(), mNowPlayingIcon.qicon() ); |
323 mModel->setIcons( mFavoriteIcon.qicon(), mNonFavoriteIcon.qicon(), mNowPlayingIcon.qicon() ); |
308 } |
324 } |
309 mModel->setDetail( RadioStationModel::ShowIcons | RadioStationModel::ShowGenre ); |
325 mModel->setDetail( RadioStationModel::ShowIcons | RadioStationModel::ShowGenre ); |
310 |
326 |
311 mStationsList = mUiLoader->findObject<HbListView>( DOCML::SV_NAME_STATIONS_LIST ); |
327 mStationsList = mUiLoader->findObject<HbListView>( DOCML::SV_NAME_STATIONS_LIST ); |
312 mFavoritesButton = mUiLoader->findObject<HbAction>( DOCML::SV_NAME_FAVORITES_BUTTON ); |
328 mFavoritesButton = mUiLoader->findObject<HbAction>( DOCML::SV_NAME_FAVORITES_BUTTON ); |
392 { |
408 { |
393 mStationsList->setScrollingStyle( HbListView::PanOrFlick ); |
409 mStationsList->setScrollingStyle( HbListView::PanOrFlick ); |
394 mStationsList->setModel( mFilterModel ); |
410 mStationsList->setModel( mFilterModel ); |
395 mStationsList->setSelectionMode( HbListView::NoSelection ); |
411 mStationsList->setSelectionMode( HbListView::NoSelection ); |
396 mStationsList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); |
412 mStationsList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); |
397 //TODO: Uncomment after MCL wk28 release to improve scrolling FPS rate |
413 mStationsList->setItemPixmapCacheEnabled( true ); // Improves scrolling FPS rate |
398 //mStationsList->setItemPixmapCacheEnabled( true ); |
414 } |
399 } |
|