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 WLAN AP settings view header file. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CPWLANAPVIEW_H |
|
20 #define CPWLANAPVIEW_H |
|
21 |
|
22 // System includes |
|
23 #include <QSharedPointer> |
|
24 #include <QMap> |
|
25 #include <HbMessageBox> |
|
26 #include <cpbasesettingview.h> |
|
27 #include <cmconnectionmethod_shim.h> |
|
28 |
|
29 // User includes |
|
30 |
|
31 // Forward declarations |
|
32 class HbDataForm; |
|
33 class HbDataFormModel; |
|
34 class HbDataFormModelItem; |
|
35 class HbMessageBox; |
|
36 class CmConnectionMethodShim; |
|
37 class CpWlanApPlugin; |
|
38 class CpWlanSecurityPluginInterface; |
|
39 |
|
40 // External data types |
|
41 |
|
42 // Constants |
|
43 |
|
44 // Class declaration |
|
45 class CpWlanApView : public CpBaseSettingView |
|
46 { |
|
47 Q_OBJECT |
|
48 |
|
49 public: |
|
50 CpWlanApView( |
|
51 CmConnectionMethodShim *cmConnectionMethod, |
|
52 QGraphicsItem *parent = 0); |
|
53 ~CpWlanApView(); |
|
54 |
|
55 signals: |
|
56 |
|
57 public slots: |
|
58 |
|
59 protected: |
|
60 |
|
61 protected slots: |
|
62 |
|
63 private: |
|
64 Q_DISABLE_COPY(CpWlanApView) |
|
65 |
|
66 void createAccessPointSettingsGroup(); |
|
67 void updateAccessPointSettingsGroup(); |
|
68 void loadSecurityPlugins( |
|
69 CMManagerShim::WlanConnMode networkMode); |
|
70 void updateSecurityGroup(int index); |
|
71 void showMessageBox( |
|
72 HbMessageBox::MessageBoxType type, |
|
73 const QString &text); |
|
74 bool tryUpdate(); |
|
75 void handleUpdateError(); |
|
76 void updateAdHocChannelItem( |
|
77 CMManagerShim::WlanConnMode networkMode); |
|
78 void updateSecurityModeItem( |
|
79 CMManagerShim::WlanConnMode networkMode); |
|
80 |
|
81 private slots: |
|
82 void connectionNameChanged(); |
|
83 void wlanNetworkNameChanged(); |
|
84 void networkStatusChanged(int index); |
|
85 void networkModeChanged(int index); |
|
86 void adHocChannelChanged(int index); |
|
87 void securityModeChanged(int index); |
|
88 void homepageChanged(); |
|
89 void menuActionTriggered(HbAction *action); |
|
90 void restoreCurrentView(); |
|
91 void setEditorPreferences(const QModelIndex modelIndex); |
|
92 |
|
93 private: // data |
|
94 // WLAN ad-hoc channel minimum and maximum values |
|
95 static const uint WlanAdHocChannelMinValue = 1; |
|
96 static const uint WlanAdHocChannelMaxValue = 11; |
|
97 |
|
98 //! Dataform |
|
99 HbDataForm *mForm; |
|
100 //! Dataform model |
|
101 HbDataFormModel *mModel; |
|
102 //! Control Panel item data helper for WLAN security plugins |
|
103 CpItemDataHelper *mItemDataHelper; |
|
104 //! "Access point settings" group |
|
105 HbDataFormModelItem *mApSettingsGroupItem; |
|
106 //! "Connection name" setting item |
|
107 HbDataFormModelItem *mConnectionNameItem; |
|
108 //! "WLAN network name" setting item |
|
109 HbDataFormModelItem *mWlanNetworkNameItem; |
|
110 //! "Network status" setting item |
|
111 HbDataFormModelItem *mNetworkStatusItem; |
|
112 //! "Network mode" setting item |
|
113 HbDataFormModelItem *mNetworkModeItem; |
|
114 //! "Ad-hoc channel" setting item |
|
115 HbDataFormModelItem *mAdHocChannelItem; |
|
116 //! "Security mode" setting item |
|
117 HbDataFormModelItem *mSecurityModeItem; |
|
118 //! "Homepage" setting item |
|
119 HbDataFormModelItem *mHomepageItem; |
|
120 //! "Security settings" group |
|
121 HbDataFormModelItem *mSecuritySettingsGroupItem; |
|
122 //! "Advanced settings" action for view menu |
|
123 HbAction *mAdvancedSettingsAction; |
|
124 //! Connection Settings Shim connection method pointer |
|
125 CmConnectionMethodShim *mCmConnectionMethod; |
|
126 //! Message box for info notes |
|
127 QSharedPointer<HbMessageBox> mMessageBox; |
|
128 //! Maps network status combobox index to CMManagerShim::WlanScanSSID value |
|
129 QMap<int, bool> mNetworkStatusMap; |
|
130 //! Maps network mode combobox index to CMManagerShim::WlanConnectionMode value |
|
131 QMap<int, int> mNetworkModeMap; |
|
132 //! Maps security mode combobox index to corresponding security plugin pointer |
|
133 QMap<int, CpWlanSecurityPluginInterface *> mSecurityModeMap; |
|
134 |
|
135 // Friend classes |
|
136 friend class TestCpWlanApPlugin; |
|
137 }; |
|
138 |
|
139 #endif // CPWLANAPVIEW_H |
|