15 * Control Panel QT UI for WEP configuration |
15 * Control Panel QT UI for WEP configuration |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 /* |
19 /* |
20 * %version: 13 % |
20 * %version: 17 % |
21 */ |
21 */ |
22 |
22 |
23 #ifndef CPWEPUI_H |
23 #ifndef CPWEPUI_H |
24 #define CPWEPUI_H |
24 #define CPWEPUI_H |
25 |
25 |
26 // System includes |
26 // System includes |
27 #include <cpsettingformitemdata.h> |
27 #include <cpsettingformitemdata.h> |
28 #include <QStringList> |
28 #include <QStringList> |
29 #include <HbMessageBox> |
29 #include <HbMessageBox> |
30 //#include <HbTranslator> |
30 #include <cpwlansecurityplugininterface.h> |
31 //#include <QSharedPointer> |
|
32 #include <QTranslator> |
|
33 |
31 |
34 //User Includes |
32 //User Includes |
35 #include "cpwlansecurityplugininterface.h" |
|
36 #include "wlansecuritycontrolpanelwepdefs.h" |
|
37 #include "wepkeyvalidator.h" |
|
38 |
33 |
39 // Forward declarations |
34 // Forward declarations |
40 class QTranslator; |
|
41 class CmConnectionMethodShim; |
35 class CmConnectionMethodShim; |
42 class CpWepKeyValidation; |
36 class HbTranslator; |
43 /*! |
37 class WepKeyValidator; |
44 * @addtogroup group_wlan_security_ui_plugin_wep |
38 |
45 * @{ |
39 //Constant declarations |
46 */ |
40 //!Maximum Number of Keys for WEP |
|
41 static const int KMaxNumberofKeys = 4; |
47 |
42 |
48 /*! |
43 /*! |
49 * Implements WEP plugin for Wlan security control panel |
44 * Implements WEP plugin for Wlan security control panel |
50 */ |
45 */ |
51 |
46 |
69 void setReference(CmConnectionMethodShim *cmCm, uint id); |
64 void setReference(CmConnectionMethodShim *cmCm, uint id); |
70 |
65 |
71 int orderNumber() const; |
66 int orderNumber() const; |
72 |
67 |
73 CpSettingFormItemData* uiInstance(CpItemDataHelper &dataHelper); |
68 CpSettingFormItemData* uiInstance(CpItemDataHelper &dataHelper); |
|
69 |
|
70 bool validateSettings(); |
74 |
71 |
75 public: |
72 private: |
76 |
73 |
77 enum WEPKeyFormat |
74 enum WEPKeyFormat |
78 { |
75 { |
79 EFormatHex, EFormatAscii, |
76 EFormatHex, EFormatAscii, |
80 }; |
77 }; |
108 |
105 |
109 void setKeyFormat(QString& key,int index); |
106 void setKeyFormat(QString& key,int index); |
110 |
107 |
111 CMManagerShim::ConnectionMethodAttribute getWEPKeyEnum(int index); |
108 CMManagerShim::ConnectionMethodAttribute getWEPKeyEnum(int index); |
112 |
109 |
|
110 void createWEPKeyGroup(int index); |
|
111 |
|
112 void addConnections(CpItemDataHelper &dataHelpper); |
|
113 |
113 private slots: |
114 private slots: |
114 |
115 |
115 void wepKeyInUseChanged(int index); |
116 void wepKeyInUseChanged(int index); |
116 |
117 |
117 void wepKeyOneChanged(); |
118 void wepKeyOneChanged(); |
138 //! WEP keys text item |
141 //! WEP keys text item |
139 CpSettingFormItemData *mWepKeyText[KMaxNumberofKeys]; |
142 CpSettingFormItemData *mWepKeyText[KMaxNumberofKeys]; |
140 |
143 |
141 //!Store the index of the current key in use |
144 //!Store the index of the current key in use |
142 int mNewKeySelected; |
145 int mNewKeySelected; |
|
146 |
|
147 //!Translator for all the localisation Text Id's |
|
148 HbTranslator* mTranslator; |
143 |
149 |
144 //QSharedPointer<HbTranslator> mTranslator; |
150 //!Connection Settings Shim connection method pointer |
145 QTranslator* mTranslator; |
|
146 |
|
147 //! Connection Settings Shim connection method pointer |
|
148 CmConnectionMethodShim *mCmCM; |
151 CmConnectionMethodShim *mCmCM; |
149 |
152 |
150 //! Connection method Id |
153 //! Connection method Id |
151 int mCmId; |
154 int mCmId; |
152 |
155 |
153 //! Message box for info notes |
156 //! Message box for info notes |
154 QSharedPointer<HbMessageBox> mMessageBox; |
157 QSharedPointer<HbMessageBox> mMessageBox; |
155 |
158 |
156 //! Store Formats of WEP keys |
159 //! Store Formats of WEP keys |
157 WEPKeyFormat mkeyFormat[KMaxNumberofKeys]; |
160 WEPKeyFormat mkeyFormat[KMaxNumberofKeys]; |
|
161 |
|
162 CpItemDataHelper* mItemDataHelper; |
158 |
163 |
159 |
164 |
160 |
165 |
161 }; |
166 }; |
162 |
167 |