phoneplugins/phoneindicatorplugin/inc/phoneindicators.h
changeset 30 ebdbd102c78a
parent 27 2f8f8080a020
child 51 f39ed5e045e0
equal deleted inserted replaced
27:2f8f8080a020 30:ebdbd102c78a
    27 
    27 
    28 enum Interaction
    28 enum Interaction
    29 {
    29 {
    30     InteractionNone,
    30     InteractionNone,
    31     OpenMissedCallView,
    31     OpenMissedCallView,
       
    32     SwitchBackToCall,
    32     Deactivate
    33     Deactivate
    33 };
    34 };
    34 
    35 
    35 enum PhoneIndicatorTypes
    36 enum PhoneIndicatorTypes
    36 {
    37 {
    37     PhoneMissedCallIndicator = 0
    38     PhoneMissedCallIndicator = 0,
       
    39     PhoneActiveCallIndicator
    38 };
    40 };
    39 
    41 
    40 inline QString indicatorName(int indicatorType) {
    42 inline QString indicatorName(int indicatorType) {
    41     return QString(IndicatorNameTemplate).arg(indicatorType);
    43     return QString(IndicatorNameTemplate).arg(indicatorType);
    42 }
    44 }
    44 struct PhoneIndicatorInfo
    46 struct PhoneIndicatorInfo
    45 {
    47 {
    46     const char *icon;
    48     const char *icon;
    47     const char *primaryText;
    49     const char *primaryText;
    48     const char *secondaryText;
    50     const char *secondaryText;
    49     HbIndicatorInterface::GroupPriority priority;
       
    50     Interaction interaction;
    51     Interaction interaction;
    51 };
    52 };
    52 
    53 
    53 Q_DECLARE_METATYPE(PhoneIndicatorInfo)
    54 Q_DECLARE_METATYPE(PhoneIndicatorInfo)
    54 
    55 
    55 static const int PhoneIndicatorCount = 1;
    56 static const int PhoneIndicatorCount = 2;
    56 static const PhoneIndicatorInfo IndicatorInfos[PhoneIndicatorCount] = {
    57 static const PhoneIndicatorInfo IndicatorInfos[PhoneIndicatorCount] = {
    57     {"qtg_mono_info.svg",   "Missed call", "Name/Number", HbIndicatorInterface::GroupPriorityHigh, OpenMissedCallView } // TODO: change icon
    58     {"qtg_mono_info.svg",   "Missed call", "Name/Number", OpenMissedCallView },
       
    59     {"qtg_mono_info.svg",   "Active call", " ", SwitchBackToCall }
    58 };
    60 };
    59 
    61 
    60 #endif // PHONEINDICATORS_H
    62 #endif // PHONEINDICATORS_H