|
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: Generic error page. |
|
16 * |
|
17 */ |
|
18 |
|
19 // System includes |
|
20 #include <HbMainWindow> |
|
21 #include <HbDocumentLoader> |
|
22 #include <HbWidget> |
|
23 #include <HbLabel> |
|
24 |
|
25 // User includes |
|
26 #include "wlanwizard_p.h" |
|
27 #include "wlanwizardpagegenericerror.h" |
|
28 #include "OstTraceDefinitions.h" |
|
29 #ifdef OST_TRACE_COMPILER_IN_USE |
|
30 #include "wlanwizardpageprocessingsettingsTraces.h" |
|
31 #endif |
|
32 |
|
33 /*! |
|
34 \class WlanWizardPageGenericError |
|
35 \brief Implements generic error page for wizard. |
|
36 |
|
37 Error text is read from the configurations |
|
38 (WlanWizardHelper::ConfGenericErrorString) of the wizard. |
|
39 */ |
|
40 |
|
41 // External function prototypes |
|
42 |
|
43 // Local constants |
|
44 |
|
45 // ======== LOCAL FUNCTIONS ======== |
|
46 |
|
47 // ======== MEMBER FUNCTIONS ======== |
|
48 |
|
49 |
|
50 /*! |
|
51 Constructor. |
|
52 |
|
53 @param [in] parent pointer to private implementation of wizard. |
|
54 */ |
|
55 WlanWizardPageGenericError::WlanWizardPageGenericError( |
|
56 WlanWizardPrivate* parent) : |
|
57 WlanWizardPageInternal(parent), |
|
58 mWidget(NULL), |
|
59 mLabel(NULL) |
|
60 { |
|
61 } |
|
62 |
|
63 /*! |
|
64 Destructor. |
|
65 */ |
|
66 WlanWizardPageGenericError::~WlanWizardPageGenericError() |
|
67 { |
|
68 // signals are automatically disconnected |
|
69 } |
|
70 |
|
71 /*! |
|
72 See WlanWizardPage::initializePage() |
|
73 */ |
|
74 HbWidget* WlanWizardPageGenericError::initializePage() |
|
75 { |
|
76 // Create the visualization at the first time |
|
77 if (!mWidget) { |
|
78 HbDocumentLoader docLoader(mWizard->mainWindow()); |
|
79 |
|
80 bool ok; |
|
81 docLoader.load(":/docml/occ_add_wlan_error.docml", &ok); |
|
82 Q_ASSERT(ok); |
|
83 |
|
84 mWidget = qobject_cast<HbWidget*> (docLoader.findWidget("occ_add_wlan_error")); |
|
85 Q_ASSERT(mWidget != NULL); |
|
86 |
|
87 mLabel = qobject_cast<HbLabel*> (docLoader.findWidget("dialog")); |
|
88 Q_ASSERT(mLabel != NULL); |
|
89 } |
|
90 |
|
91 // Get the error string from the wizards configurations |
|
92 mLabel->setPlainText( |
|
93 mWizard->configuration( |
|
94 WlanWizardHelper::ConfGenericErrorString).toString()); |
|
95 |
|
96 return mWidget; |
|
97 } |
|
98 |
|
99 /*! |
|
100 See WlanWizardPage::nextId() |
|
101 |
|
102 @param [out] removeFromStack return value is always false |
|
103 |
|
104 @return WlanWizardPageInternal::PageNone |
|
105 */ |
|
106 int WlanWizardPageGenericError::nextId(bool &removeFromStack) const |
|
107 { |
|
108 removeFromStack = false; |
|
109 return WlanWizardPageInternal::PageNone; |
|
110 } |
|
111 |
|
112 |
|
113 /*! |
|
114 See WlanWizardPage::showPage() |
|
115 |
|
116 @return false. Next button is dimmed when the page is displayed. |
|
117 */ |
|
118 bool WlanWizardPageGenericError::showPage() |
|
119 { |
|
120 return false; |
|
121 } |
|
122 |
|
123 |