51
|
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: power save mode Indicator class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef PSMINDICATOR_H
|
|
19 |
#define PSMINDICATOR_H
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
|
|
23 |
#include <QVariant>
|
|
24 |
#include <QtCore/QProcess>
|
|
25 |
|
|
26 |
#include <hbindicatorinterface.h>
|
|
27 |
#include <hbindicatorplugininterface.h>
|
|
28 |
#include <hbtranslator.h>
|
77
|
29 |
#include <xqappmgr.h>
|
51
|
30 |
|
|
31 |
|
|
32 |
/**
|
|
33 |
* PSM indicator class.
|
|
34 |
* Handles client request and shows the indications.
|
|
35 |
*/
|
|
36 |
class PsmIndicatorPlugin : public HbIndicatorInterface, public HbIndicatorPluginInterface
|
|
37 |
{
|
|
38 |
Q_OBJECT
|
|
39 |
Q_INTERFACES(HbIndicatorPluginInterface)
|
|
40 |
|
|
41 |
public:
|
|
42 |
|
|
43 |
PsmIndicatorPlugin();
|
|
44 |
~PsmIndicatorPlugin();
|
|
45 |
public:
|
|
46 |
//from HbindicatorInterface
|
|
47 |
bool handleInteraction(InteractionType type);
|
|
48 |
QVariant indicatorData(int role) const;
|
|
49 |
|
|
50 |
public:
|
|
51 |
//from HbIndicatorPluginInterface
|
|
52 |
QStringList indicatorTypes() const;
|
|
53 |
bool accessAllowed(const QString &indicatorType,const QVariantMap & securityInfo) const;
|
|
54 |
HbIndicatorInterface* createIndicator(const QString &indicatorType);
|
|
55 |
int error() const;
|
|
56 |
|
|
57 |
|
|
58 |
protected:
|
|
59 |
//from HbindicatorInterface
|
|
60 |
bool handleClientRequest(RequestType type, const QVariant ¶meter);
|
|
61 |
|
|
62 |
|
|
63 |
private:
|
|
64 |
|
|
65 |
QString iDisplayName;
|
|
66 |
QString iIcon;
|
|
67 |
QStringList iIndicatorTypes;
|
|
68 |
HbTranslator *iTrans;
|
|
69 |
|
|
70 |
|
|
71 |
private slots:
|
77
|
72 |
|
|
73 |
|
|
74 |
void closeSettingView();
|
51
|
75 |
private:
|
|
76 |
Q_DISABLE_COPY(PsmIndicatorPlugin)
|
|
77 |
int mError;
|
77
|
78 |
//Qthighway methodology
|
|
79 |
XQApplicationManager mAppMgr;
|
|
80 |
XQAiwRequest *mRequest;
|
51
|
81 |
};
|
|
82 |
|
|
83 |
#endif // PSMINDICATOR_H
|
|
84 |
|