13 * |
13 * |
14 * Description:message body. to enter text and show media inserted. |
14 * Description:message body. to enter text and show media inserted. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef UNIFIED_EDITOR_BODY_H |
18 #ifndef MSG_UNIFIED_EDITOR_BODY_H |
19 #define UNIFIED_EDITOR_BODY_H |
19 #define MSG_UNIFIED_EDITOR_BODY_H |
20 |
20 |
21 #include <msgunifiededitorbasewidget.h> |
21 #include <msgunieditorbasewidget.h> |
22 #include <f32file.h> |
22 #include <f32file.h> |
23 #include "msgunieditorprocessimageoperation.h" |
23 #include "msgunieditorprocessimageoperation.h" |
24 |
24 |
25 class HbTextEdit; |
25 class HbTextEdit; |
26 class HbTextItem; |
26 class HbTextItem; |
27 class HbFrameItem; |
27 class HbFrameItem; |
28 class HbIconItem; |
|
29 class HbPushButton; |
|
30 //class HbGestureSceneFilter; |
|
31 class CMsgMediaResolver; |
28 class CMsgMediaResolver; |
32 class CMsgImageInfo; |
29 class CMsgImageInfo; |
33 class MmsConformanceCheck; |
30 class MmsConformanceCheck; |
34 class UniEditorPluginInterface; |
31 class UniEditorPluginInterface; |
35 class UniEditorPluginLoader; |
32 class UniEditorPluginLoader; |
|
33 class MsgUnifiedEditorPixmapWidget; |
|
34 class MsgUniFiedEditorAudioWidget; |
36 |
35 |
37 |
36 |
38 class MsgUnifiedEditorBody : public MsgUnifiedEditorBaseWidget, |
37 class MsgUnifiedEditorBody : public MsgUnifiedEditorBaseWidget, |
39 public MUniEditorProcessImageOperationObserver |
38 public MUniEditorProcessImageOperationObserver |
40 { |
39 { |
95 /** |
94 /** |
96 * Get to find body already contains an audio |
95 * Get to find body already contains an audio |
97 * @return bool |
96 * @return bool |
98 */ |
97 */ |
99 bool hasAudio(); |
98 bool hasAudio(); |
|
99 |
|
100 /** |
|
101 * from MUniEditorProcessImageOperationObserver |
|
102 * @see MUniEditorProcessImageOperationObserver |
|
103 */ |
|
104 void EditorOperationEvent( TUniEditorProcessImageOperationEvent aEvent, |
|
105 TFileName aFileName ); |
100 |
106 |
101 public slots: |
107 public slots: |
102 /** |
108 /** |
103 * Called to insert image content in editor. |
109 * Called to insert image content in editor. |
104 * @param medialist list of absolute paths of media. |
110 * @param medialist list of absolute paths of media. |
105 */ |
111 * @param draftMessage specifies draft message |
106 void setImage(QString& imagefile); |
112 */ |
|
113 void setImage(QString& imagefile, bool draftMessage = false); |
107 |
114 |
108 /** |
115 /** |
109 * Called to insert audio content in editor. |
116 * Called to insert audio content in editor. |
110 * @param medialist list of absolute paths of media. |
117 * @param medialist list of absolute paths of media. |
111 */ |
118 */ |
125 |
132 |
126 /** |
133 /** |
127 * Emitted when msg-body content changes |
134 * Emitted when msg-body content changes |
128 */ |
135 */ |
129 void contentChanged(); |
136 void contentChanged(); |
130 |
137 |
131 public: // from MUniEditorProcessImageOperationObserver |
138 /** |
132 |
139 * Emitted when image is being processed. |
133 /* |
140 * @param enable, true to enable/ false to disable. |
134 * @see MUniEditorProcessImageOperationObserver |
141 */ |
135 */ |
142 void enableSendButton(bool enable) const; |
136 void EditorOperationEvent( TUniEditorProcessImageOperationEvent aEvent, |
143 |
137 TFileName aFileName ); |
144 |
138 |
145 |
139 protected: // from HbWidget |
146 protected: // from HbWidget |
140 |
147 |
141 /** |
148 /** |
142 * Reimplemented from base class to give proper size. |
149 * Reimplemented from base class to give proper size. |
143 * @see HbWidget |
150 * @see HbWidget |
144 */ |
151 */ |
145 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const; |
152 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const; |
146 |
153 |
147 private slots: |
154 private slots: |
148 /** |
|
149 * called on long press on the media objects |
|
150 */ |
|
151 void longPressed(QPointF position); |
|
152 |
155 |
153 /** |
156 /** |
154 * called from the media object's item specific menu |
157 * called from the media object's item specific menu |
155 */ |
158 */ |
156 void removeMedia(); |
159 void removeMedia(); |
157 |
|
158 /** |
|
159 * called from the media object's item specific menu |
|
160 */ |
|
161 void openMedia(); |
|
162 |
|
163 /** |
|
164 * called from the media object's item specific menu |
|
165 */ |
|
166 void viewDetails(); |
|
167 |
160 |
168 /** |
161 /** |
169 * handle text changes in body field |
162 * handle text changes in body field |
170 */ |
163 */ |
171 void onTextChanged(); |
164 void onTextChanged(); |
172 |
|
173 /** |
|
174 * Service launch complete. |
|
175 */ |
|
176 void handleOk(const QVariant& result); |
|
177 |
|
178 /** |
|
179 * Service launch errors. |
|
180 */ |
|
181 void handleError(int errorCode, const QString& errorMessage); |
|
182 |
165 |
183 private: |
166 private: |
184 |
167 |
185 /** |
168 /** |
186 * Get to find body already contains an image |
169 * Get to find body already contains an image |
236 * editor to in put text. |
213 * editor to in put text. |
237 */ |
214 */ |
238 HbTextEdit* mTextEdit; |
215 HbTextEdit* mTextEdit; |
239 |
216 |
240 /** |
217 /** |
241 * frame for editor. |
|
242 */ |
|
243 HbFrameItem* mEditorFrame; |
|
244 |
|
245 /** |
|
246 * icon item to preview images. |
218 * icon item to preview images. |
247 */ |
219 */ |
248 HbIconItem* mIconItem; |
220 MsgUnifiedEditorPixmapWidget* mPixmapItem; |
249 |
221 |
250 /** |
222 /** |
251 * inline audio item |
223 * inline audio item |
252 */ |
224 */ |
253 HbPushButton* mAudioItem; |
225 MsgUniFiedEditorAudioWidget* mAudioItem; |
254 |
226 |
255 /** |
227 /** |
256 * Image file contained inside body |
228 * Image file contained inside body |
257 */ |
229 */ |
258 QString mImageFile; |
230 QString mImageFile; |