messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h
changeset 52 12db4185673b
parent 43 35b64624a9e7
child 70 a15d9966050f
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
    22 
    22 
    23 // FORWARD DECLARATIONS
    23 // FORWARD DECLARATIONS
    24 class UniViewerUtils;
    24 class UniViewerUtils;
    25 class UniMessageInfo;
    25 class UniMessageInfo;
    26 class ThumbnailManager;
    26 class ThumbnailManager;
    27 
       
    28 
    27 
    29 /**
    28 /**
    30  * This widget displays the pixmap content in viewer.
    29  * This widget displays the pixmap content in viewer.
    31  */
    30  */
    32 class UniViewerPixmapWidget: public HbIconItem
    31 class UniViewerPixmapWidget: public HbIconItem
    63      * Signal emitted when widget is long tapped.
    62      * Signal emitted when widget is long tapped.
    64      * @param position Scene coordinates of tap.
    63      * @param position Scene coordinates of tap.
    65      */
    64      */
    66     void longTap(const QPointF &position);
    65     void longTap(const QPointF &position);
    67 
    66 
       
    67     /**
       
    68      * Signal emitted indicating if thumbnail was found or not
       
    69      * @param result true if thumbnail was found else false.
       
    70      * @param info UniMessageInfo of the media object.
       
    71      */
       
    72     void thumbnailFound(bool result, UniMessageInfo *info);
       
    73 
    68 protected:
    74 protected:
    69 
    75 
    70     /**
    76     /**
    71      * Event handler for gesture events.
    77      * Event handler for gesture events.
    72      * Reimplemented from HbWidgetBase.
    78      * Reimplemented from HbWidgetBase.
    75     virtual void gestureEvent(QGestureEvent *event);
    81     virtual void gestureEvent(QGestureEvent *event);
    76 
    82 
    77 private slots:
    83 private slots:
    78 
    84 
    79     /**
    85     /**
    80      *
    86      * Handles opening of media.
    81      */
    87      */
    82     void handleOpen();
    88     void handleOpen();
    83 
    89 
    84     /**
    90     /**
    85      *
    91      * Handles saving of media.
    86      */
    92      */
    87     void handleSave();
    93     void handleSave();
    88 
    94 
    89     /**
    95     /**
    90      * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture
    96      * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture
    93     void regrabGesture();
    99     void regrabGesture();
    94 
   100 
    95     /**
   101     /**
    96      * Slot hit when the thumbnail is ready.
   102      * Slot hit when the thumbnail is ready.
    97      */
   103      */
    98    void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error);
   104     void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error);
    99 
   105 
   100 private:
   106 private:
   101 
   107 
   102     /**
   108     /**
   103      * Initialization function.
   109      * Initialization function.
   113      * Handles long tap event.
   119      * Handles long tap event.
   114      * @param position Scene coordinates of tap.
   120      * @param position Scene coordinates of tap.
   115      */
   121      */
   116     void handleLongTap(const QPointF &position);
   122     void handleLongTap(const QPointF &position);
   117 
   123 
       
   124     /**
       
   125      * Calculates the thumbnail size.
       
   126      * @return Thumbnail size
       
   127      */
       
   128     QSize getThumbnailSize();
       
   129 
   118 private:
   130 private:
       
   131 
       
   132     /**
       
   133      * UniMessageInfo object.
       
   134      * Own.
       
   135      */
       
   136     UniMessageInfo *mInfo;
   119 
   137 
   120     /**
   138     /**
   121      * UniViewerUtils object.
   139      * UniViewerUtils object.
   122      * Own
   140      * Own
   123      */
   141      */
   125 
   143 
   126     /**
   144     /**
   127      * ThumbnailManager
   145      * ThumbnailManager
   128      * Own.
   146      * Own.
   129      */
   147      */
   130    ThumbnailManager *mThumbnailManager;
   148     ThumbnailManager *mThumbnailManager;
   131 
   149 
   132     /**
   150     /**
   133      * Mime Type of pixmap.
   151      * Mime Type of pixmap.
   134      */
   152      */
   135     QString mMimeType;
   153     QString mMimeType;