equal
deleted
inserted
replaced
194 * Private slot |
194 * Private slot |
195 * |
195 * |
196 */ |
196 */ |
197 void RadioHistoryView::toggleTagging() |
197 void RadioHistoryView::toggleTagging() |
198 { |
198 { |
199 historyModel().toggleTagging( *mSelectedItem, mCurrentRow ); |
199 bool favoriteMode = mTaggedSongsButton->isChecked(); |
200 mSelectedItem->reset(); |
200 if ( favoriteMode ) { |
201 mCurrentRow = -1; |
201 HbMessageBox::question( hbTrId( "txt_rad_info_remove_song_from_tagged_songs" ), this, |
202 updateVisibilities(); |
202 SLOT(handleRemoveTag(HbAction*)), HbMessageBox::Yes | HbMessageBox::No ); |
203 } |
203 |
|
204 } else { |
|
205 historyModel().toggleTagging( *mSelectedItem, mCurrentRow ); |
|
206 mSelectedItem->reset(); |
|
207 mCurrentRow = -1; |
|
208 updateVisibilities(); |
|
209 } |
|
210 } |
|
211 |
|
212 /*! |
|
213 * Private slot |
|
214 * |
|
215 */ |
|
216 void RadioHistoryView::handleRemoveTag( HbAction* answer ) |
|
217 { |
|
218 HbDialog* dlg = static_cast<HbDialog*>( sender() ); |
|
219 if( dlg->actions().first() == answer ) { |
|
220 historyModel().toggleTagging( *mSelectedItem, mCurrentRow ); |
|
221 mSelectedItem->reset(); |
|
222 mCurrentRow = -1; |
|
223 updateVisibilities(); |
|
224 } else { |
|
225 // Do Nothing |
|
226 } |
|
227 } |
|
228 |
204 |
229 |
205 /*! |
230 /*! |
206 * Private slot |
231 * Private slot |
207 * |
232 * |
208 */ |
233 */ |
261 if ( !mNonTaggedIcon.isNull() && !mTaggedIcon.isNull() ) { |
286 if ( !mNonTaggedIcon.isNull() && !mTaggedIcon.isNull() ) { |
262 historyModel->setIcons( mNonTaggedIcon.qicon(), mTaggedIcon.qicon() ); |
287 historyModel->setIcons( mNonTaggedIcon.qicon(), mTaggedIcon.qicon() ); |
263 } |
288 } |
264 |
289 |
265 mHistoryList = mUiLoader->findObject<HbListView>( DOCML::HV_NAME_HISTORY_LIST ); |
290 mHistoryList = mUiLoader->findObject<HbListView>( DOCML::HV_NAME_HISTORY_LIST ); |
266 mHistoryList->setScrollingStyle( HbListView::PanOrFlick ); |
291 mHistoryList->setScrollingStyle( HbListView::PanWithFollowOn ); |
267 mHistoryList->setModel( historyModel ); |
292 mHistoryList->setModel( historyModel ); |
268 mHistoryList->setSelectionMode( HbListView::NoSelection ); |
293 mHistoryList->setSelectionMode( HbListView::NoSelection ); |
269 mHistoryList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); |
294 mHistoryList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); |
270 mHistoryList->setItemPixmapCacheEnabled( true ); // Improves scrolling FPS rate |
295 mHistoryList->setItemPixmapCacheEnabled( true ); // Improves scrolling FPS rate |
271 |
296 |
351 this, SLOT(openOviStore()) ); |
376 this, SLOT(openOviStore()) ); |
352 |
377 |
353 // TODO: Get additional music stores. For now use "Amazon" for demonstration purposes |
378 // TODO: Get additional music stores. For now use "Amazon" for demonstration purposes |
354 const QString otherStoreFormatter = hbTrId( "txt_rad_menu_search_from_other_store" ); |
379 const QString otherStoreFormatter = hbTrId( "txt_rad_menu_search_from_other_store" ); |
355 if ( HbMenu* contextMenu = mUiLoader->findObject<HbMenu>( DOCML::HV_NAME_CONTEXT_MENU ) ) { |
380 if ( HbMenu* contextMenu = mUiLoader->findObject<HbMenu>( DOCML::HV_NAME_CONTEXT_MENU ) ) { |
|
381 contextMenu->setParent( this ); |
356 contextMenu->addAction( otherStoreFormatter.arg( "Amazon" ), this, SLOT(openOtherStore()) ); |
382 contextMenu->addAction( otherStoreFormatter.arg( "Amazon" ), this, SLOT(openOtherStore()) ); |
357 } |
383 } |
358 } |
384 } |
359 |
385 |
360 /*! |
386 /*! |