|
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 * Control Panel QT UI for EAP-SIM and EAP-AKA method configuration |
|
16 * |
|
17 */ |
|
18 |
|
19 /* |
|
20 * %version: 11 % |
|
21 */ |
|
22 |
|
23 #ifndef CPEAPSIMAKAUI_H |
|
24 #define CPEAPSIMAKAUI_H |
|
25 |
|
26 // System includes |
|
27 #include <cpbasesettingview.h> |
|
28 #include <eapqtconfiginterface.h> |
|
29 #include <eapqtplugininfo.h> |
|
30 #include <eapqtpluginhandle.h> |
|
31 |
|
32 // User includes |
|
33 |
|
34 // Forward declarations |
|
35 class HbDataForm; |
|
36 class HbDataFormModel; |
|
37 class CpSettingFormItemData; |
|
38 class EapQtValidator; |
|
39 |
|
40 // External data types |
|
41 |
|
42 // Constants |
|
43 |
|
44 /*! |
|
45 * @addtogroup group_eap_ui_plugin_simaka |
|
46 * @{ |
|
47 */ |
|
48 |
|
49 class CpEapSimAkaUi: public CpBaseSettingView |
|
50 { |
|
51 Q_OBJECT |
|
52 |
|
53 public: |
|
54 CpEapSimAkaUi( |
|
55 const EapQtConfigInterface::EapBearerType bearer, |
|
56 const int iapId, |
|
57 const EapQtPluginInfo &plugin, |
|
58 const EapQtPluginHandle& outerHandle); |
|
59 ~CpEapSimAkaUi(); |
|
60 |
|
61 protected: |
|
62 void close(); |
|
63 |
|
64 private: |
|
65 void initializeSimAkaUi(); |
|
66 bool checkStateToBool(const int state); |
|
67 int boolToCheckState(const bool state); |
|
68 void storeSettings(); |
|
69 bool validate(); |
|
70 bool validateGroup(CpSettingFormItemData *edit, CpSettingFormItemData *checkBox, |
|
71 EapQtValidator* validator); |
|
72 |
|
73 private slots: |
|
74 void setValidator(const QModelIndex); |
|
75 void usernameAutomaticChanged(int state); |
|
76 void realmAutomaticChanged(int state); |
|
77 |
|
78 private: |
|
79 QScopedPointer <EapQtConfigInterface> mConfigIf; |
|
80 EapQtPluginInfo mPluginInfo; |
|
81 EapQtPluginHandle mOuterHandle; |
|
82 HbDataForm *mForm; |
|
83 HbDataFormModel *mModel; |
|
84 CpSettingFormItemData *mUsernameAutomatic; |
|
85 CpSettingFormItemData *mUsername; |
|
86 CpSettingFormItemData *mRealmAutomatic; |
|
87 CpSettingFormItemData *mRealm; |
|
88 |
|
89 EapQtValidator *mValidatorRealm; |
|
90 EapQtValidator *mValidatorUsername; |
|
91 }; |
|
92 |
|
93 /*! @} */ |
|
94 |
|
95 #endif |