1 /* |
|
2 * Copyright (c) 2009 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 #ifndef CPDEVICELOCKPLUGINVIEW_H |
|
18 #define CPDEVICELOCKPLUGINVIEW_H |
|
19 |
|
20 #include <cpbasesettingview.h> |
|
21 #include <hbinputdialog.h> |
|
22 |
|
23 class HbDataFormModel; |
|
24 class HbDataFormModelItem; |
|
25 class CSecurityHandler; |
|
26 class CSecuritySettings; |
|
27 class SecCodeSettings; |
|
28 class CRemoteLockSettings; |
|
29 class CRepository; |
|
30 class RMobilePhone; |
|
31 |
|
32 class CpDeviceLockPluginView : public CpBaseSettingView |
|
33 { |
|
34 Q_OBJECT |
|
35 public: |
|
36 explicit CpDeviceLockPluginView(QGraphicsItem *parent = 0); |
|
37 virtual ~CpDeviceLockPluginView(); |
|
38 private: |
|
39 /* Sets the remote lock setting state to previous value */ |
|
40 void RollbackRemoteLockSettingState(); |
|
41 private slots: |
|
42 /* Displays security code dialog and enables user to change the lock code */ |
|
43 void onLockCodeClicked(); |
|
44 /* Aske for Security code dialog when Automatic Lock timings are changed*/ |
|
45 void onAutoLockChanged(int); |
|
46 /* Displays security Code dialog and then a Input dialog when Remote Lock |
|
47 * settings is clicked |
|
48 */ |
|
49 void onLockMessageClicked(); |
|
50 /* When Automatic Lock timings text is changed.*/ |
|
51 /* |
|
52 * This slot can be enabled once fix from obit team for this siganl is available |
|
53 */ |
|
54 // void onAutoTextChanged(const QString& aText); |
|
55 /* Displays Security code dialog and handles the changed value of the Remote Lock*/ |
|
56 void onRemoteLockDataChanged(QModelIndex,QModelIndex); |
|
57 /* Displayes Security code dialog for Lock when SIM changed settings*/ |
|
58 void onSIMLockDataChanged(QModelIndex,QModelIndex); |
|
59 /* Returns the index of automatic lock timings for the given autoLock value*/ |
|
60 TInt GetAutoLockIndex(TInt); |
|
61 /* Returns the auto lcok value for the given automatic lock timings index*/ |
|
62 TInt GetValueAtIndex(TInt); |
|
63 private: |
|
64 /*Handler for remote lock class*/ |
|
65 CRemoteLockSettings* mRemoteLockSettings; |
|
66 /* Handler for Securit Settings class*/ |
|
67 CSecuritySettings *mUiSecuSettings; |
|
68 /*Handler to Repository Class*/ |
|
69 CRepository* iALPeriodRep; |
|
70 |
|
71 /* Data Model for DataForm*/ |
|
72 HbDataFormModel *formModel; |
|
73 /* Data Item for RemoteLock message*/ |
|
74 HbDataFormModelItem *mRemoteLockMessageItem; |
|
75 /* Data Item Remote Lock*/ |
|
76 HbDataFormModelItem *mDeviceRemoteLockItem; |
|
77 /* Data item for automatic lock timings*/ |
|
78 HbDataFormModelItem *mAutolockPeriodItem; |
|
79 /* Data item for Lock when SIM changed settings*/ |
|
80 HbDataFormModelItem *mLockWhenSimChangeItem; |
|
81 /* Input dalog for user to enter Lock message*/ |
|
82 HbInputDialog* ipDialog; |
|
83 |
|
84 /* holds Lock when SIM changed data*/ |
|
85 QVariant mPrevSIMLockData; |
|
86 /* holds Remote Lock Value*/ |
|
87 QVariant mPrevRemLockData; |
|
88 /* holds the previous Automatic Lock timings index*/ |
|
89 int mThemeComboPrevIndex; |
|
90 /* holds the user defined Lock Message*/ |
|
91 QString mLockMsg; |
|
92 /* flag set on Remote Lock data changed*/ |
|
93 TBool mRemoteLockSettingClicked; |
|
94 /* |
|
95 * Need to remove this variabl once fix available from orbit team |
|
96 */ |
|
97 TInt mHack; |
|
98 }; |
|
99 |
|
100 #endif |
|