|
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 "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: EAP-MSCHAPv2 Old Password Input Dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 4 % |
|
20 */ |
|
21 |
|
22 #ifndef __EAPMSCHAPV2OLDPWDDIALOG_H__ |
|
23 #define __EAPMSCHAPV2OLDPWDDIALOG_H__ |
|
24 |
|
25 // System includes |
|
26 #include <HbInputDialog> |
|
27 #include <hbdevicedialoginterface.h> |
|
28 |
|
29 // User includes |
|
30 |
|
31 // Forward declarations |
|
32 class HbTranslator; |
|
33 class EapQtValidator; |
|
34 |
|
35 // External data types |
|
36 |
|
37 // Constants |
|
38 |
|
39 /*! |
|
40 @addtogroup group_eap_mschapv2_old_pwd_dialog |
|
41 @{ |
|
42 */ |
|
43 |
|
44 // Class declaration |
|
45 |
|
46 class EapMschapv2OldPwdDialog: public HbInputDialog, public HbDeviceDialogInterface |
|
47 { |
|
48 Q_OBJECT |
|
49 |
|
50 public: |
|
51 /* Constructor */ |
|
52 EapMschapv2OldPwdDialog(const QVariantMap ¶meters); |
|
53 |
|
54 /* Destructor */ |
|
55 ~EapMschapv2OldPwdDialog(); |
|
56 |
|
57 /* Function creates the actual dialog widget */ |
|
58 void createDialog( const QVariantMap ¶meters ); |
|
59 |
|
60 /* Device dialog parameters to be set while dialog is displayed. |
|
61 * Not supported. |
|
62 * (from HbDeviceDialogInterface) |
|
63 */ |
|
64 bool setDeviceDialogParameters(const QVariantMap ¶meters); |
|
65 |
|
66 /* Not supported. (from HbDeviceDialogInterface) */ |
|
67 int deviceDialogError() const; |
|
68 |
|
69 /* Closes the device dialog. (from HbDeviceDialogInterface) */ |
|
70 void closeDeviceDialog(bool byClient); |
|
71 |
|
72 /* Returns a pointer to this dialog widget. |
|
73 (from HbDeviceDialogInterface) */ |
|
74 HbPopup *deviceDialogWidget() const; |
|
75 |
|
76 signals: |
|
77 /* Signal is emitted when the dialog is closed */ |
|
78 void deviceDialogClosed(); |
|
79 |
|
80 /* Data is emitted in QVariantMap when Ok Action button is selected */ |
|
81 void deviceDialogData(QVariantMap data); |
|
82 |
|
83 private slots: |
|
84 /* Slot that is mapped to the Ok Action button's triggered signal */ |
|
85 void okPressed(); |
|
86 |
|
87 /* Slot that is mapped to the Cancel Action button's triggered signal */ |
|
88 void cancelPressed(); |
|
89 |
|
90 /* Slot that is mapped to the signal that indicates to closing of the dialog */ |
|
91 void closingDialog(); |
|
92 |
|
93 private: |
|
94 |
|
95 bool validate() const; |
|
96 |
|
97 Q_DISABLE_COPY(EapMschapv2OldPwdDialog) |
|
98 |
|
99 private: // data |
|
100 // NOT OWNED |
|
101 //! Pointer to the line edit object |
|
102 HbLineEdit *mEdit; |
|
103 |
|
104 // OWNED |
|
105 //! Pointer to the password validator object |
|
106 QScopedPointer<EapQtValidator> mPwdValidator; |
|
107 |
|
108 //! Pointer to the HbTranslator |
|
109 QScopedPointer<HbTranslator> mTranslator; |
|
110 |
|
111 //! Tells whether Ok Action has already been pressed |
|
112 bool mOkActionPressed; |
|
113 |
|
114 //! Tells whether close has already been called for the dialog |
|
115 bool mClose; |
|
116 }; |
|
117 |
|
118 /*! @} */ |
|
119 |
|
120 #endif // __EAPMSCHAPV2OLDPWDDIALOG_H__ |
|
121 |