15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "Phoneindicatorinterface.h" |
18 #include "Phoneindicatorinterface.h" |
19 #include "phoneindicators.h" |
19 #include "phoneindicators.h" |
|
20 |
20 #include <QTime> |
21 #include <QTime> |
21 #include <QStringList> |
22 #include <QStringList> |
22 #ifdef Q_OS_SYMBIAN |
23 #ifdef Q_OS_SYMBIAN |
23 #include <logsservices.h> |
24 #include <logsservices.h> |
24 #include <xqservicerequest.h> |
25 #include <xqservicerequest.h> |
|
26 #include <eikenv.h> |
|
27 #include <apgtask.h> |
|
28 |
25 #endif |
29 #endif |
26 |
30 |
27 PhoneIndicatorInterface::PhoneIndicatorInterface( |
31 PhoneIndicatorInterface::PhoneIndicatorInterface( |
28 const QString &indicatorType, |
32 const QString &indicatorType, |
29 int typeIndex, |
33 int typeIndex, |
30 Interaction interaction) : |
34 Interaction interaction) : |
31 HbIndicatorInterface( indicatorType, IndicatorInfos[typeIndex].priority, |
35 HbIndicatorInterface( indicatorType, HbIndicatorInterface::NotificationCategory, |
32 (interaction == InteractionNone) ? NoInteraction : InteractionActivated), |
36 (interaction == InteractionNone) ? NoInteraction : InteractionActivated), |
33 m_typeIndex(typeIndex), |
37 m_typeIndex(typeIndex), |
34 m_interaction(interaction), |
38 m_interaction(interaction), |
35 m_primaryText(IndicatorInfos[typeIndex].primaryText), |
39 m_primaryText(IndicatorInfos[typeIndex].primaryText), |
36 m_secondaryText(IndicatorInfos[typeIndex].secondaryText), |
40 m_secondaryText(IndicatorInfos[typeIndex].secondaryText), |
79 |
93 |
80 if (role == PrimaryTextRole) { |
94 if (role == PrimaryTextRole) { |
81 return map.value( (QVariant(PrimaryTextRole)).toString()).toString(); |
95 return map.value( (QVariant(PrimaryTextRole)).toString()).toString(); |
82 } else if (role == SecondaryTextRole ) { |
96 } else if (role == SecondaryTextRole ) { |
83 return map.value( (QVariant(SecondaryTextRole)).toString()).toString(); |
97 return map.value( (QVariant(SecondaryTextRole)).toString()).toString(); |
84 } else if (role == IconNameRole) { |
98 } else if (role == MonoDecorationNameRole) { |
85 return m_icon; |
99 return m_icon; |
86 } else if (role == DecorationNameRole) { |
100 } else if (role == DecorationNameRole) { |
87 return map.value( (QVariant(DecorationNameRole)).toString()).toString(); |
101 return map.value( (QVariant(DecorationNameRole)).toString()).toString(); |
88 } |
102 } |
89 return QVariant(); |
103 return QVariant(); |