16 */ |
16 */ |
17 |
17 |
18 #ifndef UNIFIED_EDITOR_BODY_H |
18 #ifndef UNIFIED_EDITOR_BODY_H |
19 #define UNIFIED_EDITOR_BODY_H |
19 #define UNIFIED_EDITOR_BODY_H |
20 |
20 |
21 #include <hbwidget.h> |
21 #include <msgunifiededitorbasewidget.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; |
28 class HbIconItem; |
29 class HbPushButton; |
29 class HbPushButton; |
30 class HbGestureSceneFilter; |
30 //class HbGestureSceneFilter; |
31 class CMsgMediaResolver; |
31 class CMsgMediaResolver; |
32 class CMsgImageInfo; |
32 class CMsgImageInfo; |
33 class MmsConformanceCheck; |
33 class MmsConformanceCheck; |
34 class UniEditorPluginInterface; |
34 class UniEditorPluginInterface; |
35 class UniEditorPluginLoader; |
35 class UniEditorPluginLoader; |
36 |
36 |
37 |
37 |
38 class MsgUnifiedEditorBody : public HbWidget,public MUniEditorProcessImageOperationObserver |
38 class MsgUnifiedEditorBody : public MsgUnifiedEditorBaseWidget, |
|
39 public MUniEditorProcessImageOperationObserver |
39 { |
40 { |
40 Q_OBJECT |
41 Q_OBJECT |
41 |
42 |
42 Q_PROPERTY(bool hasImage READ hasImage WRITE setImage) |
43 Q_PROPERTY(bool hasImage READ hasImage WRITE setImage) |
43 Q_PROPERTY(bool hasAudio READ hasAudio WRITE setAudio) |
44 Q_PROPERTY(bool hasAudio READ hasAudio WRITE setAudio) |
44 public: |
45 public: |
45 |
46 |
46 /** |
47 /** |
47 * Constructor |
48 * Constructor |
48 */ |
49 */ |
49 MsgUnifiedEditorBody(const QString& pluginPath, QGraphicsItem *parent = 0); |
50 MsgUnifiedEditorBody(QGraphicsItem *parent = 0); |
50 |
51 |
51 /** |
52 /** |
52 * Destructor |
53 * Destructor |
53 */ |
54 */ |
54 ~MsgUnifiedEditorBody(); |
55 ~MsgUnifiedEditorBody(); |
78 /* |
79 /* |
79 * Disables char counter |
80 * Disables char counter |
80 */ |
81 */ |
81 void disableCharCounter(); |
82 void disableCharCounter(); |
82 |
83 |
|
84 /** |
|
85 * To set focus on editable field. |
|
86 */ |
|
87 void setFocus(); |
|
88 |
|
89 /** |
|
90 * Get to find body already contains an image |
|
91 * @return bool |
|
92 */ |
|
93 bool hasImage(); |
|
94 |
|
95 /** |
|
96 * Get to find body already contains an audio |
|
97 * @return bool |
|
98 */ |
|
99 bool hasAudio(); |
|
100 |
83 public slots: |
101 public slots: |
84 /** |
102 /** |
85 * Called to insert image content in editor. |
103 * Called to insert image content in editor. |
86 * @param medialist list of absolute paths of media. |
104 * @param medialist list of absolute paths of media. |
87 */ |
105 */ |
92 * @param medialist list of absolute paths of media. |
110 * @param medialist list of absolute paths of media. |
93 */ |
111 */ |
94 void setAudio(QString& audiofile); |
112 void setAudio(QString& audiofile); |
95 |
113 |
96 /** |
114 /** |
97 * Called to insert video content in editor. |
|
98 * @param medialist list of absolute paths of media. |
|
99 */ |
|
100 void setVideo(QString& videofile); |
|
101 |
|
102 /** |
|
103 * Called to insert body text in editor. |
115 * Called to insert body text in editor. |
104 * @param text body text. |
116 * @param text body text. |
105 */ |
117 */ |
106 void setText(QString& text); |
118 void setText(QString& text); |
107 |
119 |
167 * Service launch errors. |
179 * Service launch errors. |
168 */ |
180 */ |
169 void handleError(int errorCode, const QString& errorMessage); |
181 void handleError(int errorCode, const QString& errorMessage); |
170 |
182 |
171 private: |
183 private: |
|
184 |
172 /** |
185 /** |
173 * Get to find body already contains an image |
186 * Get to find body already contains an image |
174 * @return bool |
187 * @return bool |
175 */ |
188 */ |
176 bool hasImage(); |
|
177 |
|
178 /** |
|
179 * Get to find body already contains an image |
|
180 * @return bool |
|
181 */ |
|
182 void setImage(bool image = false); |
189 void setImage(bool image = false); |
183 |
|
184 /** |
|
185 * Get to find body already contains an audio |
|
186 * @return bool |
|
187 */ |
|
188 bool hasAudio(); |
|
189 |
190 |
190 /** |
191 /** |
191 * Set that body now contains an audio |
192 * Set that body now contains an audio |
192 */ |
193 */ |
193 void setAudio(bool audio = false); |
194 void setAudio(bool audio = false); |