messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h
branchGCC_SURGE
changeset 47 5b14749788d7
parent 27 e4592d119491
parent 43 35b64624a9e7
equal deleted inserted replaced
35:a32b19fb291e 47:5b14749788d7
    22 
    22 
    23 #include "unidatamodelplugininterface.h"
    23 #include "unidatamodelplugininterface.h"
    24 
    24 
    25 class UniViewerTextItem;
    25 class UniViewerTextItem;
    26 class UniViewerPixmapWidget;
    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 setPixmap(QString pixmapFile);
    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      */
   125      * Reimplemented from base class to provide proper geometry for scrolling.
   124      * Reimplemented from base class to provide proper geometry for scrolling.
   126      * @see HbWidget
   125      * @see HbWidget
   127      */
   126      */
   128     QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
   127     QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
   129 
   128 
   130 private slots:
       
   131 
       
   132     /**
       
   133      * called on long press on the media objects
       
   134      */
       
   135     void longPressed(QPointF position);
       
   136 
       
   137     /**
       
   138      * called from the media object's item specific menu
       
   139      */
       
   140     void openMedia();
       
   141 
       
   142     /**
       
   143      * Open a specified media file
       
   144      */
       
   145     void openMedia(const QString& fileName);
       
   146 
       
   147     /**
       
   148      * called from the media object's item specific menu
       
   149      */
       
   150     void saveMedia();
       
   151 
       
   152     /**
       
   153      * Service launch complete.
       
   154      */
       
   155     void handleOk(const QVariant& result);
       
   156 
       
   157     /**
       
   158      * Service launch errors.
       
   159      */
       
   160     void handleError(int errorCode, const QString& errorMessage);
       
   161 
       
   162 signals:
   129 signals:
   163     /**
   130     /**
   164      * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
   131      * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
   165      */
   132      */
   166     void sendMessage(const QString& phoneNumber);
   133     void sendMessage(const QString& phoneNumber);
   194     UniViewerPixmapWidget *mPixmapItem;
   161     UniViewerPixmapWidget *mPixmapItem;
   195 
   162 
   196     /**
   163     /**
   197      * Media widget for embedded audio content.
   164      * Media widget for embedded audio content.
   198      */
   165      */
   199     HbPushButton *mAudioItem;
   166     UniViewerAudioWidget *mAudioItem;
   200 
       
   201     /**
       
   202      * To setup longpress gesture on media objects
       
   203      */
       
   204    // HbGestureSceneFilter* gestureFilter;
       
   205 
       
   206     /**
       
   207      * File mapper for opening media
       
   208      */
       
   209     QSignalMapper* mSignalMapper;
       
   210 };
   167 };
   211 
   168 
   212 #endif //UNIVIEWER_BODY_WIDGET_H
   169 #endif //UNIVIEWER_BODY_WIDGET_H
   213 // EOF
   170 // EOF