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 _RADIOUIUTILITIES_H_ |
|
19 #define _RADIOUIUTILITIES_H_ |
|
20 |
|
21 // System includes |
|
22 #include <QPointer> |
|
23 |
|
24 // Forward declarations |
|
25 class RadioFrequencyStrip; |
|
26 class RadioStationCarousel; |
|
27 class RadioFrequencyScanner; |
|
28 |
|
29 struct EffectInfo |
|
30 { |
|
31 EffectInfo( QGraphicsItem* item, QString path, QString event ) : |
|
32 mItem( item ), |
|
33 mPath( path ), |
|
34 mEvent( event ) |
|
35 {} |
|
36 |
|
37 QGraphicsItem* mItem; |
|
38 QString mPath; |
|
39 QString mEvent; |
|
40 |
|
41 private: |
|
42 EffectInfo(); |
|
43 }; |
|
44 typedef QList<EffectInfo> QEffectList; |
|
45 |
|
46 // Class declaration |
|
47 class RadioUiUtilities |
|
48 { |
|
49 public: |
|
50 |
|
51 static bool addEffects( QEffectList list ); |
|
52 |
|
53 static RadioFrequencyStrip* frequencyStrip(); |
|
54 static RadioStationCarousel* carousel(); |
|
55 static bool isScannerAlive(); |
|
56 |
|
57 static void setFrequencyStrip( RadioFrequencyStrip* frequencyStrip ); |
|
58 static void setCarousel( RadioStationCarousel* carousel ); |
|
59 static void setFrequencyScanner( RadioFrequencyScanner* scanner ); |
|
60 |
|
61 private: |
|
62 |
|
63 RadioUiUtilities(); |
|
64 ~RadioUiUtilities(); |
|
65 |
|
66 static RadioUiUtilities& instance(); |
|
67 |
|
68 private: // data |
|
69 |
|
70 QPointer<RadioFrequencyStrip> mFrequencyStrip; |
|
71 |
|
72 QPointer<RadioStationCarousel> mCarousel; |
|
73 |
|
74 QPointer<RadioFrequencyScanner> mScanner; |
|
75 |
|
76 }; |
|
77 |
|
78 |
|
79 #endif // _RADIOUIUTILITIES_H_ |
|