|
1 /* |
|
2 * ============================================================================ |
|
3 * Name : hbindicatorautolockplugin.h |
|
4 * Part of : hb / hbcore |
|
5 * Description : indicator autolock plugin header |
|
6 * Version : %version: 1 % |
|
7 * |
|
8 * Copyright (c) 2009 Nokia. All rights reserved. |
|
9 * This material, including documentation and any related computer |
|
10 * programs, is protected by copyright controlled by Nokia. All |
|
11 * rights are reserved. Copying, including reproducing, storing, |
|
12 * adapting or translating, any or all of this material requires the |
|
13 * prior written consent of Nokia. This material also contains |
|
14 * confidential information which may not be disclosed to others |
|
15 * without the prior written consent of Nokia. |
|
16 * ============================================================================ |
|
17 */ |
|
18 |
|
19 #ifndef HBINDICATORAUTOLOCKPLUGIN_H |
|
20 #define HBINDICATORAUTOLOCKPLUGIN_H |
|
21 |
|
22 #include <QObject> |
|
23 #include <QStringList> |
|
24 #include <QVariant> |
|
25 |
|
26 #include <hbindicatorplugininterface.h> |
|
27 #include <hbindicatorinterface.h> |
|
28 #include "autolockindicators.h" |
|
29 |
|
30 class HbIndicatorAutolockPlugin : public QObject, public HbIndicatorPluginInterface |
|
31 { |
|
32 Q_OBJECT |
|
33 Q_INTERFACES(HbIndicatorPluginInterface) |
|
34 |
|
35 public: |
|
36 HbIndicatorAutolockPlugin(); |
|
37 ~HbIndicatorAutolockPlugin(); |
|
38 |
|
39 QStringList indicatorTypes() const; |
|
40 bool accessAllowed(const QString &indicatorType, |
|
41 const QVariantMap &securityInfo) const; |
|
42 HbIndicatorInterface* createIndicator(const QString &indicatorType); |
|
43 int error() const; |
|
44 private: |
|
45 int typeIndex(const QString &indicatorType) const; |
|
46 private: |
|
47 Q_DISABLE_COPY(HbIndicatorAutolockPlugin) |
|
48 int mError; |
|
49 QStringList mIndicatorTypes; |
|
50 }; |
|
51 |
|
52 class HbAutolockIndicator : public HbIndicatorInterface |
|
53 { |
|
54 public: |
|
55 HbAutolockIndicator(const QString &indicatorType, |
|
56 int typeIndex, |
|
57 Interaction interaction); |
|
58 ~HbAutolockIndicator(); |
|
59 bool handleInteraction(InteractionType type); |
|
60 QVariant indicatorData(int role) const; |
|
61 protected: |
|
62 bool handleClientRequest(RequestType type, const QVariant ¶meter); |
|
63 private: |
|
64 QString mPrimaryText; |
|
65 QString mSecondaryText; |
|
66 QString mIcon; |
|
67 QString mIconMono; |
|
68 int mTypeIndex; |
|
69 Interaction mInteraction; |
|
70 QVariant mParameter; |
|
71 }; |
|
72 |
|
73 #endif // HBINDICATORAUTOLOCKPLUGIN_H |
|
74 |