31
|
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 |
* WLAN Wizard Page: Security mode selection
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
/*
|
|
20 |
* %version: 10 %
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef WLANWIZARDPAGESECURITYMODE_H
|
|
24 |
#define WLANWIZARDPAGESECURITYMODE_H
|
|
25 |
|
|
26 |
// System includes
|
|
27 |
|
|
28 |
// User includes
|
|
29 |
#include "wlanwizardpageinternal.h"
|
|
30 |
|
|
31 |
// Forward declarations
|
|
32 |
class HbRadioButtonList;
|
|
33 |
class HbLabel;
|
|
34 |
class WlanWizardPrivate;
|
|
35 |
class HbDocumentLoader;
|
|
36 |
|
|
37 |
// External data types
|
|
38 |
|
|
39 |
// Constants
|
|
40 |
|
|
41 |
/*!
|
|
42 |
* @addtogroup group_wlan_wizard
|
|
43 |
* @{
|
|
44 |
*/
|
|
45 |
|
|
46 |
class WlanWizardPageSecurityMode: public WlanWizardPageInternal
|
|
47 |
{
|
|
48 |
Q_OBJECT
|
|
49 |
public:
|
|
50 |
/*!
|
|
51 |
* Constructor method for the Sequrity mode query view object.
|
|
52 |
* @param parent pointer to parent object.
|
|
53 |
*/
|
|
54 |
WlanWizardPageSecurityMode(WlanWizardPrivate* parent);
|
|
55 |
|
|
56 |
/*!
|
|
57 |
* Destructor for the Sequrity mode query view object.
|
|
58 |
*/
|
|
59 |
~WlanWizardPageSecurityMode();
|
|
60 |
|
|
61 |
/*!
|
|
62 |
* Page initialization procedures. Inherited from WlanWizardPage.
|
|
63 |
* @see WlanWizardPage
|
|
64 |
*/
|
|
65 |
HbWidget* initializePage();
|
|
66 |
|
|
67 |
/*!
|
|
68 |
* Validates the Sequrity more selection and sets the configuration in
|
|
69 |
* the wlanwizard.
|
|
70 |
* @param removeFromStack output parameter that returns false.
|
|
71 |
* @return depending on the sequrity mode, returns the appropriate view
|
|
72 |
* identifier.
|
|
73 |
*/
|
|
74 |
int nextId(bool &removeFromStack) const;
|
|
75 |
|
|
76 |
/*!
|
|
77 |
* This method is overrides the default implementation from WlanWizardPage.
|
|
78 |
* It indicates whether the Next-button should be enabled or not.
|
|
79 |
* @return true, if a mode has been selected.
|
|
80 |
*/
|
|
81 |
bool showPage();
|
|
82 |
|
|
83 |
private slots:
|
|
84 |
/*!
|
|
85 |
* Is invoked when user selects a mode from the radio button list.
|
|
86 |
* (HbRadioButtonList's itemSelected-signal)
|
|
87 |
* @param index of the selected item in the radio button list.
|
|
88 |
*/
|
|
89 |
void itemSelected(int index);
|
|
90 |
|
|
91 |
/*!
|
|
92 |
* Loads the document orientation information from occ_add_wlan_02_03.docml
|
|
93 |
* This is called each time phone orientation changes.
|
|
94 |
* @param orientation indicates whether the phone is in portrait or
|
|
95 |
* landscape mode.
|
|
96 |
*/
|
|
97 |
void loadDocml(Qt::Orientation orientation);
|
|
98 |
|
|
99 |
private:
|
|
100 |
|
|
101 |
/*!
|
|
102 |
* Support function that creates the contents of the security mode list.
|
|
103 |
*/
|
|
104 |
void populateSecModeList();
|
|
105 |
|
|
106 |
/*!
|
|
107 |
* A support function to map the radio button list to a generic network
|
|
108 |
* mode list. This enables the changing of button order without it
|
|
109 |
* affecting the entire class.
|
|
110 |
* @param list is a reference to a local list that will be placed as an
|
|
111 |
* argument to the radio button list.
|
|
112 |
* @param item is a reference to the text value that is appended to the
|
|
113 |
* list
|
|
114 |
* @param mode is the security mode associated with the item
|
|
115 |
* @param page is the id of the next wizard page when this item is selected.
|
|
116 |
* @param psk indicates whether password needs to be queried.
|
|
117 |
*/
|
|
118 |
void addToList(QStringList &list, const QString &item, int mode, int page,
|
|
119 |
bool psk);
|
|
120 |
|
|
121 |
/*!
|
|
122 |
* Pointer to the view.
|
|
123 |
*/
|
|
124 |
HbWidget *mWidget;
|
|
125 |
|
|
126 |
/*!
|
|
127 |
* Pointer to the radio button list object.
|
|
128 |
*/
|
|
129 |
HbRadioButtonList *mList;
|
|
130 |
|
|
131 |
/*!
|
|
132 |
* Pointer to the label object.
|
|
133 |
*/
|
|
134 |
HbLabel *mLabel;
|
|
135 |
|
|
136 |
/*!
|
|
137 |
* Pointer to document loader object.
|
|
138 |
*/
|
|
139 |
HbDocumentLoader *mLoader;
|
|
140 |
|
|
141 |
/*!
|
|
142 |
* True, if a mode has been selected. False otherwise.
|
|
143 |
*/
|
|
144 |
bool mValid;
|
|
145 |
|
|
146 |
/*!
|
|
147 |
* List of sequrity modes. This list is tied to the radio buttons during
|
|
148 |
* the initialization of the page.
|
|
149 |
*/
|
|
150 |
QList<int> mSecModes;
|
|
151 |
|
|
152 |
/*!
|
|
153 |
* List of page identifiers. This list is tied to the radio buttons during
|
|
154 |
* the initialization of the page.
|
|
155 |
*/
|
|
156 |
QList<int> mPageIds;
|
|
157 |
|
|
158 |
/*!
|
|
159 |
* List of password usage. This list is tied to the radio buttons during
|
|
160 |
* the initialization of the page. True, if password is to be queried,
|
|
161 |
* false otherwise
|
|
162 |
*/
|
|
163 |
QList<bool> mUsePsk;
|
|
164 |
};
|
|
165 |
|
|
166 |
/*! @} */
|
|
167 |
|
|
168 |
#endif
|