|
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: TarmTrust Indicator implementation |
|
15 * |
|
16 */ |
|
17 #include "tarmtrustindicator.h" |
|
18 #include "dmindicator.h" |
|
19 #include <QByteArray> |
|
20 #include <QVariant> |
|
21 #include <dmindicatorconsts.h> |
|
22 |
|
23 // ---------------------------------------------------------------------------- |
|
24 // TarmTrustIndicator::TarmTrustIndicator |
|
25 // @see tarmtrustindicator.h |
|
26 // ---------------------------------------------------------------------------- |
|
27 TarmTrustIndicator::TarmTrustIndicator(const QString &indicatorType, |
|
28 HbIndicatorInterface::Category category, |
|
29 HbIndicatorInterface::InteractionTypes interactionTypes) : |
|
30 DMIndicator(indicatorType, category, interactionTypes) |
|
31 { |
|
32 } |
|
33 |
|
34 // ---------------------------------------------------------------------------- |
|
35 // TarmTrustIndicator::~TarmTrustIndicator |
|
36 // @see tarmtrustindicator.h |
|
37 // ---------------------------------------------------------------------------- |
|
38 TarmTrustIndicator::~TarmTrustIndicator() |
|
39 { |
|
40 } |
|
41 |
|
42 // ---------------------------------------------------------------------------- |
|
43 // TarmTrustIndicator::indicatorData |
|
44 // @see tarmtrustindicator.h |
|
45 // ---------------------------------------------------------------------------- |
|
46 QVariant TarmTrustIndicator::indicatorData(int role) const |
|
47 { |
|
48 qDebug("TarmTrustIndicator::indicatorData()"); |
|
49 switch (role) |
|
50 { |
|
51 case MonoDecorationNameRole: |
|
52 { |
|
53 QString StringText = mParameter.toString(); |
|
54 QString iconName; |
|
55 if (StringText == KTarmTrustManagementActive) |
|
56 { |
|
57 qDebug("TarmTrustIndicator::indicatorData() Management Active"); |
|
58 //iconName = "C:/resource/devicemanagement/message1.svg"; |
|
59 iconName = "message1"; |
|
60 } |
|
61 else if (StringText == KTarmTrustTerminalSecurity) |
|
62 { |
|
63 qDebug("TarmTrustIndicator::indicatorData() Terminal Security"); |
|
64 //iconName = "C:/resource/devicemanagement/qtg_small_smiley_kissing.svg"; |
|
65 iconName = "qtg_small_smiley_kissing"; |
|
66 } |
|
67 |
|
68 return iconName; |
|
69 } |
|
70 default: |
|
71 return QVariant(); |
|
72 |
|
73 } |
|
74 } |
|
75 |