|
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 * EAP Wizard: API for wizard pages. |
|
16 * |
|
17 */ |
|
18 |
|
19 // System includes |
|
20 #include <HbWidget> |
|
21 #include <HbDocumentLoader> |
|
22 #include <HbMainWindow> |
|
23 |
|
24 // User includes |
|
25 #include "eapwizardpage.h" |
|
26 #include "eapwizard_p.h" |
|
27 |
|
28 /*! |
|
29 \class EapWizardPage |
|
30 \brief Defines the interface for EAP specific wizard pages. |
|
31 */ |
|
32 |
|
33 /*! |
|
34 \fn HbWidget* EapWizardPage::initializePage() |
|
35 See WlanWizardPage. |
|
36 */ |
|
37 |
|
38 /*! |
|
39 \fn int EapWizardPage::nextId() const |
|
40 See WlanWizardPage. |
|
41 */ |
|
42 |
|
43 // External function prototypes |
|
44 |
|
45 // Local constants |
|
46 |
|
47 // ======== LOCAL FUNCTIONS ======== |
|
48 |
|
49 // ======== MEMBER FUNCTIONS ======== |
|
50 |
|
51 |
|
52 /*! |
|
53 Constructor. |
|
54 |
|
55 @param [in] parent Pointer to EAP Wizard private implementation. |
|
56 */ |
|
57 EapWizardPage::EapWizardPage(EapWizardPrivate* parent) : |
|
58 QObject(parent), |
|
59 mWizard(parent) |
|
60 { |
|
61 } |
|
62 |
|
63 /*! |
|
64 Destructor. |
|
65 */ |
|
66 EapWizardPage::~EapWizardPage() |
|
67 { |
|
68 mWizard = NULL; |
|
69 } |
|
70 |
|
71 /*! |
|
72 See WlanWizardPage. |
|
73 */ |
|
74 int EapWizardPage::nextId(bool &removeFromStack) const |
|
75 { |
|
76 removeFromStack = false; |
|
77 return nextId(); |
|
78 } |
|
79 |
|
80 /*! |
|
81 Loads requested section from given docml file. |
|
82 |
|
83 @param [in] loader Document loader for docml |
|
84 @param [in] orientation Orientation to be loaded |
|
85 @param [in] filename the name of docml filename |
|
86 @param [in] portraitSection the name of section to be loaded in portrait mode |
|
87 @param [in] landscapeSection the name of section to be loaded in landscape mode |
|
88 */ |
|
89 void EapWizardPage::loadDocmlSection( |
|
90 HbDocumentLoader *loader, |
|
91 Qt::Orientation orientation, |
|
92 const QString &filename, |
|
93 const QString &portraitSection, |
|
94 const QString &landscapeSection) const |
|
95 { |
|
96 bool ok; |
|
97 |
|
98 // Then load the orientation specific section |
|
99 if (orientation == Qt::Horizontal) { |
|
100 loader->load(filename, landscapeSection, &ok); |
|
101 Q_ASSERT(ok); |
|
102 } else { |
|
103 Q_ASSERT(orientation == Qt::Vertical); |
|
104 loader->load(filename, portraitSection, &ok); |
|
105 Q_ASSERT(ok); |
|
106 } |
|
107 } |