equal
deleted
inserted
replaced
102 return mBuilder.findWidget<HbLabel*>(DOCML_NO_MATCH_LABEL); |
102 return mBuilder.findWidget<HbLabel*>(DOCML_NO_MATCH_LABEL); |
103 } |
103 } |
104 |
104 |
105 void HelpKeywordView::loadAllContent() |
105 void HelpKeywordView::loadAllContent() |
106 { |
106 { |
107 toolBar()->hide(); |
107 showToolBar(false); |
108 mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH); |
108 mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH); |
109 ResetSearchPanel(); |
109 ResetSearchPanel(); |
110 |
110 |
111 } |
111 } |
112 |
112 |
170 label()->setAlignment(label()->alignment() | Qt::AlignVCenter); |
170 label()->setAlignment(label()->alignment() | Qt::AlignVCenter); |
171 } |
171 } |
172 } |
172 } |
173 } |
173 } |
174 |
174 |
|
175 void HelpKeywordView::showToolBar(bool visible) |
|
176 { |
|
177 Hb::SceneItems items = Hb::ToolBarItem; |
|
178 if(visible) |
|
179 { |
|
180 showItems(items); |
|
181 } |
|
182 else |
|
183 { |
|
184 hideItems(items); |
|
185 } |
|
186 } |
|
187 |
175 //////////////////////////////////////////////////////////////////////////////////////////// |
188 //////////////////////////////////////////////////////////////////////////////////////////// |
176 // handle system event |
189 // handle system event |
177 |
190 |
178 void HelpKeywordView::onViewReady() |
191 void HelpKeywordView::onViewReady() |
179 { |
192 { |
221 } |
234 } |
222 else |
235 else |
223 { |
236 { |
224 mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_SRHPAL); |
237 mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_SRHPAL); |
225 } |
238 } |
226 toolBar()->show(); |
239 showToolBar(true); |
227 } |
240 } |
228 |
241 |
229 void HelpKeywordView::onSearchPanelCriteriaChanged(const QString &criteria) |
242 void HelpKeywordView::onSearchPanelCriteriaChanged(const QString &criteria) |
230 { |
243 { |
231 HelpDataProvider::instance()->getSearchData(criteria); |
244 HelpDataProvider::instance()->getSearchData(criteria); |
235 } |
248 } |
236 else |
249 else |
237 { |
250 { |
238 mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH); |
251 mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH); |
239 } |
252 } |
240 |
253 showToolBar(false); |
241 toolBar()->hide(); |
|
242 } |
254 } |
243 |
255 |
244 //////////////////////////////////////////////////////////////////////////////////////////// |
256 //////////////////////////////////////////////////////////////////////////////////////////// |
245 // handle virtual keyboard event |
257 // handle virtual keyboard event |
246 |
258 |
255 void HelpKeywordView::onHandleKeypadClose() |
267 void HelpKeywordView::onHandleKeypadClose() |
256 { |
268 { |
257 updateVisibleItems(true); |
269 updateVisibleItems(true); |
258 qreal mainHeight = mainWindow()->layoutRect().height(); |
270 qreal mainHeight = mainWindow()->layoutRect().height(); |
259 qreal toolbarHeight = toolBar()->size().height(); |
271 qreal toolbarHeight = toolBar()->size().height(); |
260 qreal height = mainHeight - (toolBar()->isVisible() ? toolbarHeight : 0); |
272 qreal height = mainHeight - ( toolBar()->isVisible() ? toolbarHeight : 0); |
261 this->setMaximumHeight(height); |
273 this->setMaximumHeight(height); |
262 updateLabelPos(); |
274 updateLabelPos(); |
263 } |
275 } |
264 |
276 |
265 void HelpKeywordView::onOrientationChanged(Qt::Orientation orientation) |
277 void HelpKeywordView::onOrientationChanged(Qt::Orientation orientation) |
266 { |
278 { |
267 HelpBaseView::onOrientationChanged(orientation); |
279 Q_UNUSED(orientation); |
268 updateLabelPos(); |
280 updateLabelPos(); |
269 } |
281 } |
270 |
282 |
271 // end of file |
283 // end of file |