equal
deleted
inserted
replaced
87 mLoader = new HbDocumentLoader(mWizard->mainWindow()); |
87 mLoader = new HbDocumentLoader(mWizard->mainWindow()); |
88 |
88 |
89 mLoader->load(":/docml/occ_wps_02_03.docml", &ok); |
89 mLoader->load(":/docml/occ_wps_02_03.docml", &ok); |
90 Q_ASSERT(ok); |
90 Q_ASSERT(ok); |
91 |
91 |
92 // Initialize orientation |
|
93 loadDocmlSection(mWizard->mainWindow()->orientation()); |
|
94 |
|
95 mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P2")); |
92 mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P2")); |
96 Q_ASSERT(mWidget); |
93 Q_ASSERT(mWidget); |
97 |
94 |
98 mHeading = qobject_cast<HbLabel*> (mLoader->findWidget("label_heading")); |
95 mHeading = qobject_cast<HbLabel*> (mLoader->findWidget("label_heading")); |
99 Q_ASSERT(mHeading); |
96 Q_ASSERT(mHeading); |
100 |
97 |
101 mHeading->setPlainText(hbTrId("txt_occ_dialog_first_press_button_on_the_wireless")); |
98 mHeading->setPlainText(hbTrId("txt_occ_dialog_first_press_button_on_the_wireless")); |
102 |
|
103 bool connectOk = connect( |
|
104 mWizard->mainWindow(), |
|
105 SIGNAL(orientationChanged(Qt::Orientation)), |
|
106 this, |
|
107 SLOT(loadDocmlSection(Qt::Orientation))); |
|
108 Q_ASSERT(connectOk); |
|
109 } |
99 } |
110 |
100 |
111 OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_INITIALIZEPAGE_EXIT, this); |
101 OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_INITIALIZEPAGE_EXIT, this); |
112 return mWidget; |
102 return mWidget; |
113 } |
103 } |
140 OstTraceFunctionEntry1(WPSPAGESTEPTHREEBUTTON_PREVIOUSTRIGGERED_ENTRY, this); |
130 OstTraceFunctionEntry1(WPSPAGESTEPTHREEBUTTON_PREVIOUSTRIGGERED_ENTRY, this); |
141 OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_PREVIOUSTRIGGERED_EXIT, this); |
131 OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_PREVIOUSTRIGGERED_EXIT, this); |
142 return (PageWpsWizardStep3_Button - PageWpsWizardStep2); |
132 return (PageWpsWizardStep3_Button - PageWpsWizardStep2); |
143 } |
133 } |
144 |
134 |
145 /*! |
|
146 Loads docml at initialization phase and when HbMainWindow sends |
|
147 orientation() signal. |
|
148 |
|
149 @param [in] orientation orientation to be loaded. |
|
150 */ |
|
151 void WpsPageStepThreeButton::loadDocmlSection(Qt::Orientation orientation) |
|
152 { |
|
153 bool ok = false; |
|
154 |
|
155 // Load the orientation specific section |
|
156 if (orientation == Qt::Horizontal) { |
|
157 mLoader->load(":/docml/occ_wps_02_03.docml", "landscape", &ok); |
|
158 Q_ASSERT(ok); |
|
159 } else { |
|
160 Q_ASSERT(orientation == Qt::Vertical); |
|
161 mLoader->load(":/docml/occ_wps_02_03.docml", "portrait", &ok); |
|
162 Q_ASSERT(ok); |
|
163 } |
|
164 } |
|
165 |
135 |
|
136 |