equal
deleted
inserted
replaced
26 #include <HbSearchPanel> |
26 #include <HbSearchPanel> |
27 #include <HbToolBar> |
27 #include <HbToolBar> |
28 #include <HbView> |
28 #include <HbView> |
29 #include <HbToolBarExtension> |
29 #include <HbToolBarExtension> |
30 #include <HbShrinkingVkbHost> |
30 #include <HbShrinkingVkbHost> |
|
31 #include <HbScrollBar> |
31 |
32 |
32 #include "hsallappsstate.h" |
33 #include "hsallappsstate.h" |
33 #include "hsallcollectionsstate.h" |
34 #include "hsallcollectionsstate.h" |
34 #include "hscollectionstate.h" |
35 #include "hscollectionstate.h" |
35 #include "hsmainwindow.h" |
36 #include "hsmainwindow.h" |
130 SIGNAL(listViewChange())); |
131 SIGNAL(listViewChange())); |
131 } |
132 } |
132 |
133 |
133 mListView->setItemPixmapCacheEnabled(true); // TODO: remove when enabled from default |
134 mListView->setItemPixmapCacheEnabled(true); // TODO: remove when enabled from default |
134 mListView->setModel(model, new HsListViewItem()); |
135 mListView->setModel(model, new HsListViewItem()); |
135 |
136 mListView->verticalScrollBar()->setInteractive(true); |
136 if (mListView->model()) { |
137 if (mListView->model()) { |
137 connect(mListView->model(), |
138 connect(mListView->model(), |
138 SIGNAL(scrollTo(int, QAbstractItemView::ScrollHint)), |
139 SIGNAL(scrollTo(int, QAbstractItemView::ScrollHint)), |
139 this, |
140 this, |
140 SLOT(scrollToRow(int, QAbstractItemView::ScrollHint))); |
141 SLOT(scrollToRow(int, QAbstractItemView::ScrollHint))); |
220 { |
221 { |
221 mBuilder.searchAction()->setDisabled(disable); |
222 mBuilder.searchAction()->setDisabled(disable); |
222 } |
223 } |
223 |
224 |
224 /*! |
225 /*! |
|
226 Disable or enable ovi store action button. |
|
227 \param disable If true action gets disabled. |
|
228 */ |
|
229 void HsMenuView::disableOviStore(bool disable) |
|
230 { |
|
231 if (mBuilder.oviStoreAction()) { |
|
232 mBuilder.oviStoreAction()->setDisabled(disable); |
|
233 } |
|
234 if (mBuilder.operatorAction()) { |
|
235 mBuilder.operatorAction()->setDisabled(disable); |
|
236 } |
|
237 if (mBuilder.toolBarExtensionAction()) { |
|
238 mBuilder.toolBarExtensionAction()->setDisabled(disable); |
|
239 } |
|
240 } |
|
241 |
|
242 /*! |
225 Scrolls list item view to requested row. |
243 Scrolls list item view to requested row. |
226 \param row The row which is to get at the position pointed by \a hint. |
244 \param row The row which is to get at the position pointed by \a hint. |
227 \param hint Position in the view the row should be scrolled to. |
245 \param hint Position in the view the row should be scrolled to. |
228 */ |
246 */ |
229 void HsMenuView::scrollToRow(int row, QAbstractItemView::ScrollHint hint) |
247 void HsMenuView::scrollToRow(int row, QAbstractItemView::ScrollHint hint) |