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 RADIOFREQUENCYSTRIP_H |
|
19 #define RADIOFREQUENCYSTRIP_H |
|
20 |
|
21 // User includes |
|
22 #include "radiofrequencystripbase.h" |
|
23 #include "radio_global.h" |
|
24 #include "radiowidgetsexport.h" |
|
25 |
|
26 // Forward declarations |
|
27 class RadioUiEngine; |
|
28 class RadioStation; |
|
29 class RadioUiLoader; |
|
30 |
|
31 typedef QList<RadioStation> StationList; |
|
32 |
|
33 // Class declaration |
|
34 class WIDGETS_DLL_EXPORT RadioFrequencyStrip : public RadioFrequencyStripBase |
|
35 { |
|
36 Q_OBJECT |
|
37 |
|
38 public: |
|
39 |
|
40 RadioFrequencyStrip(); |
|
41 |
|
42 void init( RadioUiEngine* engine, RadioUiLoader& uiLoader ); |
|
43 |
|
44 void setFrequency( const uint newFrequency, int reason, Scroll::Direction direction = Scroll::Shortest ); |
|
45 |
|
46 signals: |
|
47 |
|
48 void frequencyChanged( uint frequency, int reason, int direction ); |
|
49 void skipRequested( int skipMode ); |
|
50 void seekRequested( int seekDirection ); |
|
51 |
|
52 private: |
|
53 |
|
54 // from base class RadioFrequencyStripBase |
|
55 |
|
56 bool isInitialized() const; |
|
57 QList<FrequencyStrip::StationMarker> stationsInRange( uint minFrequency, uint maxFrequency ) const; |
|
58 void emitFrequencyChanged( uint frequency, int reason, int direction ); |
|
59 void skipToPrevious(); |
|
60 void skipToPreviousFavorite(); |
|
61 void skipToNext(); |
|
62 void skipToNextFavorite(); |
|
63 void seekDown(); |
|
64 void seekUp(); |
|
65 bool isScanning() const; |
|
66 uint frequencyAtIndex( int index ) const; |
|
67 |
|
68 private: // data |
|
69 |
|
70 RadioUiEngine* mUiEngine; |
|
71 |
|
72 }; |
|
73 |
|
74 #endif // RADIOFREQUENCYSTRIP_H |
|