author | hgs |
Thu, 24 Jun 2010 12:46:20 +0300 | |
changeset 30 | cc1cea6aabaf |
parent 26 | aad866c37519 |
child 35 | f1030a78d563 |
permissions | -rw-r--r-- |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: SecUi notification plugin class. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
30 | 18 |
#include "secuinotificationdebug.h" |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#include "secuinotificationdialog.h" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include "secuinotificationdialogpluginkeys.h" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include "secuinotificationcontentwidget.h" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
// #include <hbpopupbase.h> // HbPopupBase::NoTimeout |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <hblabel.h> |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <hbaction.h> |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <QDebug> |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
26 |
#include <e32debug.h> |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
27 |
#include <cphcltemergencycall.h> |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
28 |
#include <SCPServerInterface.h> // for TARM error codes while validating new lock code |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
29 |
#include <QString> |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
30 |
#include <QDialogButtonBox> |
30 | 31 |
#include <HbEditorInterface> |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
32 |
#include <e32property.h> |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
33 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
34 |
QTM_USE_NAMESPACE |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
35 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
36 |
#include <qvaluespacesubscriber.h> |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
37 |
#include <qvaluespacepublisher.h> |
30 | 38 |
#define ESecUiBasicTypeText 0x0000000 |
39 |
#define ESecUiBasicTypeCheck 0x0010000 |
|
40 |
#define ESecUiBasicTypeCheckMulti 0x0020000 |
|
41 |
#define ESecUiBasicTypeMask 0x00F0000 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
#define ESecUiCancelSupported 0x1000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
#define ESecUiCancelNotSupported 0x0000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
#define ESecUiEmergencySupported 0x2000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
#define ESecUiEmergencyNotSupported 0x0000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
49 |
#define ESecUiAlphaSupported 0x4000000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
50 |
#define ESecUiAlphaNotSupported 0x0000000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
51 |
|
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
52 |
#define ESecUiSecretSupported 0x8000000 |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
53 |
#define ESecUiSecretNotSupported 0x0000000 |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
54 |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
55 |
#define ESecUiMaskFlags 0xFF000000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
56 |
#define ESecUiMaskType 0x00FFFFFF |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
57 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
58 |
#define ESecUiTypeDeviceLock 0x00100000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
59 |
#define ESecUiTypeKeyguard 0x00200000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
60 |
#define ESecUiTypeClock 0x00300000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
61 |
#define ESecUiTypeScreensaver 0x00400000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
62 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
63 |
#define ESecUiTypeMaskLock 0x00F00000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
64 |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
65 |
const TUid KPSUidSecurityUIs = { 0x100059b5 }; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
66 |
const TUint32 KSecurityUIsDismissDialog = 0x00000309; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
67 |
|
30 | 68 |
enum TSecurityUIsDismissDialogValues |
69 |
{ |
|
70 |
ESecurityUIsDismissDialogUninitialized = 0, |
|
71 |
ESecurityUIsDismissDialogOn, |
|
72 |
ESecurityUIsDismissDialogProcessing, |
|
73 |
ESecurityUIsDismissDialogDone, |
|
74 |
ESecurityUIsDismissDialogLastValue |
|
75 |
}; |
|
76 |
||
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
// SecUiNotificationDialog::SecUiNotificationDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
SecUiNotificationDialog::SecUiNotificationDialog( |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
const QVariantMap ¶meters) : HbDialog(), mLastError(KNoError) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
{ |
30 | 84 |
RDEBUG("0", 0); |
85 |
TTime myTime; |
|
86 |
myTime.HomeTime(); |
|
87 |
mMyId = I64LOW( myTime.Int64() ); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
constructDialog(parameters); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
// SecUiNotificationDialog::~SecUiNotificationDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
SecUiNotificationDialog::~SecUiNotificationDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
{ |
30 | 97 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
// SecUiNotificationDialog::setDeviceDialogParameters() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
bool SecUiNotificationDialog::setDeviceDialogParameters(const QVariantMap ¶meters) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
{ |
30 | 106 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
return constructDialog(parameters); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
// SecUiNotificationDialog::deviceDialogError() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
int SecUiNotificationDialog::deviceDialogError() const |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
{ |
30 | 116 |
RDEBUG("mLastError", mLastError); |
117 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
return mLastError; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
// SecUiNotificationDialog::closeDeviceDialog |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
void SecUiNotificationDialog::closeDeviceDialog(bool byClient) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
Q_UNUSED(byClient); |
30 | 128 |
RDEBUG("mMyId", mMyId); |
129 |
RDEBUG("calling close()", 0); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
close(); |
30 | 131 |
RDEBUG("mShowEventReceived", mShowEventReceived); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
// If show event has been received, close is signalled from hide event. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
// If not, hide event does not come and close is signalled from here. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
if (!mShowEventReceived) { |
30 | 136 |
RDEBUG("emitting deviceDialogClosed", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
emit deviceDialogClosed(); |
30 | 138 |
if(1==0 && subscriberKSecurityUIsDismissDialog) |
139 |
{ |
|
140 |
RDEBUG("disconnect subscriberKSecurityUIsDismissDialog", 0); |
|
141 |
disconnect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
142 |
RDEBUG("disconnected subscriberKSecurityUIsDismissDialog", 1); |
|
143 |
if(1==1) |
|
144 |
{ |
|
145 |
RDEBUG("deleting subscriberKSecurityUIsDismissDialog", 0); |
|
146 |
delete subscriberKSecurityUIsDismissDialog; |
|
147 |
subscriberKSecurityUIsDismissDialog = NULL; |
|
148 |
RDEBUG("deleted subscriberKSecurityUIsDismissDialog", 1); |
|
149 |
} |
|
150 |
} |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
} |
30 | 152 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
// SecUiNotificationDialog::deviceDialogWidget |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
HbDialog *SecUiNotificationDialog::deviceDialogWidget() const |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
return const_cast<SecUiNotificationDialog*>(this); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
// SecUiNotificationDialog::hideEvent |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
void SecUiNotificationDialog::hideEvent(QHideEvent *event) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
{ |
30 | 170 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
HbDialog::hideEvent(event); |
30 | 172 |
RDEBUG("mMyId", mMyId); |
173 |
RDEBUG("calling close()", 0); |
|
174 |
close(); |
|
175 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
176 |
emit deviceDialogClosed(); |
|
177 |
RDEBUG("deviceDialogClosed", 1); |
|
178 |
if(1==0 && subscriberKSecurityUIsDismissDialog) |
|
179 |
{ |
|
180 |
RDEBUG("disconnect subscriberKSecurityUIsDismissDialog", 0); |
|
181 |
disconnect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
182 |
RDEBUG("disconnected subscriberKSecurityUIsDismissDialog", 1); |
|
183 |
if(1==1) |
|
184 |
{ |
|
185 |
RDEBUG("deleting subscriberKSecurityUIsDismissDialog", 0); |
|
186 |
delete subscriberKSecurityUIsDismissDialog; |
|
187 |
subscriberKSecurityUIsDismissDialog = NULL; |
|
188 |
RDEBUG("deleted subscriberKSecurityUIsDismissDialog", 1); |
|
189 |
} |
|
190 |
} |
|
191 |
// old method was emit deviceDialogClosed(); |
|
192 |
RDEBUG("0", 0); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
// SecUiNotificationDialog::showEvent |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
void SecUiNotificationDialog::showEvent(QShowEvent *event) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
{ |
30 | 201 |
RDEBUG("0", 0); |
202 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
HbDialog::showEvent(event); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
204 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
205 |
if(!(queryType & ESecUiTypeMaskLock)) |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
206 |
{ // not for the "lock icon" |
30 | 207 |
RDEBUG("check default.1", 0); |
208 |
if(codeTop!=NULL) |
|
209 |
{ |
|
210 |
RDEBUG("check default.2", 0); |
|
211 |
if(codeTop->text().length()>0) // there's a default value. Verify it and (might) enable OK |
|
212 |
{ |
|
213 |
RDEBUG("check default.3", 0); |
|
214 |
handleCodeTopChanged(codeTop->text()); |
|
215 |
} |
|
216 |
RDEBUG("setFocus", 0); |
|
217 |
codeTop->setFocus(); // this should open the VKB . Doesn't seem to work when it's done on the widget, so it's done here. |
|
218 |
||
219 |
} // codeTop!=NULL |
|
220 |
||
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
221 |
const TUint32 KSecurityUIsTestCode = 0x00000307; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
222 |
TInt value = 0; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
223 |
TInt err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsTestCode, value ); |
30 | 224 |
RDEBUG("KSecurityUIsTestCode err", err); |
225 |
RDEBUG("faking value", value); |
|
226 |
RDEBUG("mShowEventReceived", mShowEventReceived); |
|
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
227 |
if(value>0 && mShowEventReceived==true) // show happens 2 times. Dialog can be closed only the second. |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
228 |
{ |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
229 |
QString myString = ""; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
230 |
myString += QString("%1").arg(value); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
231 |
qDebug() << "SecUiNotificationDialog::faking myString=" << myString; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
232 |
codeTop->setText( myString ); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
233 |
TInt err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsTestCode, 0 ); // clear after using it |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
234 |
qDebug() << "SecUiNotificationDialog::calling handleAccepted=" << myString; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
235 |
emit handleAccepted(); |
30 | 236 |
// handleAccepted already emit closeDeviceDialog(false); // false means "not by client", although it's not really used |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
237 |
} |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
238 |
} |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
mShowEventReceived = true; |
30 | 240 |
RDEBUG("1", 1); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
// SecUiNotificationDialog::constructDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |
bool SecUiNotificationDialog::constructDialog(const QVariantMap ¶meters) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
{ |
30 | 249 |
RDEBUG("0", 0); |
250 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
setTimeout(HbPopup::NoTimeout); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
setDismissPolicy(HbPopup::NoDismiss); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
setModal(true); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
254 |
mShowEventReceived = false; |
30 | 255 |
subscriberKSecurityUIsDismissDialog = NULL; |
256 |
titleWidget = NULL; |
|
257 |
RDEBUG("subscriberKSecurityUIsDismissDialog NULL", 0); |
|
258 |
||
259 |
subscriberKSecurityUIsDismissDialog = new QValueSpaceSubscriber("/KPSUidSecurityUIs/KSecurityUIsDismissDialog", this); |
|
260 |
if(subscriberKSecurityUIsDismissDialog) |
|
261 |
{ |
|
262 |
RDEBUG("subscriberKSecurityUIsDismissDialog created", 1); |
|
263 |
} |
|
264 |
else |
|
265 |
{ |
|
266 |
RDEBUG("subscriberKSecurityUIsDismissDialog not created", 0); |
|
267 |
} |
|
268 |
connect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
269 |
RDEBUG("subscriberKSecurityUIsDismissDialog", 1); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
270 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
271 |
// Title |
30 | 272 |
// this is also done later in the widget |
273 |
// For now, it only says "Security" |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
274 |
if (parameters.contains(KDialogTitle)) { |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
275 |
QString titleText = parameters.value(KDialogTitle).toString(); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
276 |
QString titleAttempts = ""; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
277 |
if(titleText.indexOf('|')>0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
278 |
{ // if separator, take only first part |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
279 |
titleText = titleText.left(titleText.indexOf('|')); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
280 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
281 |
if(titleText.indexOf('#')>0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
282 |
{ // if separator, take only first part |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
283 |
titleAttempts = titleText.right(titleText.length()-titleText.indexOf('#')-1); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
284 |
qDebug() << "SecUiNotificationDialog::titleAttempts=" << titleAttempts; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
285 |
int nAttempts = titleAttempts.toInt(); |
30 | 286 |
RDEBUG("nAttempts", nAttempts); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
287 |
titleText = titleText.left(titleText.indexOf('#')); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
288 |
if(nAttempts>0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
289 |
titleText = titleText + " attempts=" + QString::number(nAttempts); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
290 |
} |
30 | 291 |
titleText = "Security Query"; // this is the header, for any potential later error which needs to be displayed |
292 |
// This is created only if needed (i.e. errors for NewLockCode) |
|
293 |
// titleWidget = new HbLabel(titleText); |
|
294 |
// setHeadingWidget(titleWidget); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
295 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
296 |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
297 |
if (parameters.contains(KEmergency)) { |
30 | 298 |
RDEBUG("KEmergency", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
299 |
QString emergencyText = parameters.value(KEmergency).toString(); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
300 |
qDebug() << emergencyText; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
301 |
if(!emergencyText.compare("emergencyYes")) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
302 |
{ |
30 | 303 |
RDEBUG("emergencyYes", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
304 |
isEmergency = 1; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
305 |
okAction->setEnabled(true); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
306 |
okAction->setText("Call"); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
307 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
308 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
309 |
if(!emergencyText.compare("emergencyNo")) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
310 |
{ |
30 | 311 |
RDEBUG("emergencyNo", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
312 |
isEmergency = 0; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
313 |
okAction->setEnabled(false); // 112 -> 1122 (=password) . This is handled by < lMinLength |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
314 |
okAction->setText("Ok"); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
315 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
316 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
317 |
} |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
318 |
// after TARM validation. |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
319 |
if (parameters.contains(KInvalidNewLockCode)) { |
30 | 320 |
RDEBUG("KInvalidNewLockCode", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
321 |
QString invalidText = parameters.value(KInvalidNewLockCode).toString(); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
322 |
qDebug() << invalidText; |
30 | 323 |
QString newTitleText = "Lock Code"; // TODO take from the original one |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
324 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
325 |
QString invalidStr = invalidText.right(invalidText.length()-invalidText.indexOf('#')-1); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
326 |
int invalidNumber = invalidStr.toInt(); |
30 | 327 |
RDEBUG("invalidNumber", invalidNumber); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
328 |
if(invalidNumber<0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
329 |
{ |
30 | 330 |
RDEBUG("invalidNumber<0", invalidNumber ); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
331 |
// nothing to do |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
332 |
} |
30 | 333 |
if(invalidNumber==EDeviceLockAutolockperiod) |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
334 |
{ |
30 | 335 |
RDEBUG("EDeviceLockAutolockperiod", invalidNumber ); |
336 |
newTitleText+="EDeviceLockAutolockperiod"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
337 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
338 |
if(invalidNumber==EDeviceLockMaxAutolockPeriod) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
339 |
{ |
30 | 340 |
RDEBUG("EDeviceLockAutolockperiod", invalidNumber ); |
341 |
newTitleText+="EDeviceLockMaxAutolockPeriod"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
342 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
343 |
if(invalidNumber==EDeviceLockMinlength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
344 |
{ |
30 | 345 |
RDEBUG("EDeviceLockMinlength", invalidNumber ); |
346 |
newTitleText+="EDeviceLockMinlength"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
347 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
348 |
if(invalidNumber==EDeviceLockMaxlength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
349 |
{ |
30 | 350 |
RDEBUG("EDeviceLockMaxlength", invalidNumber ); |
351 |
newTitleText+="EDeviceLockMaxlength"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
352 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
353 |
if(invalidNumber==EDeviceLockRequireUpperAndLower) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
354 |
{ |
30 | 355 |
RDEBUG("EDeviceLockRequireUpperAndLower", invalidNumber ); |
356 |
newTitleText+="EDeviceLockRequireUpperAndLower"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
357 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
358 |
if(invalidNumber==EDeviceLockRequireCharsAndNumbers) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
359 |
{ |
30 | 360 |
RDEBUG("EDeviceLockMaxlength", invalidNumber ); |
361 |
newTitleText+="EDeviceLockMaxlength"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
362 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
363 |
if(invalidNumber==EDeviceLockAllowedMaxRepeatedChars) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
364 |
{ |
30 | 365 |
RDEBUG("EDeviceLockAllowedMaxRepeatedChars", invalidNumber ); |
366 |
newTitleText+="EDeviceLockAllowedMaxRepeatedChars"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
367 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
368 |
if(invalidNumber==EDeviceLockHistoryBuffer) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
369 |
{ |
30 | 370 |
RDEBUG("EDeviceLockHistoryBuffer", invalidNumber ); |
371 |
newTitleText+="EDeviceLockHistoryBuffer"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
372 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
373 |
if(invalidNumber==EDeviceLockPasscodeExpiration) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
374 |
{ |
30 | 375 |
RDEBUG("EDeviceLockPasscodeExpiration", invalidNumber ); |
376 |
newTitleText+="EDeviceLockPasscodeExpiration"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
377 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
378 |
if(invalidNumber==EDeviceLockMinChangeTolerance) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
379 |
{ |
30 | 380 |
RDEBUG("EDeviceLockMinChangeTolerance", invalidNumber ); |
381 |
newTitleText+="EDeviceLockMinChangeTolerance"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
382 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
383 |
if(invalidNumber==EDeviceLockMinChangeInterval) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
384 |
{ |
30 | 385 |
RDEBUG("EDeviceLockMinChangeInterval", invalidNumber ); |
386 |
newTitleText+="EDeviceLockMinChangeInterval"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
387 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
388 |
if(invalidNumber==EDeviceLockDisallowSpecificStrings) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
389 |
{ |
30 | 390 |
RDEBUG("EDeviceLockDisallowSpecificStrings", invalidNumber ); |
391 |
newTitleText+="EDeviceLockDisallowSpecificStrings"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
392 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
393 |
if(invalidNumber==EDeviceLockAllowedMaxAtempts) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
394 |
{ |
30 | 395 |
RDEBUG("EDeviceLockAllowedMaxAtempts", invalidNumber ); |
396 |
newTitleText+="EDeviceLockAllowedMaxAtempts"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
397 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
398 |
if(invalidNumber==EDeviceLockConsecutiveNumbers) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
399 |
{ |
30 | 400 |
RDEBUG("EDeviceLockConsecutiveNumbers", invalidNumber ); |
401 |
newTitleText+="EDeviceLockConsecutiveNumbers"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
402 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
403 |
if(invalidNumber==EDeviceLockMinSpecialCharacters) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
404 |
{ |
30 | 405 |
RDEBUG("EDeviceLockMinSpecialCharacters", invalidNumber ); |
406 |
newTitleText+="EDeviceLockMinSpecialCharacters"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
407 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
408 |
if(invalidNumber==EDeviceLockSingleCharRepeatNotAllowed) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
409 |
{ |
30 | 410 |
RDEBUG("EDeviceLockSingleCharRepeatNotAllowed", invalidNumber ); |
411 |
newTitleText+="EDeviceLockSingleCharRepeatNotAllowed"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
412 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
413 |
if(invalidNumber==EDevicelockConsecutiveCharsNotAllowed) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
414 |
{ |
30 | 415 |
RDEBUG("EDevicelockConsecutiveCharsNotAllowed", invalidNumber ); |
416 |
newTitleText+="EDevicelockConsecutiveCharsNotAllowed"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
417 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
418 |
if(invalidNumber>=EDevicelockTotalPolicies) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
419 |
{ |
30 | 420 |
RDEBUG("EDevicelockTotalPolicies", invalidNumber ); |
421 |
newTitleText+="EDevicelockTotalPolicies"; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
422 |
} |
30 | 423 |
if( !titleWidget ) |
424 |
{ |
|
425 |
RDEBUG("creating titleWidget", 0 ); |
|
426 |
titleWidget = new HbLabel("New lock code"); // it will be changed later |
|
427 |
setHeadingWidget(titleWidget); |
|
428 |
} |
|
429 |
RDEBUG("setPlainText", 0 ); |
|
430 |
titleWidget->setPlainText(newTitleText); |
|
431 |
||
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
432 |
if(invalidNumber<0) // everything is ok |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
433 |
{ |
30 | 434 |
okAction->setEnabled(true); // this might fail in the scenario: check this : invalid -> valid. This allows verif ? |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
435 |
okAction->setText("Ok"); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
436 |
codeBottom->setEnabled(true); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
437 |
} |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
438 |
else |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
439 |
{ |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
440 |
okAction->setEnabled(false); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
441 |
codeBottom->setEnabled(false); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
442 |
codeBottom->setText(""); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
443 |
okAction->setText("Ok"); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
444 |
} |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
445 |
// need to return because all objects are already created |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
446 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
447 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
448 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
449 |
// Content |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
450 |
SecUiNotificationContentWidget *content = new SecUiNotificationContentWidget(); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
451 |
content->constructFromParameters(parameters); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
452 |
setContentWidget(content); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
453 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
454 |
queryType = content->queryType; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
455 |
queryDual = content->queryDual; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
456 |
isEmergency = content->isEmergency; |
30 | 457 |
codeTop=NULL; |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
458 |
codeTop = content->codeTop; |
30 | 459 |
checkBox = content->checkbox; |
460 |
listWidget = content->listWidget; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
461 |
codeBottom = content->codeBottom; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
462 |
lMinLength = content->lMinLength; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
463 |
lMaxLength = content->lMaxLength; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
464 |
lEmergencySupported = content->lEmergencySupported; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
465 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
466 |
connect(content, SIGNAL(codeTopChanged(const QString &)), this, SLOT(handleCodeTopChanged(const QString &))); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
467 |
connect(content, SIGNAL(codeBottomChanged(const QString &)), this, SLOT(handleCodeBottomChanged(const QString &))); |
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
468 |
connect(content, SIGNAL(codeTopContentChanged()), this, SLOT(handleCodeTopContentChanged())); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
469 |
connect(content, SIGNAL(but1Changed()), this, SLOT(handlebut1Changed())); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
470 |
connect(content, SIGNAL(but2Changed()), this, SLOT(handlebut2Changed())); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
471 |
connect(content, SIGNAL(but3Changed()), this, SLOT(handlebut3Changed())); |
30 | 472 |
RDEBUG("queryType", queryType); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
473 |
// Buttons |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
474 |
if( (queryType & ESecUiTypeMaskLock)) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
475 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
476 |
// no need to create OK or Cancel |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
477 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
478 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
479 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
480 |
okAction = new HbAction(tr("Ok")); |
30 | 481 |
RDEBUG("created HbAction okAction", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
482 |
okAction->setEnabled(false); // initially the OK is disabled because codeTop is empty |
30 | 483 |
if((queryType & ESecUiBasicTypeMask) ==ESecUiBasicTypeCheck) { |
484 |
okAction->setEnabled(true); |
|
485 |
setHeadingWidget(0); // had to remove this no multiline |
|
486 |
} |
|
487 |
else if ((queryType & ESecUiBasicTypeMask) ==ESecUiBasicTypeCheckMulti){ |
|
488 |
okAction->setEnabled(true); |
|
489 |
} |
|
490 |
||
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
491 |
// setAction(okAction, QDialogButtonBox::AcceptRole); // it's supposed to use this, when deprecated |
30 | 492 |
// setPrimaryAction(okAction); |
493 |
addAction(okAction); |
|
494 |
disconnect(okAction, SIGNAL(triggered()), this, SLOT(close())); // the close will be done in handleAccepted |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
495 |
connect(okAction, SIGNAL(triggered()), this, SLOT(handleAccepted())); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
496 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
497 |
cancelAction = new HbAction(tr("Cancel")); // qtTrId("txt_common_button_cancel") |
30 | 498 |
addAction(cancelAction); |
499 |
disconnect(cancelAction, SIGNAL(triggered()), this, SLOT(close())); // the close will be done in handleCancelled |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
500 |
connect(cancelAction, SIGNAL(triggered()), this, SLOT(handleCancelled())); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
501 |
// setAction(cancelAction, QDialogButtonBox::RejectRole); // it's supposed to use this, when deprecated |
30 | 502 |
// setSecondaryAction(cancelAction); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
503 |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
504 |
// this should had been set by Autolock, but just to be sure |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
505 |
TInt ret = RProperty::Define(KPSUidSecurityUIs, KSecurityUIsDismissDialog, |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
506 |
RProperty::EInt, TSecurityPolicy(TSecurityPolicy::EAlwaysPass), |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
507 |
TSecurityPolicy(TSecurityPolicy::EAlwaysPass)); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
508 |
RDEBUG("defined KSecurityUIsDismissDialog", ret); |
30 | 509 |
TInt aDismissDialog = -1; |
510 |
ret = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsDismissDialog, aDismissDialog ); |
|
511 |
RDEBUG("ret", ret); |
|
512 |
RDEBUG("aDismissDialog", aDismissDialog); |
|
513 |
if(aDismissDialog==ESecurityUIsDismissDialogOn || aDismissDialog==ESecurityUIsDismissDialogProcessing) |
|
514 |
{ |
|
515 |
RDebug::Printf( "potential error: %s %s (%u) aDismissDialog=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aDismissDialog ); |
|
516 |
} |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
517 |
|
30 | 518 |
RDEBUG("check cancel", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
519 |
if ((queryType & ESecUiCancelSupported)==ESecUiCancelSupported) |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
520 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
521 |
// nothing to do. Cancel is enabled by default |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
522 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
523 |
else |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
524 |
{ |
30 | 525 |
RDEBUG("disable Cancel", 1); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
526 |
cancelAction->setEnabled(false); |
30 | 527 |
cancelAction->setText(""); |
528 |
cancelAction->setVisible(false); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
529 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
530 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
531 |
return true; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
532 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
533 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
534 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
// SecUiNotificationDialog::sendResult() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
536 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
537 |
// |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
538 |
void SecUiNotificationDialog::sendResult(int accepted) |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
539 |
{ |
30 | 540 |
RDEBUG("0", 0); |
541 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
542 |
QVariant acceptedValue(accepted); |
30 | 543 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
mResultMap.insert(KResultAccepted, acceptedValue); |
30 | 545 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
546 |
qDebug() << mResultMap; |
30 | 547 |
RDEBUG("queryType", queryType); |
548 |
if(!(queryType & ESecUiTypeMaskLock)) |
|
549 |
{ // the lock-icon should not reply |
|
550 |
RDEBUG("emit deviceDialogData", 0); |
|
551 |
emit deviceDialogData(mResultMap); |
|
552 |
} |
|
553 |
RDEBUG("1", 1); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
554 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
555 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
556 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
557 |
// SecUiNotificationDialog::handleAccepted() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
558 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
559 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
560 |
void SecUiNotificationDialog::handleAccepted() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
561 |
{ |
30 | 562 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
563 |
// okAction |
30 | 564 |
RDEBUG("mMyId", mMyId); |
565 |
QString codeTopText=""; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
566 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
567 |
if( (queryType & ESecUiTypeMaskLock)) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
568 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
569 |
codeTopText = "Unlock-Request"; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
570 |
} |
30 | 571 |
else if( (queryType & ESecUiBasicTypeMask)==ESecUiBasicTypeCheck) |
572 |
{ |
|
573 |
codeTopText=(checkBox->isChecked() ? "1":"0"); |
|
574 |
mResultMap.insert(KCodeTopIndex, codeTopText); |
|
575 |
} |
|
576 |
else if( (queryType & ESecUiBasicTypeMask)==ESecUiBasicTypeCheckMulti) |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
577 |
{ |
30 | 578 |
QItemSelectionModel *selectionModel = listWidget->selectionModel(); |
579 |
QModelIndexList selectedItems = selectionModel->selectedIndexes(); |
|
580 |
QModelIndex index; |
|
581 |
codeTopText=""; |
|
582 |
foreach(index, selectedItems) { |
|
583 |
codeTopText+=QString::number(index.row()); |
|
584 |
//could also use if(index.row()!=selectedItems.count()-1) codeTopText+= "|"; |
|
585 |
codeTopText+= "|"; |
|
586 |
} |
|
587 |
mResultMap.insert(KCodeTopIndex, codeTopText); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
588 |
} |
30 | 589 |
else |
590 |
codeTopText = codeTop->text(); |
|
591 |
// no need to check last time for codeBottom |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
592 |
qDebug() << "codeTopText=" << codeTopText; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
593 |
sendResult(KErrNone); |
30 | 594 |
RDEBUG("calling close()", 0); |
595 |
close(); // this is needed because Cancel doesn't automatically closes the dialog |
|
596 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
597 |
emit deviceDialogClosed(); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
598 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
599 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
600 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
601 |
// SecUiNotificationDialog::handleCancelled() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
602 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
603 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
604 |
void SecUiNotificationDialog::handleCancelled() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
605 |
{ |
30 | 606 |
RDEBUG("0", 0); |
607 |
RDEBUG("mMyId", mMyId); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
608 |
sendResult(KErrCancel); |
30 | 609 |
RDEBUG("callingclose()", 0); |
610 |
close(); // this is needed because Cancel doesn't automatically closes the dialog |
|
611 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
612 |
emit deviceDialogClosed(); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
613 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
614 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
615 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
616 |
// SecUiNotificationDialog::handleMemorySelectionChanged() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
617 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
618 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
619 |
void SecUiNotificationDialog::handleMemorySelectionChanged(const QString &text) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
620 |
{ |
30 | 621 |
RDEBUG("0", 0); |
622 |
RDEBUG("mMyId", mMyId); |
|
623 |
qDebug() << text; |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
624 |
QVariant memorySelection(text); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
625 |
mResultMap.insert(KSelectedMemoryIndex, memorySelection); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
626 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
627 |
|
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
628 |
void SecUiNotificationDialog::handleCodeTopContentChanged() |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
629 |
{ |
30 | 630 |
RDEBUG("0", 0); |
631 |
RDEBUG("mMyId", mMyId); |
|
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
632 |
qDebug() << codeTop->text(); |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
633 |
handleCodeTopChanged(codeTop->text()); |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
634 |
} |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
635 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
636 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
637 |
// SecUiNotificationDialog::handleCodeTopChanged() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
638 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
639 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
640 |
void SecUiNotificationDialog::handleCodeTopChanged(const QString &text) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
641 |
{ |
30 | 642 |
RDEBUG("0", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
643 |
qDebug() << "SecUiNotificationDialog::handleCodeTopChanged=" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
644 |
if(queryDual) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
645 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
646 |
codeBottom->setText(""); // any change resets the verification. |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
647 |
} |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
648 |
if( queryType == 0x1000004 ) // new codeLock |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
649 |
{ // ChangeSecCodeParamsL change RMobilePhone::ESecurityCodePhonePassword |
30 | 650 |
QVariant codeTopVar(text); |
651 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
652 |
sendResult(KErrCompletion); // send the current password back to the client for further TARM validation. This is done on any key-press, not in the OK |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
653 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
654 |
if(text.length() < lMinLength ) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
655 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
656 |
qDebug() << "SecUiNotificationDialog::handleCodeTopChanged too short:" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
657 |
okAction->setEnabled(false); |
30 | 658 |
RDEBUG("lEmergencySupported", lEmergencySupported); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
659 |
if( lEmergencySupported && text.length() > 2 ) // emergency numbers need at least 3 digits |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
660 |
{ // check whether it's a emergency number |
30 | 661 |
QVariant codeTopVar(text); |
662 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
663 |
sendResult(KErrAbort); // send the current password back to the client. Perhaps it's an emergency number and decides to Ok->Call |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
664 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
665 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
666 |
else if (text.length() >= lMinLength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
667 |
{ |
30 | 668 |
// might use a flag to avoid re-setting. But this complicates things if there's another initial verification |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
669 |
qDebug() << "SecUiNotificationDialog::handleCodeTopChanged long enough:" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
670 |
okAction->setText("Ok"); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
671 |
if(queryDual==0) // only if Bottom is not used |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
672 |
okAction->setEnabled(true); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
673 |
} |
30 | 674 |
QVariant codeTopVar(text); |
675 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
676 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
677 |
// ---------------------------------------------------------------------------- |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
678 |
// SecUiNotificationDialog::handleCodeBottomChanged() |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
679 |
// ---------------------------------------------------------------------------- |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
680 |
// |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
681 |
void SecUiNotificationDialog::handleCodeBottomChanged(const QString &text) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
682 |
{ |
30 | 683 |
RDEBUG("0", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
684 |
qDebug() << "SecUiNotificationDialog::handleCodeBottomChanged" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
685 |
qDebug() << "SecUiNotificationDialog::handleCodeBottomChanged. codeTop=" << codeTop->text() ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
686 |
if(text.length() < lMinLength ) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
687 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
688 |
qDebug() << "SecUiNotificationDialog::handleCodeBottomChanged too short:" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
689 |
okAction->setEnabled(false); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
690 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
691 |
else |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
692 |
{ |
30 | 693 |
// might use a flag to avoid re-setting. But it just complicates things. |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
694 |
qDebug() << "SecUiNotificationDialog::handleCodeBottomChanged long enough:" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
695 |
if(codeTop->text()==text) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
696 |
{ |
30 | 697 |
// unless both codes match, don't allow OK. Note that the first field doesn't allow exit until the validations (i.e. NewLockCode) as succesfull |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
698 |
qDebug() << "SecUiNotificationDialog::handleCodeBottomChanged codes match:" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
699 |
okAction->setEnabled(true); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
700 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
701 |
else |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
702 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
703 |
qDebug() << "SecUiNotificationDialog::handleCodeBottomChanged codes not match:" << text ; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
704 |
okAction->setEnabled(false); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
705 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
706 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
707 |
// verification is not sent |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
708 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
709 |
// ---------------------------------------------------------------------------- |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
710 |
// SecUiNotificationDialog::handlebut1Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
711 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
712 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
713 |
void SecUiNotificationDialog::handlebut1Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
714 |
{ |
30 | 715 |
RDEBUG("0", 0); |
716 |
codeTop->setText("1234"); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
717 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
718 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
719 |
// SecUiNotificationDialog::handlebut2Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
720 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
721 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
722 |
void SecUiNotificationDialog::handlebut2Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
723 |
{ |
30 | 724 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
725 |
QString codeTopText = codeTop->text(); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
726 |
qDebug() << "codeTopText"; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
727 |
qDebug() << codeTopText; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
728 |
codeTopText = codeTopText + "1" ; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
729 |
qDebug() << "codeTopText+1"; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
730 |
qDebug() << codeTopText; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
731 |
codeTop->setText(codeTopText); |
30 | 732 |
|
733 |
RDEBUG("editorInterface", 0); |
|
734 |
HbEditorInterface editorInterface(codeTop); |
|
735 |
RDEBUG("actions", 0); |
|
736 |
QList<HbAction *> vkbList = editorInterface.actions(); |
|
737 |
RDEBUG("count", 0); |
|
738 |
int count = vkbList.count(); |
|
739 |
RDEBUG("got count", count); |
|
740 |
for (int i = 0; i < count; i++) |
|
741 |
{ |
|
742 |
RDEBUG("i", i); |
|
743 |
HbAction *action = static_cast<HbAction *>(vkbList[i]); |
|
744 |
RDEBUG("action", 0); |
|
745 |
} |
|
746 |
||
747 |
RDEBUG("okVKBAction", 0); |
|
748 |
okVKBAction = new HbAction(tr("Ok")); |
|
749 |
RDEBUG("addAction", 0); |
|
750 |
editorInterface.addAction(okVKBAction); |
|
751 |
RDEBUG("addAction", 1); |
|
752 |
connect(okVKBAction, SIGNAL(triggered()), this, SLOT(handleAccepted())); |
|
753 |
RDEBUG("connect", 1); |
|
754 |
||
755 |
QList<HbAction *> vkbList2 = editorInterface.actions(); |
|
756 |
RDEBUG("count", 0); |
|
757 |
int count2 = vkbList2.count(); |
|
758 |
RDEBUG("got count2", count2); |
|
759 |
for (int i = 0; i < count2; i++) |
|
760 |
{ |
|
761 |
RDEBUG("i", i); |
|
762 |
HbAction *action2 = static_cast<HbAction *>(vkbList2[i]); |
|
763 |
RDEBUG("action2", 0); |
|
764 |
} |
|
765 |
||
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
766 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
767 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
768 |
// SecUiNotificationDialog::handlebut3Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
769 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
770 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
771 |
void SecUiNotificationDialog::handlebut3Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
772 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
773 |
qDebug() << "SecUiNotificationDialog::handlebut3Changed"; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
774 |
QString codeTopText = codeTop->text(); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
775 |
qDebug() << "codeTopText"; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
776 |
qDebug() << codeTopText; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
777 |
codeTopText = codeTopText + "5" ; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
778 |
qDebug() << "codeTopText+5"; |
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
779 |
codeTop->setEchoMode(HbLineEdit::PasswordEchoOnEdit); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
780 |
qDebug() << codeTopText; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
781 |
codeTop->setText(codeTopText); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
782 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
783 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
784 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
785 |
// SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
786 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
787 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
788 |
void SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
789 |
{ |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
790 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
791 |
} |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
792 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
793 |
// ---------------------------------------------------------------------------- |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
794 |
// SecUiNotificationDialog::subscriberKSecurityUIsDismissDialogChanged() |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
795 |
// A way for Autolock to dismiss any possible PIN dialog |
30 | 796 |
// This doesn't dismiss the lockIcon because P&S is not connected |
797 |
// Note: if this changes itself, then it becomes recursive |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
798 |
// ---------------------------------------------------------------------------- |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
799 |
// |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
800 |
void SecUiNotificationDialog::subscriberKSecurityUIsDismissDialogChanged() |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
801 |
{ |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
802 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
803 |
RDEBUG("0", 0); |
30 | 804 |
RDEBUG("mMyId", mMyId); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
805 |
TInt aDismissDialog = ESecurityUIsDismissDialogUninitialized; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
806 |
TInt err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsDismissDialog, aDismissDialog ); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
807 |
RDEBUG("err", err); |
30 | 808 |
RDEBUG("aDismissDialog", aDismissDialog); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
809 |
if( aDismissDialog == ESecurityUIsDismissDialogOn ) |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
810 |
{ |
30 | 811 |
if(subscriberKSecurityUIsDismissDialog) |
812 |
{ |
|
813 |
RDEBUG("subscriberKSecurityUIsDismissDialog", 1); |
|
814 |
} |
|
815 |
else |
|
816 |
{ |
|
817 |
RDEBUG("! subscriberKSecurityUIsDismissDialog", 0); |
|
818 |
} |
|
819 |
||
820 |
if(this) |
|
821 |
{ |
|
822 |
RDEBUG("this", 1); |
|
823 |
} |
|
824 |
else |
|
825 |
{ |
|
826 |
RDEBUG("! this", 0); |
|
827 |
} |
|
828 |
||
829 |
||
830 |
RDEBUG("disconnect subscriberKSecurityUIsDismissDialog", 0); |
|
831 |
disconnect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
832 |
// this doesn't really disconnect, because somehow the events are still queued. This is a QtMobility error |
|
833 |
RDEBUG("disconnected subscriberKSecurityUIsDismissDialog", 1); |
|
834 |
||
835 |
RDEBUG("not set KSecurityUIsDismissDialog", ESecurityUIsDismissDialogProcessing); |
|
836 |
// can't set it because it does recursion |
|
837 |
// err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsDismissDialog, ESecurityUIsDismissDialogProcessing ); |
|
838 |
RDEBUG("err", err); |
|
839 |
// only if Cancel is allowed |
|
840 |
if ((queryType & ESecUiCancelSupported)==ESecUiCancelSupported) |
|
841 |
{ |
|
842 |
RDEBUG("sendResult(KErrCancel)", KErrCancel); // another option is KErrDied |
|
843 |
sendResult(KErrCancel); // similar to emit handleCancelled(); |
|
844 |
RDEBUG("calling close()", 0); |
|
845 |
err = close(); |
|
846 |
RDEBUG("err", err); |
|
847 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
848 |
emit deviceDialogClosed(); |
|
849 |
// RDEBUG("emit closeDeviceDialog", 0); |
|
850 |
// this is old method emit closeDeviceDialog(false); // false means "not by client", although it's not really used |
|
851 |
RDEBUG("all emited", 0); |
|
852 |
} |
|
853 |
RDEBUG("not set KSecurityUIsDismissDialog", ESecurityUIsDismissDialogDone); |
|
854 |
// can't set it because it does recursion |
|
855 |
// err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsDismissDialog, ESecurityUIsDismissDialogDone ); // clear after using it |
|
856 |
RDEBUG("err", err); |
|
857 |
||
858 |
RDEBUG("reconnect subscriberKSecurityUIsDismissDialog", 0); |
|
859 |
connect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
860 |
RDEBUG("reconnected subscriberKSecurityUIsDismissDialog", 1); |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
861 |
} |
30 | 862 |
RDEBUG("1", 1); |
863 |
} |