equal
deleted
inserted
replaced
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: NMailUI web viewer. Inherits from |
15 * |
15 * QGrapohicsWebView and handles gestures, etc. |
16 */ |
16 */ |
17 |
17 |
18 #include "nmuiheaders.h" |
18 #include "nmuiheaders.h" |
19 |
19 |
20 /*! |
20 /*! |
21 Constructor. |
21 Constructor. |
22 */ |
22 */ |
23 NmMailViewerWK::NmMailViewerWK() |
23 NmMailViewerWK::NmMailViewerWK() |
24 : QGraphicsWebView(), |
24 : QGraphicsWebView(), |
25 mContent(), |
25 mContent(), |
26 mParentView(NULL), |
|
27 mSuppressRelease(false) |
26 mSuppressRelease(false) |
28 { |
27 { |
29 // Subscribe this widget to tap and pinch gestures. |
28 // Subscribe this widget to tap and pinch gestures. |
30 grabGesture(Qt::TapGesture); |
29 grabGesture(Qt::TapGesture); |
31 grabGesture(Qt::PinchGesture); |
30 grabGesture(Qt::PinchGesture); |
37 Destructor. |
36 Destructor. |
38 */ |
37 */ |
39 NmMailViewerWK::~NmMailViewerWK() |
38 NmMailViewerWK::~NmMailViewerWK() |
40 { |
39 { |
41 mContent.clear(); |
40 mContent.clear(); |
42 } |
|
43 |
|
44 /*! |
|
45 Sets the parent view. |
|
46 */ |
|
47 void NmMailViewerWK::setParentView(NmViewerView *parentView) |
|
48 { |
|
49 mParentView = parentView; |
|
50 } |
41 } |
51 |
42 |
52 /*! |
43 /*! |
53 Adds content into web view. |
44 Adds content into web view. |
54 */ |
45 */ |
72 if (mContent.contains(key)) { |
63 if (mContent.contains(key)) { |
73 partId = mContent[key].mPartId; |
64 partId = mContent[key].mPartId; |
74 isFetched = mContent[key].mIsFetched; |
65 isFetched = mContent[key].mIsFetched; |
75 return mContent[key].mData; |
66 return mContent[key].mData; |
76 } |
67 } |
77 return 0; |
|
78 } |
68 } |
79 return 0; |
69 return 0; |
80 } |
70 } |
81 |
71 |
82 /*! |
72 /*! |