|
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: |
|
15 * Control Panel QT UI for PAC store configuration |
|
16 * |
|
17 */ |
|
18 |
|
19 /* |
|
20 * %version: 5 % |
|
21 */ |
|
22 |
|
23 #ifndef CPEAPPACSTOREUI_H |
|
24 #define CPEAPPACSTOREUI_H |
|
25 |
|
26 // System includes |
|
27 #include <HbMessageBox> |
|
28 #include <cpbasesettingview.h> |
|
29 #include <cpsettingformitemdata.h> |
|
30 #include <eapqtconfiginterface.h> |
|
31 |
|
32 // User includes |
|
33 |
|
34 // Forward declarations |
|
35 class HbDataFormModelItem; |
|
36 class HbMessageBox; |
|
37 class HbInputDialog; |
|
38 class EapQtValidator; |
|
39 |
|
40 // External data types |
|
41 |
|
42 // Constants |
|
43 |
|
44 /*! |
|
45 * @addtogroup group_eap_ui_plugin_eap_tlsmethods |
|
46 * @{ |
|
47 */ |
|
48 // Class declaration |
|
49 class CpEapPacStoreUi : public CpSettingFormItemData |
|
50 { |
|
51 Q_OBJECT |
|
52 |
|
53 public: |
|
54 CpEapPacStoreUi(EapQtConfigInterface *configIf); |
|
55 ~CpEapPacStoreUi(); |
|
56 |
|
57 CpSettingFormItemData* uiInstance( |
|
58 CpItemDataHelper &dataHelper); |
|
59 |
|
60 signals: |
|
61 |
|
62 public slots: |
|
63 |
|
64 protected: |
|
65 |
|
66 protected slots: |
|
67 |
|
68 private: |
|
69 enum PacStorePasswordIndexes { |
|
70 PacStorePasswordPrompt, |
|
71 PacStorePasswordUserDefined |
|
72 }; |
|
73 |
|
74 private: |
|
75 void createPacStorePassword(); |
|
76 void createResetPacStore(); |
|
77 |
|
78 void setPacStorePasswordState(const PacStorePasswordIndexes state); |
|
79 |
|
80 void showExistPasswordQuery(); |
|
81 void showNewPasswordQuery(); |
|
82 void showMessageBox( |
|
83 HbMessageBox::MessageBoxType type, |
|
84 const QString &text); |
|
85 |
|
86 private slots: |
|
87 void pacStorePasswordChanged(int value); |
|
88 void resetPacStoreButtonPressed( |
|
89 QPersistentModelIndex index, |
|
90 QVariant value); |
|
91 |
|
92 void clearPacStorePasswordConfirmed(int action); |
|
93 void resetPacStoreConfirmed(int action); |
|
94 |
|
95 void completeExistPasswordQuery(); |
|
96 void completeNewPasswordQuery(); |
|
97 void cancelPasswordQuery(); |
|
98 void invalidPasswordInfoClosed(int action); |
|
99 |
|
100 private: |
|
101 //! Pointer to EapQtConfigInterface |
|
102 EapQtConfigInterface *mConfigIf; |
|
103 //! Control Panel item data helper |
|
104 CpItemDataHelper *mItemDataHelper; |
|
105 //! PAC store configuration |
|
106 EapQtPacStoreConfig mPacStoreConfig; |
|
107 |
|
108 //! PAC store group item |
|
109 QScopedPointer<CpSettingFormItemData> mPacStoreGroup; |
|
110 //! PAC store password comboBox |
|
111 CpSettingFormItemData *mPacStorePassword; |
|
112 //! Reset PAC store button |
|
113 CpSettingFormItemData *mResetPacStore; |
|
114 |
|
115 //! Validator for PAC store password |
|
116 QScopedPointer<EapQtValidator> mValidatorPacStore; |
|
117 |
|
118 //! State of PAC store password (prompt/user defined) |
|
119 int mPacStorePasswordState; |
|
120 //! PAC store password query dialog |
|
121 HbInputDialog *mExistPasswordDialog; |
|
122 //! New PAC store password query dialog |
|
123 HbInputDialog *mNewPasswordDialog; |
|
124 //! Message box for info notes |
|
125 QSharedPointer<HbMessageBox> mMessageBox; |
|
126 }; |
|
127 |
|
128 /*! @} */ |
|
129 |
|
130 #endif |