|
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: Ssid query |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef WLANWIZARDPAGESSID_H |
|
20 #define WLANWIZARDPAGESSID_H |
|
21 |
|
22 // System includes |
|
23 |
|
24 // User includes |
|
25 #include "wlanwizardpageinternal.h" |
|
26 #include "wlanwizardutils.h" |
|
27 |
|
28 // Forward declarations |
|
29 class WlanWizardPrivate; |
|
30 class HbLabel; |
|
31 class HbLineEdit; |
|
32 class HbDocumentLoader; |
|
33 class TestWlanWizardUi; |
|
34 |
|
35 // External data types |
|
36 |
|
37 // Constants |
|
38 |
|
39 /*! |
|
40 * @addtogroup group_wlan_wizard |
|
41 * @{ |
|
42 */ |
|
43 |
|
44 class WlanWizardPageSsid: public WlanWizardPageInternal |
|
45 { |
|
46 Q_OBJECT |
|
47 friend class TestWlanWizardUi; |
|
48 public: |
|
49 /*! |
|
50 * Constructor method for the SSID query view object. |
|
51 * @param parent pointer to parent object. |
|
52 */ |
|
53 WlanWizardPageSsid(WlanWizardPrivate* parent); |
|
54 |
|
55 /*! |
|
56 * Destructor for the SSID query view object. |
|
57 */ |
|
58 ~WlanWizardPageSsid(); |
|
59 |
|
60 /*! |
|
61 * Page initialization procedures. Inherited from WlanWizardPage. |
|
62 */ |
|
63 HbWidget* initializePage(); |
|
64 |
|
65 /*! |
|
66 * This method is overrides the default implementation from WlanWizardPage. |
|
67 * It indicates whether the Next-button should be enabled or not. |
|
68 * @return true, if mSsid edit field is not empty. |
|
69 */ |
|
70 virtual bool showPage(); |
|
71 |
|
72 /*! |
|
73 * Validates the SSID selection and sets the configuration in |
|
74 * the wlanwizard. |
|
75 * @param removeFromStack output parameter that returns false. |
|
76 * @return WlanWizardPageScanning page id. |
|
77 */ |
|
78 int nextId(bool &removeFromStack) const; |
|
79 |
|
80 public slots: |
|
81 /*! |
|
82 * Loads the document orientation information from occ_add_wlan_01_04.docml |
|
83 * This is called each time phone orientation changes. |
|
84 * @param orientation indicates whether the phone is in portrait or |
|
85 * landscape mode. |
|
86 */ |
|
87 void loadDocml(Qt::Orientation orientation); |
|
88 |
|
89 /*! |
|
90 * Executed when changes have been made to the mSsid field. |
|
91 * @param text is not used at this point. |
|
92 */ |
|
93 void textChanged(const QString &text); |
|
94 |
|
95 protected: |
|
96 /*! |
|
97 * Reimplements QObject function that is invoked on any event. This |
|
98 * function handles only a focus event to mSsid edit field. |
|
99 * @param obj contains the object, where the event originates from. |
|
100 * @param event contains the event id. |
|
101 */ |
|
102 bool eventFilter(QObject *obj, QEvent *event); |
|
103 |
|
104 private: |
|
105 /*! |
|
106 * Converts status identifier to plain-text QString format. |
|
107 * @param status indicates SSID status code. |
|
108 * @return status text. |
|
109 */ |
|
110 QString SsidStatusToErrorString(WlanWizardUtils::SsidStatus status) const; |
|
111 |
|
112 private: |
|
113 /*! |
|
114 * Pointer to the view. |
|
115 */ |
|
116 HbWidget *mWidget; |
|
117 |
|
118 /*! |
|
119 * Pointer to the header label object. |
|
120 */ |
|
121 HbLabel *mLabel; |
|
122 |
|
123 /*! |
|
124 * Pointer to the line edit object. |
|
125 */ |
|
126 HbLineEdit *mSsid; |
|
127 |
|
128 /*! |
|
129 * Pointer to error label object. |
|
130 */ |
|
131 HbLabel *mLabelError; |
|
132 |
|
133 /*! |
|
134 * Pointer to the document loader object. |
|
135 */ |
|
136 HbDocumentLoader *mLoader; |
|
137 }; |
|
138 |
|
139 /*! @} */ |
|
140 |
|
141 #endif |