18 #ifndef UNIVIEWER_BODY_WIDGET_H |
18 #ifndef UNIVIEWER_BODY_WIDGET_H |
19 #define UNIVIEWER_BODY_WIDGET_H |
19 #define UNIVIEWER_BODY_WIDGET_H |
20 |
20 |
21 #include <hbwidget.h> |
21 #include <hbwidget.h> |
22 |
22 |
|
23 #include "unidatamodelplugininterface.h" |
|
24 |
23 class UniViewerTextItem; |
25 class UniViewerTextItem; |
24 class HbIconItem; |
26 class HbIconItem; |
|
27 class HbTextItem; |
25 class HbPushButton; |
28 class HbPushButton; |
26 class HbGestureSceneFilter; |
29 class HbGestureSceneFilter; |
27 |
30 class QSignalMapper; |
28 #include "unidatamodelplugininterface.h" |
|
29 |
31 |
30 /** |
32 /** |
31 * This widget displays the body of the viewer |
33 * This widget displays the body of the viewer |
32 */ |
34 */ |
33 class UniViewerBodyWidget : public HbWidget |
35 class UniViewerBodyWidget: public HbWidget |
34 { |
36 { |
35 Q_OBJECT |
37 Q_OBJECT |
36 |
38 |
37 Q_PROPERTY(bool hasText READ hasText WRITE setHasText) |
39 Q_PROPERTY(bool hasText READ hasText WRITE setHasText) |
|
40 Q_PROPERTY(bool hasPixmap READ hasPixmap WRITE setHasPixmap) |
38 |
41 |
39 public: |
42 public: |
40 |
43 |
41 /** |
44 /** |
42 * Constructor |
45 * Constructor |
68 */ |
71 */ |
69 void setVideo(QString videofile); |
72 void setVideo(QString videofile); |
70 |
73 |
71 /** |
74 /** |
72 * Called to insert text content in viewer. |
75 * Called to insert text content in viewer. |
73 * @param |
76 * @param text Body text to be set. |
74 */ |
77 */ |
75 void setTextContent(QString text); |
78 void setTextContent(QString text); |
|
79 |
|
80 /** |
|
81 * Sets the slide counter. |
|
82 * @param slideCounter Slide counter string to be set. |
|
83 */ |
|
84 void setSlideCounter(QString &slideCounter); |
76 |
85 |
77 /** |
86 /** |
78 * Specify if this slide has text |
87 * Specify if this slide has text |
79 * @param bool |
88 * @param bool |
80 */ |
89 */ |
83 /** |
92 /** |
84 * Get to find if slide has text file |
93 * Get to find if slide has text file |
85 * @return bool |
94 * @return bool |
86 */ |
95 */ |
87 bool hasText(); |
96 bool hasText(); |
|
97 |
|
98 /** |
|
99 * Specify if this slide has pixmap |
|
100 * @param bool |
|
101 */ |
|
102 void setHasPixmap(bool text = true); |
|
103 |
|
104 /** |
|
105 * Returns true if body has pixmap |
|
106 * @return bool |
|
107 */ |
|
108 bool hasPixmap(); |
88 |
109 |
89 /** |
110 /** |
90 * Sets the side content |
111 * Sets the side content |
91 * @param objList object list |
112 * @param objList object list |
92 * @param slideString slide string |
113 * @param slideString slide string |
118 * called from the media object's item specific menu |
139 * called from the media object's item specific menu |
119 */ |
140 */ |
120 void openMedia(); |
141 void openMedia(); |
121 |
142 |
122 /** |
143 /** |
|
144 * Open a specified media file |
|
145 */ |
|
146 void openMedia(const QString& fileName); |
|
147 |
|
148 /** |
123 * called from the media object's item specific menu |
149 * called from the media object's item specific menu |
124 */ |
150 */ |
125 void viewDetails(); |
151 void viewDetails(); |
126 |
152 |
|
153 /** |
|
154 * Service launch complete. |
|
155 */ |
|
156 void handleOk(const QVariant& result); |
|
157 |
|
158 /** |
|
159 * Service launch errors. |
|
160 */ |
|
161 void handleError(int errorCode, const QString& errorMessage); |
|
162 |
127 signals: |
163 signals: |
128 /** |
164 /** |
129 * this signal is emitted when sendMessage is emitted from UniViewerTextItem. |
165 * this signal is emitted when sendMessage is emitted from UniViewerTextItem. |
130 */ |
166 */ |
131 void sendMessage(const QString& phoneNumber); |
167 void sendMessage(const QString& phoneNumber); |
132 |
168 |
133 private: |
169 private: |
134 /** |
170 /** |
135 * Info if slide has text. |
171 * Info if slide has text. |
136 * true if slide has text else false. |
172 * true if slide has text else false. |
137 */ |
173 */ |
138 bool mHasText; |
174 bool mHasText; |
139 |
175 |
140 /** |
176 /** |
141 * editor to in put text. |
177 * Info if slide has pixmap. |
|
178 * true if slide has pixmap else false. |
|
179 */ |
|
180 bool mHasPixmap; |
|
181 |
|
182 /** |
|
183 * Editor to in put text. |
142 */ |
184 */ |
143 UniViewerTextItem* mTextItem; |
185 UniViewerTextItem* mTextItem; |
144 |
186 |
145 /** |
187 /** |
146 * icon item to preview images. |
188 * Slide counter. |
|
189 */ |
|
190 HbTextItem *mSlideCounter; |
|
191 |
|
192 /** |
|
193 * Icon item to preview images. |
147 */ |
194 */ |
148 HbIconItem* mIconItem; |
195 HbIconItem* mIconItem; |
149 |
196 |
150 /** |
197 /** |
151 * Media widget for embedded audio content. |
198 * Media widget for embedded audio content. |