|
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: FM Radio widget profile reader |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef RADIOHSWIDGETPROFILEREADER_H_ |
|
19 #define RADIOHSWIDGETPROFILEREADER_H_ |
|
20 |
|
21 // System includes |
|
22 #include <QObject> |
|
23 #include <QVariant> |
|
24 |
|
25 // Forward declarations |
|
26 class RadioHsWidget; |
|
27 class XQSettingsManager; |
|
28 class XQSettingsKey; |
|
29 |
|
30 class RadioHsWidgetProfileReader : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 explicit RadioHsWidgetProfileReader(RadioHsWidget *parent = 0); |
|
36 virtual ~RadioHsWidgetProfileReader(); |
|
37 |
|
38 void startMonitoringRadioRunningStatus(); |
|
39 |
|
40 bool isCurrentProfileOffline(); |
|
41 |
|
42 signals: |
|
43 //void profileChanged(int profile); |
|
44 //void radioRunning(const QVariant &state); |
|
45 |
|
46 public slots: |
|
47 void handleDeletedItem(const XQSettingsKey &key); |
|
48 void handleChanges(const XQSettingsKey &key, const QVariant &value); |
|
49 |
|
50 private slots: |
|
51 //void currentProfileStatus(const QVariant &value); |
|
52 |
|
53 private: |
|
54 void radioRunningStatus(const QVariant &value); |
|
55 |
|
56 private: // data |
|
57 /*! |
|
58 Stores the reference to parent. This is used to call parents |
|
59 functions when notifications are received. |
|
60 */ |
|
61 RadioHsWidget &mParent; |
|
62 /*! For getting values and notifications of changes from P&S keys. */ |
|
63 XQSettingsManager *mSettingsManager; |
|
64 /*! |
|
65 Stores internally the status of radio application read from the P&S |
|
66 key. |
|
67 */ |
|
68 int mRadioStatus; |
|
69 }; |
|
70 |
|
71 #endif /* RADIOHSWIDGETPROFILEREADER_H_ */ |