|
1 /*! |
|
2 * Copyright (c) 2010 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: Handles phone indicators. |
|
15 */ |
|
16 |
|
17 #ifndef PHONEINDICATORCONTROLLER_H_ |
|
18 #define PHONEINDICATORCONTROLLER_H_ |
|
19 |
|
20 |
|
21 #include <QObject> |
|
22 #include <xqsettingsmanager.h> |
|
23 #include <hbindicator.h> |
|
24 |
|
25 // FORWARD DECLARATION |
|
26 class LogsModel; |
|
27 class LogsFilter; |
|
28 class XQSettingsKey; |
|
29 class XQAiwRequest; |
|
30 class PhoneVisibilityHandler; |
|
31 |
|
32 class PhoneIndicatorController : public QObject |
|
33 { |
|
34 Q_OBJECT |
|
35 public: |
|
36 PhoneIndicatorController( |
|
37 PhoneVisibilityHandler& visibilityHandler, |
|
38 QObject *parent = 0); |
|
39 virtual ~PhoneIndicatorController(); |
|
40 |
|
41 void setActiveCallData(); |
|
42 void clearActiveCallData(); |
|
43 void enableActiveCallIndicator(); |
|
44 void disableActiveCallIndicator(); |
|
45 |
|
46 private slots: |
|
47 void updateMissedCallIndicator(const XQSettingsKey &key, const QVariant &value); |
|
48 void updateDivertIndicator(const XQSettingsKey &key, const QVariant &value); |
|
49 void setMissedallIndicatorData(); |
|
50 void handleInteraction(QString type,QVariantMap data); |
|
51 |
|
52 private: |
|
53 void updateDiverIndicator(bool activeDiverts); |
|
54 inline bool compareKeys(const XQSettingsKey &first, const XQSettingsKey &second); |
|
55 |
|
56 private: |
|
57 HbIndicator m_indicator; |
|
58 LogsModel *m_logsModel; |
|
59 LogsFilter *m_missedCallsFilter; |
|
60 XQSettingsManager *m_setManager; |
|
61 |
|
62 QString m_cli; |
|
63 QString m_callImage; |
|
64 XQAiwRequest* m_request; |
|
65 PhoneVisibilityHandler& m_phoneVisibilityHandler; |
|
66 }; |
|
67 |
|
68 #endif /* PHONEINDICATORCONTROLLER_H_ */ |