|
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 packet data AP settings view header file. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CPPACKETDATAAPVIEW_H |
|
20 #define CPPACKETDATAAPVIEW_H |
|
21 |
|
22 // System includes |
|
23 #include <QSharedPointer> |
|
24 #include <QMap> |
|
25 #include <HbMessageBox> |
|
26 #include <cpbasesettingview.h> |
|
27 |
|
28 // User includes |
|
29 |
|
30 // Forward declarations |
|
31 class HbDataForm; |
|
32 class HbDataFormModel; |
|
33 class HbDataFormModelItem; |
|
34 class HbMessageBox; |
|
35 class CmConnectionMethodShim; |
|
36 class CpPacketDataApPlugin; |
|
37 |
|
38 // External data types |
|
39 |
|
40 // Constants |
|
41 |
|
42 // Class declaration |
|
43 class CpPacketDataApView : public CpBaseSettingView |
|
44 { |
|
45 Q_OBJECT |
|
46 |
|
47 public: |
|
48 CpPacketDataApView( |
|
49 CmConnectionMethodShim *cmConnectionMethod, |
|
50 QGraphicsItem *parent = 0); |
|
51 ~CpPacketDataApView(); |
|
52 |
|
53 signals: |
|
54 |
|
55 public slots: |
|
56 |
|
57 protected: |
|
58 |
|
59 protected slots: |
|
60 |
|
61 private: |
|
62 void createAccessPointSettingsGroup(); |
|
63 void updateAccessPointSettingsGroup(); |
|
64 void showMessageBox( |
|
65 HbMessageBox::MessageBoxType type, |
|
66 const QString &text); |
|
67 bool tryUpdate(); |
|
68 void handleUpdateError(); |
|
69 |
|
70 private slots: |
|
71 void connectionNameChanged(); |
|
72 void accessPointNameChanged(); |
|
73 void userNameChanged(); |
|
74 void promptForAuthChanged(int state); |
|
75 void passwordChanged(); |
|
76 void authenticationChanged(int index); |
|
77 void homepageChanged(); |
|
78 void menuActionTriggered(HbAction *action); |
|
79 void restoreCurrentView(); |
|
80 void setEditorPreferences(const QModelIndex modelIndex); |
|
81 |
|
82 private: // data |
|
83 //! Dataform |
|
84 HbDataForm *mForm; |
|
85 //! Dataform model |
|
86 HbDataFormModel *mModel; |
|
87 //! "Access point settings" group |
|
88 HbDataFormModelItem *mApSettingsGroupItem; |
|
89 //! "Connection name" setting item |
|
90 HbDataFormModelItem *mConnectionNameItem; |
|
91 //! "Access point name" setting item |
|
92 HbDataFormModelItem *mAccessPointNameItem; |
|
93 //! "User name" setting item |
|
94 HbDataFormModelItem *mUserNameItem; |
|
95 //! "Prompt" setting item |
|
96 HbDataFormModelItem *mPromptForAuthItem; |
|
97 //! "Password" setting item |
|
98 HbDataFormModelItem *mPasswordItem; |
|
99 //! "Authentication" setting item |
|
100 HbDataFormModelItem *mAuthenticationItem; |
|
101 //! "Homepage" setting item |
|
102 HbDataFormModelItem *mHomepageItem; |
|
103 //! "Advanced settings" action for view menu |
|
104 HbAction *mAdvancedSettingsAction; |
|
105 //! Connection Settings Shim connection method pointer |
|
106 CmConnectionMethodShim *mCmConnectionMethod; |
|
107 //! Message box for info notes |
|
108 QSharedPointer<HbMessageBox> mMessageBox; |
|
109 //! Maps checkbox value to CMManagerShim::PacketDataIFPromptForAuth value |
|
110 QMap<Qt::CheckState, bool> mPromptForAuthMap; |
|
111 //! Maps authentication combobox index to CMManagerShim::PacketDataDisablePlainTextAuth value |
|
112 QMap<int, bool> mAuthenticationMap; |
|
113 |
|
114 // Friend classes |
|
115 friend class TestCpPacketDataApPlugin; |
|
116 }; |
|
117 |
|
118 #endif // CPPACKETDATAAPVIEW_H |