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 RADIOMAINVIEW_H |
|
19 #define RADIOMAINVIEW_H |
|
20 |
|
21 // System includes |
|
22 #include <QScopedPointer> |
|
23 |
|
24 // User includes |
|
25 #include "radioviewbase.h" |
|
26 |
|
27 // Forward declarations |
|
28 class RadioWindow; |
|
29 class RadioStationModel; |
|
30 class HbPushButton; |
|
31 class RadioUiLoader; |
|
32 class RadioFrequencyScanner; |
|
33 class RadioStationCarousel; |
|
34 class RadioFrequencyStrip; |
|
35 class RadioStation; |
|
36 |
|
37 // Class declaration |
|
38 class RadioMainView : public RadioViewBase |
|
39 { |
|
40 Q_OBJECT |
|
41 |
|
42 public: |
|
43 |
|
44 explicit RadioMainView(); |
|
45 ~RadioMainView(); |
|
46 |
|
47 void setScanningMode( bool scanning ); |
|
48 |
|
49 signals: |
|
50 |
|
51 void applicationReady(); |
|
52 |
|
53 private slots: |
|
54 |
|
55 void setFrequencyFromWidget( uint frequency, int reason, int direction ); |
|
56 void setFrequencyFromEngine( uint frequency, int reason ); |
|
57 void skip( int skipMode ); |
|
58 void openStationsView(); |
|
59 void startFirstTimeScanning(); |
|
60 void toggleScanning(); |
|
61 void toggleFavorite(); |
|
62 void seekingStarted(); |
|
63 void updateAntennaStatus( bool connected ); |
|
64 void updateAudioRoute( bool loudspeaker ); |
|
65 void setManualSeekMode( bool manualSeekActive ); |
|
66 void handleFavoriteChange( const RadioStation& station ); |
|
67 void saveActivity(); |
|
68 |
|
69 private: |
|
70 |
|
71 // from base class RadioViewBase |
|
72 |
|
73 void preLazyLoadInit(); |
|
74 void init(); |
|
75 void setOrientation(); |
|
76 void userAccepted(); |
|
77 |
|
78 // from base class QObject |
|
79 |
|
80 bool eventFilter( QObject* watched, QEvent* event ); |
|
81 |
|
82 // New functions |
|
83 |
|
84 void updateFavoriteButton(); |
|
85 |
|
86 private: // data |
|
87 |
|
88 QScopedPointer<RadioFrequencyScanner> mFrequencyScanner; |
|
89 RadioStationCarousel* mCarousel; |
|
90 RadioFrequencyStrip* mFrequencyStrip; |
|
91 |
|
92 HbAction* mSkippingAction; //TODO: Remove. Temporary test code |
|
93 bool mAlternateSkipping; //TODO: Remove. Temporary test code |
|
94 |
|
95 }; |
|
96 |
|
97 #endif // RADIOMAINVIEW_H |
|