26
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* EAP method validator: PAC Store password
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
/*
|
|
20 |
* %version: 4 %
|
|
21 |
*/
|
|
22 |
|
|
23 |
#include <HbEditorInterface>
|
|
24 |
#include <HbLineEdit>
|
|
25 |
#include "eapqtvalidatorpacstorepassword.h"
|
|
26 |
|
|
27 |
EapQtValidatorPacStorePassword::EapQtValidatorPacStorePassword()
|
|
28 |
{
|
|
29 |
}
|
|
30 |
|
|
31 |
EapQtValidatorPacStorePassword::~EapQtValidatorPacStorePassword()
|
|
32 |
{
|
|
33 |
}
|
|
34 |
|
|
35 |
EapQtValidator::Status EapQtValidatorPacStorePassword::validate(QVariant value)
|
|
36 |
{
|
|
37 |
// TODO: implement this
|
|
38 |
if (value.toString().length() > 0) {
|
|
39 |
return EapQtValidator::StatusOk;
|
|
40 |
}
|
|
41 |
return EapQtValidator::StatusInvalid;
|
|
42 |
}
|
|
43 |
|
|
44 |
void EapQtValidatorPacStorePassword::updateEditor(HbLineEdit *edit)
|
|
45 |
{
|
|
46 |
HbEditorInterface editInterface(edit);
|
|
47 |
editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
|
|
48 |
edit->setInputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
|
|
49 |
// TODO:
|
|
50 |
edit->setMaxLength(1000);
|
|
51 |
}
|