author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:33:45 +0100 | |
branch | GCC_SURGE |
changeset 37 | 451b2e1545b2 |
parent 19 | afea38384506 |
parent 33 | 11b6825f0862 |
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 |
#ifndef RADIOSTATIONSVIEW_H |
|
19 |
#define RADIOSTATIONSVIEW_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 RadioWindow; |
|
30 |
class RadioStationModel; |
|
31 |
class HbListView; |
|
32 |
class HbPushButton; |
|
33 |
class HbAbstractViewItem; |
|
34 |
class RadioUiLoader; |
|
35 |
class RadioStation; |
|
36 |
class RadioStationFilterModel; |
|
37 |
class RadioFrequencyScanner; |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
38 |
class QSortFilterProxyModel; |
24 | 39 |
|
40 |
// Class declaration |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
41 |
class RadioStationsView : public RadioViewBase |
24 | 42 |
{ |
43 |
Q_OBJECT |
|
44 |
Q_PROPERTY(HbIcon nowPlayingIcon READ nowPlayingIcon WRITE setNowPlayingIcon) |
|
45 |
Q_PROPERTY(HbIcon favoriteIcon READ favoriteIcon WRITE setFavoriteIcon) |
|
46 |
||
47 |
public: |
|
48 |
||
49 |
explicit RadioStationsView(); |
|
50 |
~RadioStationsView(); |
|
51 |
||
52 |
void setNowPlayingIcon( const HbIcon& nowPlayingIcon ); |
|
53 |
HbIcon nowPlayingIcon() const; |
|
54 |
||
55 |
void setFavoriteIcon( const HbIcon& favoriteIcon ); |
|
56 |
HbIcon favoriteIcon() const; |
|
57 |
||
58 |
private slots: |
|
59 |
||
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
60 |
void handleClick( const QModelIndex& index ); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
61 |
void handleLongPress( HbAbstractViewItem* item, const QPointF& coords ); |
24 | 62 |
void updateAntennaStatus( bool connected ); |
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
63 |
void updateViewMode(); |
24 | 64 |
void startScanning(); |
65 |
void finishScanning(); |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
66 |
void updateVisibilities(); |
24 | 67 |
void clearList(); |
33
11b6825f0862
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
32
diff
changeset
|
68 |
void play(); // Called from context menu |
24 | 69 |
void rename(); // Called from context menu |
70 |
void toggleFavorite(); // Called from context menu |
|
71 |
void deleteStation(); // Called from context menu |
|
72 |
void renameDone( HbAction* action ); |
|
73 |
||
74 |
private: |
|
75 |
||
76 |
// from base class RadioViewBase |
|
77 |
||
78 |
void init(); |
|
79 |
void userAccepted(); |
|
80 |
||
81 |
// New functions |
|
82 |
||
83 |
void initListView(); |
|
84 |
||
85 |
private: //data |
|
86 |
||
87 |
RadioStationModel* mModel; |
|
88 |
||
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
89 |
QSortFilterProxyModel* mFilterModel; |
24 | 90 |
|
91 |
HbAction* mScanStationsAction; |
|
92 |
HbAction* mClearListAction; |
|
93 |
||
94 |
HbListView* mStationsList; |
|
95 |
||
96 |
HbAction* mFavoritesButton; |
|
97 |
HbAction* mLocalStationsButton; |
|
98 |
||
99 |
HbIcon mFavoriteIcon; |
|
100 |
HbIcon mNowPlayingIcon; |
|
101 |
||
102 |
QScopedPointer<RadioStation> mSelectedStation; |
|
103 |
||
104 |
QScopedPointer<RadioFrequencyScanner> mFrequencyScanner; |
|
105 |
||
106 |
enum UserQuestion { NoQuestion, DeleteStation, StartScanning, ClearList }; |
|
107 |
UserQuestion mCurrentQuestion; |
|
108 |
||
109 |
}; |
|
110 |
||
111 |
#endif // RADIOSTATIONSVIEW_H |