author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 14:16:27 +0300 | |
changeset 33 | 11b6825f0862 |
parent 32 | 189d20c34778 |
child 36 | ba22309243a1 |
child 37 | 451b2e1545b2 |
permissions | -rw-r--r-- |
24 | 1 |
/* |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
// System includes |
|
19 |
#include <HbListView> |
|
20 |
#include <HbAction> |
|
21 |
#include <HbAbstractViewItem> |
|
22 |
#include <HbMenu> |
|
23 |
#include <HbMessageBox> |
|
24 |
||
25 |
// User includes |
|
26 |
#include "radiohistoryview.h" |
|
27 |
#include "radiowindow.h" |
|
28 |
#include "radiologger.h" |
|
29 |
#include "radiouiloader.h" |
|
30 |
#include "radiouiengine.h" |
|
31 |
#include "radiohistorymodel.h" |
|
32 |
#include "radiohistoryitem.h" |
|
33 |
||
34 |
// BEGIN TEMPORARY TEST CODE CODE |
|
35 |
#include <QTimer> |
|
36 |
#include "radiostationmodel.h" |
|
37 |
||
38 |
struct Song |
|
39 |
{ |
|
40 |
const char* mArtist; |
|
41 |
const char* mTitle; |
|
42 |
}; |
|
43 |
const Song KRecognizedSongs[] = { |
|
44 |
{ "Red Hot Chili Peppers", "Under The Bridge" }, |
|
45 |
{ "Queens Of The Stone Age", "No One Knows" }, |
|
46 |
{ "The Presidents of the United States of America", "Dune Buggy" }, |
|
47 |
{ "System of a Down", "Aerials" }, |
|
48 |
{ "The White Stripes", "Seven Nation Army" }, |
|
49 |
{ "Alice In Chains", "When The Sun Rose Again" }, |
|
50 |
{ "Bullet For My Valentine", "Tears Don't Fall" } |
|
51 |
}; |
|
52 |
const int KSongsCount = sizeof( KRecognizedSongs ) / sizeof( KRecognizedSongs[0] ); |
|
53 |
// END TEMPORARY TEST CODE CODE |
|
54 |
||
55 |
/*! |
|
56 |
* |
|
57 |
*/ |
|
58 |
RadioHistoryView::RadioHistoryView() : |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
59 |
RadioViewBase(), |
24 | 60 |
mHistoryList( 0 ), |
61 |
mAllSongsButton( 0 ), |
|
62 |
mTaggedSongsButton( 0 ), |
|
63 |
mSelectedItem( new RadioHistoryItem() ), |
|
64 |
mCurrentRow( -1 ), |
|
65 |
mSongIndex( 0 ) |
|
66 |
{ |
|
67 |
} |
|
68 |
||
69 |
/*! |
|
70 |
* |
|
71 |
*/ |
|
72 |
RadioHistoryView::~RadioHistoryView() |
|
73 |
{ |
|
74 |
} |
|
75 |
||
76 |
/*! |
|
77 |
* |
|
78 |
*/ |
|
79 |
void RadioHistoryView::setNonTaggedIcon( const HbIcon& nonTaggedIcon ) |
|
80 |
{ |
|
81 |
mNonTaggedIcon = nonTaggedIcon; |
|
82 |
mNonTaggedIcon.setColor( Qt::white ); |
|
83 |
} |
|
84 |
||
85 |
/*! |
|
86 |
* |
|
87 |
*/ |
|
88 |
HbIcon RadioHistoryView::nonTaggedIcon() const |
|
89 |
{ |
|
90 |
return mNonTaggedIcon; |
|
91 |
} |
|
92 |
||
93 |
/*! |
|
94 |
* |
|
95 |
*/ |
|
96 |
void RadioHistoryView::setTaggedIcon( const HbIcon& taggedIcon ) |
|
97 |
{ |
|
98 |
mTaggedIcon = taggedIcon; |
|
99 |
} |
|
100 |
||
101 |
/*! |
|
102 |
* |
|
103 |
*/ |
|
104 |
HbIcon RadioHistoryView::taggedIcon() const |
|
105 |
{ |
|
106 |
return mTaggedIcon; |
|
107 |
} |
|
108 |
||
109 |
/*! |
|
110 |
* Private slot |
|
111 |
* |
|
112 |
*/ |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
113 |
void RadioHistoryView::updateViewMode() |
24 | 114 |
{ |
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
115 |
QString section = DOCML::HV_SECTION_HISTORY_MODE; |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
116 |
bool showTagged = false; |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
117 |
|
24 | 118 |
if ( sender() == mTaggedSongsButton ) { |
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
119 |
section = DOCML::HV_SECTION_FAVORITE_MODE; |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
120 |
showTagged = true; |
24 | 121 |
} |
122 |
||
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
123 |
loadSection( DOCML::FILE_HISTORYVIEW, section ); |
24 | 124 |
historyModel().setShowTagged( showTagged ); |
125 |
||
126 |
updateVisibilities(); |
|
127 |
} |
|
128 |
||
129 |
/*! |
|
130 |
* Private slot |
|
131 |
* |
|
132 |
*/ |
|
133 |
void RadioHistoryView::clearList() |
|
134 |
{ |
|
135 |
const bool showingTagged = mTaggedSongsButton->isChecked(); |
|
136 |
askQuestion( hbTrId( showingTagged ? "txt_rad_info_clear_tagged_songs_list" : |
|
137 |
"txt_rad_info_clear_recently_played_songs_list" ) ); |
|
138 |
} |
|
139 |
||
140 |
/*! |
|
141 |
* Private slot |
|
142 |
* |
|
143 |
*/ |
|
144 |
void RadioHistoryView::updateVisibilities() |
|
145 |
{ |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
146 |
const int itemCount = mUiEngine->historyModel().rowCount(); |
24 | 147 |
loadSection( DOCML::FILE_HISTORYVIEW, itemCount ? DOCML::HV_SECTION_SHOW_LIST : DOCML::HV_SECTION_HIDE_LIST ); |
148 |
} |
|
149 |
||
150 |
/*! |
|
151 |
* Private slot |
|
152 |
* |
|
153 |
*/ |
|
154 |
void RadioHistoryView::showContextMenu( const QModelIndex& index ) |
|
155 |
{ |
|
156 |
*mSelectedItem = historyModel().itemAtIndex( index ); |
|
157 |
mCurrentRow = index.row(); |
|
158 |
||
159 |
HbMenu* menu = mUiLoader->findObject<HbMenu>( DOCML::HV_NAME_CONTEXT_MENU ); |
|
160 |
||
161 |
if ( HbAction* tagAction = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_CONTEXT_TAG ) ) { |
|
162 |
if ( mSelectedItem->isTagged() ) { |
|
163 |
tagAction->setText( hbTrId( "txt_rad_menu_remove_tag" ) ); |
|
164 |
} else { |
|
165 |
tagAction->setText( hbTrId( "txt_rad_menu_tag_song" ) ); |
|
166 |
} |
|
167 |
} |
|
168 |
||
169 |
if ( HbAction* searchAction = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_CONTEXT_SEARCH ) ) { |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
170 |
//TODO: Add support for other music store |
24 | 171 |
searchAction->setVisible( false ); |
172 |
} |
|
173 |
||
174 |
HbAbstractViewItem* item = mHistoryList->itemByIndex( index ); |
|
175 |
QPointF coords = item->pos(); |
|
176 |
coords.setY( mHistoryList->contentWidget()->pos().y() + coords.y() ); |
|
177 |
menu->setPreferredPos( QPointF( size().width() / 2 - menu->size().width() / 2, coords.y() + menu->size().height() / 2 ) ); |
|
178 |
||
179 |
menu->show(); |
|
180 |
} |
|
181 |
||
182 |
/*! |
|
183 |
* Private slot |
|
184 |
* |
|
185 |
*/ |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
186 |
void RadioHistoryView::handleLongPress( HbAbstractViewItem* item ) |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
187 |
{ |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
188 |
showContextMenu( item->modelIndex() ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
189 |
} |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
190 |
|
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
191 |
/*! |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
192 |
* Private slot |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
193 |
* |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
194 |
*/ |
24 | 195 |
void RadioHistoryView::toggleTagging() |
196 |
{ |
|
197 |
historyModel().toggleTagging( *mSelectedItem, mCurrentRow ); |
|
198 |
mSelectedItem->reset(); |
|
199 |
mCurrentRow = -1; |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
200 |
updateVisibilities(); |
24 | 201 |
} |
202 |
||
203 |
/*! |
|
204 |
* Private slot |
|
205 |
* |
|
206 |
*/ |
|
207 |
void RadioHistoryView::openOviStore() |
|
208 |
{ |
|
209 |
QString msg = "To be implemented: Open ovi store. Artist: %1, Title: %2"; |
|
210 |
HbMessageBox::information( msg.arg( mSelectedItem->artist() ).arg( mSelectedItem->title() ) ); |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
211 |
mUiEngine->openMusicStore( *mSelectedItem ); |
24 | 212 |
} |
213 |
||
214 |
/*! |
|
215 |
* Private slot |
|
216 |
* |
|
217 |
*/ |
|
218 |
void RadioHistoryView::openOtherStore() |
|
219 |
{ |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
220 |
mUiEngine->openMusicStore( *mSelectedItem, RadioUiEngine::OtherStore ); |
24 | 221 |
} |
222 |
||
223 |
/*! |
|
224 |
* Private slot |
|
225 |
* TEMPORARY TEST CODE |
|
226 |
*/ |
|
227 |
void RadioHistoryView::addSongs() |
|
228 |
{ |
|
229 |
for ( int i = 0; i < KSongsCount; ++i ) { |
|
230 |
QTimer::singleShot( 1000 + i * 1500, this, SLOT(addOneSong()) ); |
|
231 |
} |
|
232 |
} |
|
233 |
||
234 |
/*! |
|
235 |
* Private slot |
|
236 |
* TEMPORARY TEST CODE |
|
237 |
*/ |
|
238 |
void RadioHistoryView::addOneSong() |
|
239 |
{ |
|
240 |
Song song = KRecognizedSongs[mSongIndex++]; |
|
241 |
mSongIndex %= KSongsCount; |
|
242 |
||
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
243 |
RadioStation station = mUiEngine->stationModel().currentStation(); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
244 |
mUiEngine->historyModel().addItem( song.mArtist, song.mTitle, station ); |
24 | 245 |
} |
246 |
||
247 |
/*! |
|
248 |
* \reimp |
|
249 |
* |
|
250 |
*/ |
|
251 |
void RadioHistoryView::init() |
|
252 |
{ |
|
253 |
LOG_METHOD; |
|
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
254 |
loadSection( DOCML::FILE_HISTORYVIEW, DOCML::SECTION_LAZY_LOAD ); |
24 | 255 |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
256 |
RadioHistoryModel* historyModel = &mUiEngine->historyModel(); |
24 | 257 |
historyModel->setShowDetails( mOrientation == Qt::Horizontal ); |
258 |
||
259 |
if ( !mNonTaggedIcon.isNull() && !mTaggedIcon.isNull() ) { |
|
260 |
historyModel->setIcons( mNonTaggedIcon.qicon(), mTaggedIcon.qicon() ); |
|
261 |
} |
|
262 |
||
263 |
mHistoryList = mUiLoader->findObject<HbListView>( DOCML::HV_NAME_HISTORY_LIST ); |
|
264 |
mHistoryList->setScrollingStyle( HbListView::PanOrFlick ); |
|
265 |
mHistoryList->setModel( historyModel ); |
|
266 |
mHistoryList->setSelectionMode( HbListView::NoSelection ); |
|
267 |
mHistoryList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); |
|
268 |
||
269 |
mAllSongsButton = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_ALL_SONGS_BUTTON ); |
|
270 |
mTaggedSongsButton = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_TAGGED_SONGS_BUTTON ); |
|
271 |
||
272 |
if ( HbAction* clearListAction = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_CLEAR_LIST_ACTION ) ) { |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
273 |
Radio::connect( clearListAction, SIGNAL(triggered()), |
24 | 274 |
this, SLOT(clearList()) ); |
275 |
} |
|
276 |
||
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
277 |
Radio::connect( mTaggedSongsButton, SIGNAL(triggered()), |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
278 |
this, SLOT(updateViewMode()) ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
279 |
Radio::connect( mAllSongsButton, SIGNAL(triggered()), |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
280 |
this, SLOT(updateViewMode()) ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
281 |
Radio::connect( historyModel, SIGNAL(itemAdded()), |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
282 |
this, SLOT(updateVisibilities()) ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
283 |
Radio::connect( mHistoryList, SIGNAL(activated(QModelIndex)), |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
284 |
this, SLOT(showContextMenu(QModelIndex)) ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
285 |
Radio::connect( mHistoryList, SIGNAL(longPressed(HbAbstractViewItem*,QPointF)), |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
286 |
this, SLOT(handleLongPress(HbAbstractViewItem*)) ); |
24 | 287 |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
288 |
connectCommonMenuItem( MenuItem::Exit ); |
24 | 289 |
connectCommonMenuItem( MenuItem::UseLoudspeaker ); |
290 |
||
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
291 |
// Context menu actions |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
292 |
connectXmlElement( DOCML::HV_NAME_TOGGLE_TAG_ACTION, SIGNAL(triggered()), |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
293 |
this, SLOT(toggleTagging()) ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
294 |
connectXmlElement( DOCML::HV_NAME_OVI_STORE_ACTION, SIGNAL(triggered()), |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
295 |
this, SLOT(openOviStore()) ); |
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
296 |
connectXmlElement( DOCML::HV_NAME_OTHER_STORE_ACTION, SIGNAL(triggered()), |
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
297 |
this, SLOT(openOtherStore()) ); |
24 | 298 |
initBackAction(); |
299 |
||
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
300 |
updateViewMode(); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
301 |
|
24 | 302 |
// BEGIN TEMPORARY TEST CODE |
303 |
if ( HbAction* addSongsAction = mUiLoader->findObject<HbAction>( "hv:add_songs_action" ) ) { |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
304 |
Radio::connect( addSongsAction, SIGNAL(triggered()), |
24 | 305 |
this, SLOT(addSongs()) ); |
306 |
} |
|
307 |
// END TEMPORARY TEST CODE |
|
308 |
} |
|
309 |
||
310 |
/*! |
|
311 |
* \reimp |
|
312 |
* |
|
313 |
*/ |
|
314 |
void RadioHistoryView::setOrientation() |
|
315 |
{ |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
316 |
if ( mUiEngine ) { |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
317 |
RadioHistoryModel& model = mUiEngine->historyModel(); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
318 |
model.setShowDetails( mOrientation == Qt::Horizontal ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
319 |
} |
24 | 320 |
} |
321 |
||
322 |
/*! |
|
323 |
* \reimp |
|
324 |
* |
|
325 |
*/ |
|
326 |
void RadioHistoryView::userAccepted() |
|
327 |
{ |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
328 |
const bool removeTagged = mTaggedSongsButton->isChecked(); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
329 |
mUiEngine->historyModel().removeAll( removeTagged ); |
24 | 330 |
updateVisibilities(); |
331 |
} |
|
332 |
||
333 |
/*! |
|
334 |
* |
|
335 |
*/ |
|
336 |
RadioHistoryModel& RadioHistoryView::historyModel() const |
|
337 |
{ |
|
338 |
return *static_cast<RadioHistoryModel*>( mHistoryList->model() ); |
|
339 |
} |