21 #include <hbwidget.h> |
21 #include <hbwidget.h> |
22 |
22 |
23 #include "unidatamodelplugininterface.h" |
23 #include "unidatamodelplugininterface.h" |
24 |
24 |
25 class UniViewerTextItem; |
25 class UniViewerTextItem; |
26 class HbIconItem; |
26 class UniViewerPixmapWidget; |
|
27 class UniViewerAudioWidget; |
27 class HbTextItem; |
28 class HbTextItem; |
28 class HbPushButton; |
|
29 class HbGestureSceneFilter; |
|
30 class QSignalMapper; |
|
31 |
29 |
32 /** |
30 /** |
33 * This widget displays the body of the viewer |
31 * @class UniViewerBodyWidget |
|
32 * @brief This widget displays the body of the viewer. |
34 */ |
33 */ |
35 class UniViewerBodyWidget: public HbWidget |
34 class UniViewerBodyWidget: public HbWidget |
36 { |
35 { |
37 Q_OBJECT |
36 Q_OBJECT |
38 |
37 |
53 |
52 |
54 public slots: |
53 public slots: |
55 |
54 |
56 /** |
55 /** |
57 * Called to insert image content in viewer. |
56 * Called to insert image content in viewer. |
58 * @param medialist list of absolute paths of media. |
57 * @param info Object information. |
59 */ |
58 */ |
60 void setImage(QString imagefile); |
59 void setPixmap(UniMessageInfo *info); |
61 |
60 |
62 /** |
61 /** |
63 * Called to insert audio content in viewer. |
62 * Called to insert audio content in viewer. |
64 * @param medialist list of absolute paths of media. |
63 * @param info Object information. |
65 */ |
64 */ |
66 void setAudio(QString audiofile); |
65 void setAudio(UniMessageInfo *info); |
67 |
66 |
68 /** |
67 /** |
69 * Called to insert video content in viewer. |
68 * Called to insert video content in viewer. |
70 * @param medialist list of absolute paths of media. |
69 * @param info Object information. |
71 */ |
70 */ |
72 void setVideo(QString videofile); |
71 void setVideo(UniMessageInfo *info); |
73 |
72 |
74 /** |
73 /** |
75 * Called to insert text content in viewer. |
74 * Called to insert text content in viewer. |
76 * @param text Body text to be set. |
75 * @param text Body text to be set. |
77 */ |
76 */ |
78 void setTextContent(QString text); |
77 void setText(QString text); |
79 |
78 |
80 /** |
79 /** |
81 * Sets the slide counter. |
80 * Sets the slide counter. |
82 * @param slideCounter Slide counter string to be set. |
81 * @param slideCounter Slide counter string to be set. |
83 */ |
82 */ |
118 * Clears the content on the widget |
117 * Clears the content on the widget |
119 */ |
118 */ |
120 void clearContent(); |
119 void clearContent(); |
121 |
120 |
122 protected: |
121 protected: |
123 // from HbWidget |
|
124 |
122 |
125 /** |
123 /** |
126 * reimplemented from base class to provide proper geometry for scrolling. |
124 * Reimplemented from base class to provide proper geometry for scrolling. |
127 * @see HbWidget |
125 * @see HbWidget |
128 */ |
126 */ |
129 void resizeEvent(QGraphicsSceneResizeEvent* event); |
127 QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const; |
130 |
|
131 private slots: |
|
132 |
|
133 /** |
|
134 * called on long press on the media objects |
|
135 */ |
|
136 void longPressed(QPointF position); |
|
137 |
|
138 /** |
|
139 * called from the media object's item specific menu |
|
140 */ |
|
141 void openMedia(); |
|
142 |
|
143 /** |
|
144 * Open a specified media file |
|
145 */ |
|
146 void openMedia(const QString& fileName); |
|
147 |
|
148 /** |
|
149 * called from the media object's item specific menu |
|
150 */ |
|
151 void viewDetails(); |
|
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 |
128 |
163 signals: |
129 signals: |
164 /** |
130 /** |
165 * this signal is emitted when sendMessage is emitted from UniViewerTextItem. |
131 * this signal is emitted when sendMessage is emitted from UniViewerTextItem. |
166 */ |
132 */ |
190 HbTextItem *mSlideCounter; |
156 HbTextItem *mSlideCounter; |
191 |
157 |
192 /** |
158 /** |
193 * Icon item to preview images. |
159 * Icon item to preview images. |
194 */ |
160 */ |
195 HbIconItem* mIconItem; |
161 UniViewerPixmapWidget *mPixmapItem; |
196 |
162 |
197 /** |
163 /** |
198 * Media widget for embedded audio content. |
164 * Media widget for embedded audio content. |
199 */ |
165 */ |
200 HbPushButton *mAudioItem; |
166 UniViewerAudioWidget *mAudioItem; |
201 |
|
202 /** |
|
203 * To setup longpress gesture on media objects |
|
204 */ |
|
205 HbGestureSceneFilter* gestureFilter; |
|
206 |
|
207 /** |
|
208 * File mapper for opening media |
|
209 */ |
|
210 QSignalMapper* mSignalMapper; |
|
211 }; |
167 }; |
212 |
168 |
213 #endif //UNIVIEWER_BODY_WIDGET_H |
169 #endif //UNIVIEWER_BODY_WIDGET_H |
214 // EOF |
170 // EOF |