securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpacstorepassword.cpp
changeset 26 9abfd4f00d37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpacstorepassword.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: PAC Store password
+ *
+ */
+
+/*
+ * %version: 4 %
+ */
+
+#include <HbEditorInterface>
+#include <HbLineEdit>
+#include "eapqtvalidatorpacstorepassword.h"
+
+EapQtValidatorPacStorePassword::EapQtValidatorPacStorePassword()
+{
+}
+
+EapQtValidatorPacStorePassword::~EapQtValidatorPacStorePassword()
+{
+}
+
+EapQtValidator::Status EapQtValidatorPacStorePassword::validate(QVariant value)
+{
+    // TODO: implement this
+    if (value.toString().length() > 0) {
+        return EapQtValidator::StatusOk;
+    }   
+    return EapQtValidator::StatusInvalid;
+}
+
+void EapQtValidatorPacStorePassword::updateEditor(HbLineEdit *edit)
+{
+    HbEditorInterface editInterface(edit);
+    editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+    edit->setInputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
+    // TODO:
+    edit->setMaxLength(1000);
+}