44 NmMessageListView( |
44 NmMessageListView( |
45 NmApplication &application, |
45 NmApplication &application, |
46 NmUiStartParam *startParam, |
46 NmUiStartParam *startParam, |
47 NmUiEngine &uiEngine, |
47 NmUiEngine &uiEngine, |
48 NmMailboxListModel &mailboxListModel, |
48 NmMailboxListModel &mailboxListModel, |
49 NmMessageListModel &messageListModel, |
49 NmMessageListModel *messageListModel, |
50 HbDocumentLoader *documentLoader, |
50 HbDocumentLoader *documentLoader, |
51 QGraphicsItem *parent = 0); |
51 QGraphicsItem *parent = 0); |
52 ~NmMessageListView(); |
52 ~NmMessageListView(); |
53 NmUiViewId nmailViewId() const; |
53 NmUiViewId nmailViewId() const; |
54 void viewReady(); |
54 void viewReady(); |
68 void handleSelection(); |
68 void handleSelection(); |
69 void createOptionsMenu(); |
69 void createOptionsMenu(); |
70 void itemsAdded(const QModelIndex &parent, int start, int end); |
70 void itemsAdded(const QModelIndex &parent, int start, int end); |
71 void itemsRemoved(); |
71 void itemsRemoved(); |
72 void showNoMessagesText(); |
72 void showNoMessagesText(); |
|
73 void hideNoMessagesText(); |
73 void handleSyncStateEvent(NmSyncState syncState, const NmId & mailboxId); |
74 void handleSyncStateEvent(NmSyncState syncState, const NmId & mailboxId); |
74 void handleConnectionEvent(NmConnectState connectState, const NmId &mailboxId); |
75 void handleConnectionEvent(NmConnectState connectState, const NmId &mailboxId); |
75 void folderSelected(NmId mailbox, NmId folder); |
76 void folderSelected(); |
76 |
77 |
77 private: |
78 private: |
78 void loadViewLayout(); |
79 void loadViewLayout(); |
79 void initTreeView(); |
80 void initTreeView(); |
80 void setMailboxName(); |
81 void setMailboxName(); |
85 NmApplication &mApplication; |
86 NmApplication &mApplication; |
86 HbTreeView *mMessageListWidget; // Not owned |
87 HbTreeView *mMessageListWidget; // Not owned |
87 QObjectList mWidgetList; |
88 QObjectList mWidgetList; |
88 NmUiEngine &mUiEngine; |
89 NmUiEngine &mUiEngine; |
89 NmMailboxListModel &mMailboxListModel; |
90 NmMailboxListModel &mMailboxListModel; |
90 NmMessageListModel &mMessageListModel; |
91 NmMessageListModel *mMessageListModel; // Not owned |
91 HbDocumentLoader *mDocumentLoader; // Owned |
92 HbDocumentLoader *mDocumentLoader; // Owned |
92 HbMenu *mItemContextMenu; // Owned |
93 HbMenu *mItemContextMenu; // Owned |
93 NmMessageListModelItem *mLongPressedItem; // Not owned |
94 NmMessageListModelItem *mLongPressedItem; // Not owned |
94 HbLabel *mNoMessagesLabel; // Not owned |
95 HbLabel *mNoMessagesLabel; // Not owned |
95 HbGroupBox *mFolderLabel; // Not owned |
96 HbGroupBox *mFolderLabel; // Not owned |
96 HbLabel *mSyncIcon; // Not owned |
97 HbLabel *mSyncIcon; // Not owned |
97 QModelIndex mActivatedIndex; |
98 QModelIndex mActivatedIndex; |
98 bool mViewReady; |
99 bool mViewReady; |
99 NmFolderType mCurrentFolderType; |
100 NmFolderType mCurrentFolderType; |
100 bool mSettingsLaunched; |
101 bool mSettingsLaunched; |
|
102 NmId mSelectedFolderId; |
|
103 NmId mSelectedMailboxId; |
101 }; |
104 }; |
102 |
105 |
103 #endif /* NMMESSAGELISTVIEW_H_ */ |
106 #endif /* NMMESSAGELISTVIEW_H_ */ |