1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
62 protected: |
63 protected: |
63 bool eventFilter(QObject *obj, QEvent *event); |
64 bool eventFilter(QObject *obj, QEvent *event); |
64 void close(); |
65 void close(); |
65 |
66 |
66 private: |
67 private: |
67 void initializeUserPasswordUi(); |
68 void createUi(); |
|
69 void createUsername(); |
|
70 void createPassword(); |
|
71 |
68 bool checkStateToBool(const int state); |
72 bool checkStateToBool(const int state); |
69 int boolToCheckState(const bool state); |
73 int boolToCheckState(const bool state); |
70 void storeSettings(); |
74 |
|
75 bool storeSettings(); |
71 bool validate(); |
76 bool validate(); |
|
77 bool validateUsername(); |
72 bool validatePasswordGroup(); |
78 bool validatePasswordGroup(); |
73 |
79 |
74 private slots: |
80 private slots: |
75 void setValidator(const QModelIndex); |
81 void setValidator(const QModelIndex); |
76 void passwordPromptChanged(int state); |
82 void passwordPromptChanged(int state); |
77 void passwordChanged(); |
83 void passwordChanged(); |
78 |
84 |
79 private: |
85 private: |
|
86 //! Pointer to EapQtConfigInterface |
80 QScopedPointer <EapQtConfigInterface> mConfigIf; |
87 QScopedPointer <EapQtConfigInterface> mConfigIf; |
|
88 //! Plugin info |
81 EapQtPluginInfo mPluginInfo; |
89 EapQtPluginInfo mPluginInfo; |
|
90 //! Outer handle |
82 EapQtPluginHandle mOuterHandle; |
91 EapQtPluginHandle mOuterHandle; |
|
92 //! Current EAP configuration |
|
93 EapQtConfig mEapConfig; |
|
94 |
|
95 //! Dataform |
83 HbDataForm *mForm; |
96 HbDataForm *mForm; |
|
97 //! Datform model |
84 HbDataFormModel *mModel; |
98 HbDataFormModel *mModel; |
|
99 //! Control Panel item data helper for username-password plugins |
|
100 CpItemDataHelper *mItemDataHelper; |
|
101 //! Username-password settings group |
|
102 HbDataFormModelItem *mGroupItem; |
|
103 //! Username lineEdit |
85 CpSettingFormItemData *mUsername; |
104 CpSettingFormItemData *mUsername; |
|
105 //! Prompt password checkBox |
86 CpSettingFormItemData *mPasswordPrompt; |
106 CpSettingFormItemData *mPasswordPrompt; |
|
107 //! Password lineEdit |
87 CpSettingFormItemData *mPassword; |
108 CpSettingFormItemData *mPassword; |
88 |
109 |
|
110 //! Realm validator |
89 QScopedPointer<EapQtValidator> mValidatorUsername; |
111 QScopedPointer<EapQtValidator> mValidatorUsername; |
|
112 //! Password validator |
90 QScopedPointer<EapQtValidator> mValidatorPassword; |
113 QScopedPointer<EapQtValidator> mValidatorPassword; |
91 |
114 |
|
115 //! Password is stored |
92 bool mPasswordStored; |
116 bool mPasswordStored; |
|
117 //! Password is saved |
93 bool mPasswordChanged; |
118 bool mPasswordChanged; |
|
119 //! Password lineEdit |
94 HbLineEdit *mPasswordEdit; |
120 HbLineEdit *mPasswordEdit; |
95 |
121 |
96 }; |
122 }; |
97 |
123 |
98 /*! @} */ |
124 /*! @} */ |