equal
deleted
inserted
replaced
19 #include <HbMenu> |
19 #include <HbMenu> |
20 #include <HbAction> |
20 #include <HbAction> |
21 #include <HbAbstractViewItem> |
21 #include <HbAbstractViewItem> |
22 #include <HbIndexFeedback> |
22 #include <HbIndexFeedback> |
23 #include <HbListView> |
23 #include <HbListView> |
24 #include <HbScrollBar> |
|
25 #include <HbView> |
24 #include <HbView> |
|
25 #include <HbGroupBox> |
26 |
26 |
27 #include <cadefs.h> |
27 #include <cadefs.h> |
28 #include <caentry.h> |
28 #include <caentry.h> |
29 #include <caitemmodel.h> |
29 #include <caitemmodel.h> |
30 #include <caservice.h> |
30 #include <caservice.h> |
91 |
91 |
92 connect(mBackKeyAction, SIGNAL(triggered()), SIGNAL(toAppLibraryState())); |
92 connect(mBackKeyAction, SIGNAL(triggered()), SIGNAL(toAppLibraryState())); |
93 |
93 |
94 mModel = HsMenuService::getAllApplicationsModel(mSortAttribute); |
94 mModel = HsMenuService::getAllApplicationsModel(mSortAttribute); |
95 mMenuView->setModel(mModel); |
95 mMenuView->setModel(mModel); |
96 |
96 updateLabel(); |
|
97 connect(mModel, SIGNAL(countChange()), SLOT(updateLabel())); |
|
98 |
97 mModel->preloadIcons(); |
99 mModel->preloadIcons(); |
98 |
100 |
99 mMenuView->listView()->verticalScrollBar()->setInteractive(true); |
|
100 HbIndexFeedback *indexFeedback = new HbIndexFeedback(mMenuView->view()); |
101 HbIndexFeedback *indexFeedback = new HbIndexFeedback(mMenuView->view()); |
101 indexFeedback->setIndexFeedbackPolicy(HbIndexFeedback::IndexFeedbackSingleCharacter); |
102 indexFeedback->setIndexFeedbackPolicy(HbIndexFeedback::IndexFeedbackSingleCharacter); |
102 indexFeedback->setItemView(mMenuView->listView()); |
103 indexFeedback->setItemView(mMenuView->listView()); |
103 |
104 |
104 HSMENUTEST_FUNC_EXIT("HsAllAppsState::construct"); |
105 HSMENUTEST_FUNC_EXIT("HsAllAppsState::construct"); |
199 HSMENUTEST_FUNC_EXIT("HsAllAppsState::stateExited"); |
200 HSMENUTEST_FUNC_EXIT("HsAllAppsState::stateExited"); |
200 qDebug("AllAppsState::stateExited()"); |
201 qDebug("AllAppsState::stateExited()"); |
201 } |
202 } |
202 |
203 |
203 /*! |
204 /*! |
|
205 Slot invoked label has to be changed. |
|
206 */ |
|
207 void HsAllAppsState::updateLabel() |
|
208 { |
|
209 mMenuView->viewLabel()->setHeading( |
|
210 hbTrId("txt_applib_subtitle_applications_widgets_l1").arg( |
|
211 mModel->rowCount())); |
|
212 } |
|
213 /*! |
204 Slot called when application is adding to collection. |
214 Slot called when application is adding to collection. |
205 */ |
215 */ |
206 void HsAllAppsState::addToCollection() |
216 void HsAllAppsState::addToCollection() |
207 { |
217 { |
208 // Add one/many applications to |
218 // Add one/many applications to |