|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef NMMAILBOXLISTVIEW_H_ |
|
19 #define NMMAILBOXLISTVIEW_H_ |
|
20 |
|
21 #include "nmbaseview.h" |
|
22 #include <nmactionobserver.h> |
|
23 #include <QModelIndex> |
|
24 |
|
25 class HbListView; |
|
26 class HbDocumentLoader; |
|
27 class NmUiEngine; |
|
28 class NmApplication; |
|
29 class NmUiStartParam; |
|
30 class NmMailboxListModel; |
|
31 class NmActionResponse; |
|
32 class HbMenu; |
|
33 class HbAbstractViewItem; |
|
34 class NmAction; |
|
35 |
|
36 class NmMailboxListView : public NmBaseView |
|
37 { |
|
38 Q_OBJECT |
|
39 public: |
|
40 NmMailboxListView( |
|
41 NmApplication &application, |
|
42 NmUiStartParam* startParam, |
|
43 NmUiEngine &uiEngine, |
|
44 NmMailboxListModel &mailboxListModel, |
|
45 HbDocumentLoader *documentLoader, |
|
46 QGraphicsItem *parent = 0); |
|
47 ~NmMailboxListView(); |
|
48 void reloadViewContents(NmUiStartParam* startParam); |
|
49 NmUiViewId nmailViewId() const; |
|
50 void viewReady(); |
|
51 |
|
52 public slots: |
|
53 void itemActivated(const QModelIndex &index); |
|
54 void openSelectedMailBox(); |
|
55 |
|
56 private slots: |
|
57 void refreshList(); |
|
58 |
|
59 private: |
|
60 void loadViewLayout(); |
|
61 |
|
62 private: |
|
63 NmApplication &mApplication; |
|
64 QObjectList mWidgetList; |
|
65 HbListView *mMailboxListWidget; // Not owned |
|
66 NmUiEngine &mUiEngine; // Not owned |
|
67 NmMailboxListModel &mListModel; // Not owned |
|
68 HbMenu *mItemContextMenu; // Owned |
|
69 HbDocumentLoader *mDocumentLoader; // Owned |
|
70 QModelIndex mActivatedIndex; |
|
71 bool mViewReady; |
|
72 }; |
|
73 |
|
74 #endif /* NMMAILBOXLISTVIEW_H_ */ |