37
|
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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef PHONEINDICATORS_H
|
|
19 |
#define PHONEINDICATORS_H
|
|
20 |
|
|
21 |
#include <hbindicatorinterface.h>
|
|
22 |
#include <QObject>
|
|
23 |
#include <QString>
|
|
24 |
|
|
25 |
|
|
26 |
static const char *IndicatorNameTemplate = "PhoneIndicator_%1";
|
|
27 |
|
|
28 |
enum Interaction
|
|
29 |
{
|
|
30 |
InteractionNone,
|
|
31 |
OpenMissedCallView,
|
|
32 |
SwitchBackToCall,
|
|
33 |
Deactivate
|
|
34 |
};
|
|
35 |
|
|
36 |
enum PhoneIndicatorTypes
|
|
37 |
{
|
|
38 |
PhoneMissedCallIndicator = 0,
|
|
39 |
PhoneActiveCallIndicator
|
|
40 |
};
|
|
41 |
|
|
42 |
inline QString indicatorName(int indicatorType) {
|
|
43 |
return QString(IndicatorNameTemplate).arg(indicatorType);
|
|
44 |
}
|
|
45 |
|
|
46 |
struct PhoneIndicatorInfo
|
|
47 |
{
|
|
48 |
const char *icon;
|
|
49 |
const char *primaryText;
|
|
50 |
const char *secondaryText;
|
|
51 |
Interaction interaction;
|
|
52 |
};
|
|
53 |
|
|
54 |
Q_DECLARE_METATYPE(PhoneIndicatorInfo)
|
|
55 |
|
|
56 |
static const int PhoneIndicatorCount = 2;
|
|
57 |
static const PhoneIndicatorInfo IndicatorInfos[PhoneIndicatorCount] = {
|
|
58 |
{"qtg_mono_info.svg", "Missed call", "Name/Number", OpenMissedCallView },
|
|
59 |
{"qtg_mono_info.svg", "Active call", " ", SwitchBackToCall }
|
|
60 |
};
|
|
61 |
|
|
62 |
#endif // PHONEINDICATORS_H
|