messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
--- a/messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h	Fri Apr 16 14:56:15 2010 +0300
+++ b/messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h	Mon May 03 12:29:07 2010 +0300
@@ -20,21 +20,24 @@
 
 #include <hbwidget.h>
 
+#include "unidatamodelplugininterface.h"
+
 class UniViewerTextItem;
 class HbIconItem;
+class HbTextItem;
 class HbPushButton;
 class HbGestureSceneFilter;
-
-#include "unidatamodelplugininterface.h"
+class QSignalMapper;
 
 /**
  * This widget displays the body of the viewer
  */
-class UniViewerBodyWidget : public HbWidget
+class UniViewerBodyWidget: public HbWidget
 {
 Q_OBJECT
 
-    Q_PROPERTY(bool hasText READ hasText WRITE setHasText)
+Q_PROPERTY(bool hasText READ hasText WRITE setHasText)
+Q_PROPERTY(bool hasPixmap READ hasPixmap WRITE setHasPixmap)
 
 public:
 
@@ -70,11 +73,17 @@
 
     /**
      * Called to insert text content in viewer.
-     * @param
+     * @param text Body text to be set.
      */
     void setTextContent(QString text);
 
     /**
+     * Sets the slide counter.
+     * @param slideCounter Slide counter string to be set.
+     */
+    void setSlideCounter(QString &slideCounter);
+
+    /**
      * Specify if this slide has text
      * @param bool
      */
@@ -87,6 +96,18 @@
     bool hasText();
 
     /**
+     * Specify if this slide has pixmap
+     * @param bool
+     */
+    void setHasPixmap(bool text = true);
+
+    /**
+     * Returns true if body has pixmap
+     * @return bool
+     */
+    bool hasPixmap();
+
+    /**
      * Sets the side content
      * @param objList object list
      * @param slideString slide string
@@ -120,15 +141,30 @@
     void openMedia();
 
     /**
+     * Open a specified media file
+     */
+    void openMedia(const QString& fileName);
+
+    /**
      * called from the media object's item specific menu
      */
     void viewDetails();
-    
+
+    /**
+     * Service launch complete.
+     */
+    void handleOk(const QVariant& result);
+
+    /**
+     * Service launch errors.
+     */
+    void handleError(int errorCode, const QString& errorMessage);
+
 signals:
-        /**
-         * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
-         */
-        void sendMessage(const QString& phoneNumber);
+    /**
+     * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
+     */
+    void sendMessage(const QString& phoneNumber);
 
 private:
     /**
@@ -138,12 +174,23 @@
     bool mHasText;
 
     /**
-     * editor to in put text.
+     * Info if slide has pixmap.
+     * true if slide has pixmap else false.
+     */
+    bool mHasPixmap;
+
+    /**
+     * Editor to in put text.
      */
     UniViewerTextItem* mTextItem;
 
     /**
-     * icon item to preview images.
+     * Slide counter.
+     */
+    HbTextItem *mSlideCounter;
+
+    /**
+     * Icon item to preview images.
      */
     HbIconItem* mIconItem;
 
@@ -157,6 +204,10 @@
      */
     HbGestureSceneFilter* gestureFilter;
 
+    /**
+     * File mapper for opening media
+     */
+    QSignalMapper* mSignalMapper;
 };
 
 #endif //UNIVIEWER_BODY_WIDGET_H