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. |
15 * EAP method validator: username |
15 * EAP method validator: username |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 /* |
19 /* |
20 * %version: 5 % |
20 * %version: 7 % |
21 */ |
21 */ |
22 |
22 |
23 #ifndef EAPQTVALIDATOR_USERNAME_H |
23 #ifndef EAPQTVALIDATORUSERNAME_H |
24 #define EAPQTVALIDATOR_USERNAME_H |
24 #define EAPQTVALIDATORUSERNAME_H |
25 |
25 |
|
26 // System includes |
26 #include <eapqtvalidator.h> |
27 #include <eapqtvalidator.h> |
27 #include <eapqtexpandedeaptype.h> |
28 #include <eapqtexpandedeaptype.h> |
28 |
29 |
29 /*! |
30 // User includes |
30 * @addtogroup group_eap_config_if_impl |
31 |
31 * @{ |
32 // Forward declarations |
32 */ |
33 |
33 /*! |
34 // External data types |
34 */ |
35 |
|
36 // Constants |
|
37 |
|
38 // Class declaration |
35 class EapQtValidatorUsername: public EapQtValidator |
39 class EapQtValidatorUsername: public EapQtValidator |
36 { |
40 { |
|
41 |
37 public: |
42 public: |
38 |
43 |
39 explicit EapQtValidatorUsername(EapQtExpandedEapType type); |
44 // Data types |
|
45 |
|
46 explicit EapQtValidatorUsername(const EapQtExpandedEapType& type); |
40 ~EapQtValidatorUsername(); |
47 ~EapQtValidatorUsername(); |
41 |
48 |
42 // from EapQtValidator |
49 // from EapQtValidator |
43 EapQtValidator::Status validate(QVariant value); |
50 EapQtValidator::Status validate(const QVariant& value); |
44 void updateEditor(HbLineEdit *edit); |
51 void updateEditor(HbLineEdit* const edit); |
45 |
52 |
46 private: |
53 private: |
47 |
54 |
48 EapQtValidatorUsername(); |
55 EapQtValidatorUsername(); |
49 Q_DISABLE_COPY(EapQtValidatorUsername) |
56 Q_DISABLE_COPY(EapQtValidatorUsername) |
50 |
57 |
51 EapQtValidator::Status validateGeneral(QVariant value); |
58 EapQtValidator::Status validateGeneral(const QVariant& value); |
52 bool validateCharacters(QString& str); |
59 bool validateCharacters(const QString& str); |
53 void updateEditorGeneral(HbLineEdit *edit); |
60 void updateEditorGeneral(HbLineEdit* const edit); |
|
61 bool isEmptyAllowed(); |
54 |
62 |
55 private: |
63 private: // data |
|
64 |
56 EapQtExpandedEapType mEapType; |
65 EapQtExpandedEapType mEapType; |
57 |
66 |
58 }; |
67 }; |
59 |
68 |
60 /*! @} */ |
69 #endif // EAPQTVALIDATORUSERNAME_H |
61 |
|
62 #endif |
|
63 |
|