messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h
changeset 52 12db4185673b
parent 43 35b64624a9e7
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
    24 
    24 
    25 class UniViewerTextItem;
    25 class UniViewerTextItem;
    26 class UniViewerPixmapWidget;
    26 class UniViewerPixmapWidget;
    27 class UniViewerAudioWidget;
    27 class UniViewerAudioWidget;
    28 class HbTextItem;
    28 class HbTextItem;
       
    29 class HbIconItem;
    29 
    30 
    30 /**
    31 /**
    31  * @class UniViewerBodyWidget
    32  * @class UniViewerBodyWidget
    32  * @brief This widget displays the body of the viewer.
    33  * @brief This widget displays the body of the viewer.
    33  */
    34  */
    47 
    48 
    48     /**
    49     /**
    49      * Destructor
    50      * Destructor
    50      */
    51      */
    51     ~UniViewerBodyWidget();
    52     ~UniViewerBodyWidget();
    52 
       
    53 public slots:
       
    54 
       
    55     /**
       
    56      * Called to insert image content in viewer.
       
    57      * @param info Object information.
       
    58      */
       
    59     void setPixmap(UniMessageInfo *info);
       
    60 
       
    61     /**
       
    62      * Called to insert audio content in viewer.
       
    63      * @param info Object information.
       
    64      */
       
    65     void setAudio(UniMessageInfo *info);
       
    66 
       
    67     /**
       
    68      * Called to insert video content in viewer.
       
    69      * @param info Object information.
       
    70      */
       
    71     void setVideo(UniMessageInfo *info);
       
    72 
       
    73     /**
       
    74      * Called to insert text content in viewer.
       
    75      * @param text Body text to be set.
       
    76      */
       
    77     void setText(QString text);
       
    78 
       
    79     /**
       
    80      * Sets the slide counter.
       
    81      * @param slideCounter Slide counter string to be set.
       
    82      */
       
    83     void setSlideCounter(QString &slideCounter);
       
    84 
    53 
    85     /**
    54     /**
    86      * Specify if this slide has text
    55      * Specify if this slide has text
    87      * @param bool
    56      * @param bool
    88      */
    57      */
   116     /**
    85     /**
   117      * Clears the content on the widget
    86      * Clears the content on the widget
   118      */
    87      */
   119     void clearContent();
    88     void clearContent();
   120 
    89 
       
    90 signals:
       
    91 
       
    92     /**
       
    93      * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
       
    94      */
       
    95     void sendMessage(const QString& phoneNumber);
       
    96 
       
    97 public slots:
       
    98 
       
    99     /**
       
   100      * Called to insert text content in viewer.
       
   101      * @param text Body text to be set.
       
   102      */
       
   103     void setText(QString text);
       
   104 
   121 protected:
   105 protected:
   122 
   106 
   123     /**
   107     /**
   124      * Reimplemented from base class to provide proper geometry for scrolling.
   108      * Reimplemented from base class to provide proper geometry for scrolling.
   125      * @see HbWidget
   109      * @see HbWidget
   126      */
   110      */
   127     QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
   111     QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
   128 
   112 
   129 signals:
   113 private:
       
   114 
   130     /**
   115     /**
   131      * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
   116      * Called to insert image content in viewer.
       
   117      * @param info Object information.
   132      */
   118      */
   133     void sendMessage(const QString& phoneNumber);
   119     void setPixmap(UniMessageInfo *info);
       
   120 
       
   121     /**
       
   122      * Called to insert audio content in viewer.
       
   123      * @param info Object information.
       
   124      */
       
   125     void setAudio(UniMessageInfo *info);
       
   126 
       
   127     /**
       
   128      * Called to insert video content in viewer.
       
   129      * @param info Object information.
       
   130      */
       
   131     void setVideo(UniMessageInfo *info);
       
   132 
       
   133     /**
       
   134      * Sets the slide counter.
       
   135      * @param slideCounter Slide counter string to be set.
       
   136      */
       
   137     void setSlideCounter(QString &slideCounter);
       
   138 
       
   139     /**
       
   140      * Sets overlay icon on top of pixmap widget.
       
   141      * @param iconName Overlay icon name to be set.
       
   142      */
       
   143     void setOverlayIcon(const QString &iconName);
       
   144 
       
   145 private slots:
       
   146 
       
   147     /**
       
   148      * Handles the cases related to video thumbnail generation success/failure.
       
   149      * @param result true if thumbnail was found else false.
       
   150      * @param info UniMessageInfo of the media object.
       
   151      */
       
   152     void onThumbnailFound(bool result, UniMessageInfo *info);
   134 
   153 
   135 private:
   154 private:
       
   155 
   136     /**
   156     /**
   137      * Info if slide has text.
   157      * Info if slide has text.
   138      * true if slide has text else false.
   158      * true if slide has text else false.
   139      */
   159      */
   140     bool mHasText;
   160     bool mHasText;
   162 
   182 
   163     /**
   183     /**
   164      * Media widget for embedded audio content.
   184      * Media widget for embedded audio content.
   165      */
   185      */
   166     UniViewerAudioWidget *mAudioItem;
   186     UniViewerAudioWidget *mAudioItem;
       
   187 
       
   188     /**
       
   189      * Overlay icon on top of pixmap widget.
       
   190      */
       
   191     HbIconItem *mOverlayItem;
   167 };
   192 };
   168 
   193 
   169 #endif //UNIVIEWER_BODY_WIDGET_H
   194 #endif //UNIVIEWER_BODY_WIDGET_H
   170 // EOF
   195 // EOF