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 #ifndef RADIOHISTORYVIEW_H |
|
19 #define RADIOHISTORYVIEW_H |
|
20 |
|
21 // System includes |
|
22 #include <HbIcon> |
|
23 #include <QScopedPointer> |
|
24 |
|
25 // User includes |
|
26 #include "radioviewbase.h" |
|
27 |
|
28 // Forward declarations |
|
29 class RadioXmlUiLoader; |
|
30 class HbListView; |
|
31 class HbAction; |
|
32 class HbAbstractViewItem; |
|
33 class RadioHistoryModel; |
|
34 class RadioHistoryItem; |
|
35 |
|
36 // Class declaration |
|
37 class RadioHistoryView : public RadioViewBase |
|
38 { |
|
39 Q_OBJECT |
|
40 Q_PROPERTY(HbIcon nonTaggedIcon READ nonTaggedIcon WRITE setNonTaggedIcon) |
|
41 Q_PROPERTY(HbIcon taggedIcon READ taggedIcon WRITE setTaggedIcon) |
|
42 |
|
43 public: |
|
44 |
|
45 RadioHistoryView(); |
|
46 ~RadioHistoryView(); |
|
47 |
|
48 void setNonTaggedIcon( const HbIcon& nonTaggedIcon ); |
|
49 HbIcon nonTaggedIcon() const; |
|
50 |
|
51 void setTaggedIcon( const HbIcon& taggedIcon ); |
|
52 HbIcon taggedIcon() const; |
|
53 |
|
54 private slots: |
|
55 |
|
56 void updateViewMode(); |
|
57 void clearList(); |
|
58 void updateVisibilities(); |
|
59 void showContextMenu( const QModelIndex& index ); |
|
60 void handleLongPress( HbAbstractViewItem* item ); |
|
61 void toggleTagging(); |
|
62 void openOviStore(); |
|
63 void openOtherStore(); |
|
64 void addSongs(); // Temporary test code |
|
65 void addOneSong(); // Temporary test code |
|
66 |
|
67 private: |
|
68 |
|
69 // from base class RadioViewBase |
|
70 |
|
71 void init(); |
|
72 void setOrientation(); |
|
73 void userAccepted(); |
|
74 |
|
75 // New functions |
|
76 |
|
77 RadioHistoryModel& historyModel() const; |
|
78 |
|
79 private: //data |
|
80 |
|
81 HbListView* mHistoryList; |
|
82 HbAction* mAllSongsButton; |
|
83 HbAction* mTaggedSongsButton; |
|
84 QScopedPointer<RadioHistoryItem> mSelectedItem; |
|
85 int mCurrentRow; |
|
86 HbIcon mNonTaggedIcon; |
|
87 HbIcon mTaggedIcon; |
|
88 |
|
89 int mSongIndex; // Temporary test variable |
|
90 |
|
91 }; |
|
92 |
|
93 #endif // RADIOHISTORYVIEW_H |
|