messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h
changeset 51 3507212d340e
parent 41 25fe1fe642e3
equal deleted inserted replaced
49:2a272ef608c4 51:3507212d340e
    49     /**
    49     /**
    50      * Destructor
    50      * Destructor
    51      */
    51      */
    52     ~UniViewerBodyWidget();
    52     ~UniViewerBodyWidget();
    53 
    53 
    54 public slots:
       
    55 
       
    56     /**
       
    57      * Called to insert image content in viewer.
       
    58      * @param info Object information.
       
    59      */
       
    60     void setPixmap(UniMessageInfo *info);
       
    61 
       
    62     /**
       
    63      * Called to insert audio content in viewer.
       
    64      * @param info Object information.
       
    65      */
       
    66     void setAudio(UniMessageInfo *info);
       
    67 
       
    68     /**
       
    69      * Called to insert video content in viewer.
       
    70      * @param info Object information.
       
    71      */
       
    72     void setVideo(UniMessageInfo *info);
       
    73 
       
    74     /**
       
    75      * Called to insert text content in viewer.
       
    76      * @param text Body text to be set.
       
    77      */
       
    78     void setText(QString text);
       
    79 
       
    80     /**
       
    81      * Sets the slide counter.
       
    82      * @param slideCounter Slide counter string to be set.
       
    83      */
       
    84     void setSlideCounter(QString &slideCounter);
       
    85 
       
    86     /**
    54     /**
    87      * Specify if this slide has text
    55      * Specify if this slide has text
    88      * @param bool
    56      * @param bool
    89      */
    57      */
    90     void setHasText(bool text = true);
    58     void setHasText(bool text = true);
   117     /**
    85     /**
   118      * Clears the content on the widget
    86      * Clears the content on the widget
   119      */
    87      */
   120     void clearContent();
    88     void clearContent();
   121 
    89 
   122 private slots:
    90 signals:
   123 
    91 
   124     /**
    92     /**
   125      * Sets overlay icon on top of pixmap widget.
    93      * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
   126      * @param iconName Overlay icon name to be set.
       
   127      */
    94      */
   128     void setOverlayIcon(const QString &iconName);
    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);
   129 
   104 
   130 protected:
   105 protected:
   131 
   106 
   132     /**
   107     /**
   133      * Reimplemented from base class to provide proper geometry for scrolling.
   108      * Reimplemented from base class to provide proper geometry for scrolling.
   134      * @see HbWidget
   109      * @see HbWidget
   135      */
   110      */
   136     QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
   111     QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
   137 
   112 
   138 signals:
   113 private:
       
   114 
   139     /**
   115     /**
   140      * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
   116      * Called to insert image content in viewer.
       
   117      * @param info Object information.
   141      */
   118      */
   142     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);
   143 
   153 
   144 private:
   154 private:
       
   155 
   145     /**
   156     /**
   146      * Info if slide has text.
   157      * Info if slide has text.
   147      * true if slide has text else false.
   158      * true if slide has text else false.
   148      */
   159      */
   149     bool mHasText;
   160     bool mHasText;