75 */ |
75 */ |
76 void NmMailboxListView::loadViewLayout() |
76 void NmMailboxListView::loadViewLayout() |
77 { |
77 { |
78 NM_FUNCTION; |
78 NM_FUNCTION; |
79 |
79 |
|
80 |
80 // Use document loader to load the view |
81 // Use document loader to load the view |
81 bool ok = false; |
82 bool ok(false); |
82 setObjectName(QString(NMUI_MAILBOX_LIST_VIEW)); |
83 setObjectName(QString(NMUI_MAILBOX_LIST_VIEW)); |
83 QObjectList objectList; |
84 QObjectList objectList; |
84 objectList.append(this); |
85 objectList.append(this); |
85 // Pass the view to documentloader. Document loader uses this view |
86 // Pass the view to documentloader. Document loader uses this view |
86 // when docml is parsed, instead of creating new view. |
87 // when docml is parsed, instead of creating new view. |
87 if (mDocumentLoader) { |
88 if (mDocumentLoader) { |
88 mDocumentLoader->setObjectTree(objectList); |
89 mDocumentLoader->setObjectTree(objectList); |
89 mWidgetList = mDocumentLoader->load(NMUI_MAILBOX_LIST_VIEW_XML, &ok); |
90 mWidgetList = mDocumentLoader->load(NMUI_MAILBOX_LIST_VIEW_XML, &ok); |
90 } |
91 } |
91 |
92 |
92 if (ok == true && mWidgetList.count()) { |
93 if (ok) { |
93 // Create item context menu |
94 // Create item context menu |
94 mItemContextMenu = new HbMenu(); |
95 mItemContextMenu = new HbMenu(); |
95 // Get mailbox widget pointer and set parameters |
96 // Get mailbox widget pointer and set parameters |
96 mMailboxListWidget = qobject_cast<HbListView *> |
97 mMailboxListWidget = qobject_cast<HbListView *> |
97 (mDocumentLoader->findWidget(NMUI_MAILBOX_LIST_WIDGET)); |
98 (mDocumentLoader->findWidget(NMUI_MAILBOX_LIST_WIDGET)); |
209 NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageList,mailbox->id(),inboxId); |
210 NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageList,mailbox->id(),inboxId); |
210 mApplication.enterNmUiView(startParam); |
211 mApplication.enterNmUiView(startParam); |
211 } |
212 } |
212 } |
213 } |
213 |
214 |
214 /*! |
215 |
215 handleActionCommand. From NmMenuObserver, extension manager calls this |
|
216 call to handle menu command in the UI. |
|
217 */ |
|
218 |
|
219 void NmMailboxListView::handleActionCommand(NmActionResponse &actionResponse) |
|
220 { |
|
221 NM_FUNCTION; |
|
222 |
|
223 // Handle context menu commands here |
|
224 Q_UNUSED(actionResponse); |
|
225 } |
|
226 |
|
227 |
|