43 class NmOperation; |
42 class NmOperation; |
44 class HbProgressDialog; |
43 class HbProgressDialog; |
45 class NmAttachmentListWidget; |
44 class NmAttachmentListWidget; |
46 class NmAttachmentManager; |
45 class NmAttachmentManager; |
47 class HbMessageBox; |
46 class HbMessageBox; |
|
47 class NmMessagePart; |
48 |
48 |
49 class NmViewerView : public NmBaseView, public NmActionObserver, public NmAttachmentFetchObserver |
49 class NmViewerView : public NmBaseView, public NmActionObserver, public NmAttachmentFetchObserver |
50 { |
50 { |
51 Q_OBJECT |
51 Q_OBJECT |
52 public: |
52 public: |
53 explicit NmViewerView( |
53 explicit NmViewerView( |
54 NmApplication &application, |
54 NmApplication &application, |
55 NmUiStartParam* startParam, |
55 NmUiStartParam* startParam, |
56 NmUiEngine &uiEngine, |
56 NmUiEngine &uiEngine, |
57 HbMainWindow *mainWindow, |
57 HbMainWindow *mainWindow, |
58 NmAttachmentManager &attaManager, |
58 NmAttachmentManager &attaManager, |
59 bool toolbar = false, |
59 bool toolbar = false, |
60 QGraphicsItem *parent = NULL); |
60 QGraphicsItem *parent = NULL); |
61 ~NmViewerView(); |
61 ~NmViewerView(); |
62 void reloadViewContents(NmUiStartParam* startParam); |
62 void reloadViewContents(NmUiStartParam* startParam); |
63 NmUiViewId nmailViewId() const; |
63 NmUiViewId nmailViewId() const; |
64 NmMailViewerWK* webView(); |
64 NmMailViewerWK* webView(); |
97 private: |
97 private: |
98 void deleteMessage(); |
98 void deleteMessage(); |
99 void loadMessage(); |
99 void loadMessage(); |
100 void loadViewLayout(); |
100 void loadViewLayout(); |
101 QString formatMessage(); |
101 QString formatMessage(); |
|
102 QString formatHtmlMessage(NmMessagePart *html); |
|
103 QString formatPlainTextMessage(NmMessagePart *plain); |
102 bool eventOnTopOfHeaderArea(QGraphicsSceneMouseEvent *event); |
104 bool eventOnTopOfHeaderArea(QGraphicsSceneMouseEvent *event); |
103 void changeMessageReadStatus(bool read); |
105 void changeMessageReadStatus(bool read); |
104 void setMailboxName(); |
106 void setMailboxName(); |
105 void createToolBar(); |
107 void createToolBar(); |
106 void setAttachmentList(); |
108 void setAttachmentList(); |
121 QPointF mHeaderStartScenePos; |
123 QPointF mHeaderStartScenePos; |
122 QPointer<NmOperation> mMessageFetchingOperation; // Not owned |
124 QPointer<NmOperation> mMessageFetchingOperation; // Not owned |
123 QPointF mLatestScrollPos; |
125 QPointF mLatestScrollPos; |
124 bool mDisplayingPlainText; |
126 bool mDisplayingPlainText; |
125 QObjectList mWidgetList; |
127 QObjectList mWidgetList; |
126 NmUiDocumentLoader *mDocumentLoader; |
128 NmUiDocumentLoader *mDocumentLoader; // Owned |
127 HbWidget *mScrollAreaContents; |
129 HbWidget *mScrollAreaContents; // Not owned |
128 HbWidget *mViewerHeaderContainer; |
|
129 QSize mScreenSize; |
130 QSize mScreenSize; |
130 HbProgressDialog *mWaitDialog; // Owned |
131 HbProgressDialog *mWaitDialog; // Owned |
131 bool webFrameloadingCompleted; |
132 bool webFrameloadingCompleted; |
132 QSize mLatestLoadingSize; |
133 QSize mLatestLoadingSize; |
133 QList<NmId> mAttaIdList; |
134 QList<NmId> mAttaIdList; |