camerauis/cameraxui/cxengine/inc/cxethumbnailmanagersymbian.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef CXETHUMBNAILMANAGERSYMBIAN_H_
       
    18 #define CXETHUMBNAILMANAGERSYMBIAN_H_
       
    19 
       
    20 #include <QHash>
       
    21 #include <QObject>
       
    22 #include <QString>
       
    23 #include <QPixmap>
       
    24 #include <QImage>
       
    25 
       
    26 // forward declaration
       
    27 class ThumbnailManager;
       
    28 
       
    29 
       
    30 /*!
       
    31 * Class handles thumbnail creation for both still and video. It uses Thumbnail manager
       
    32 * component for creating the thumb nails for the given snapshot and the file name.
       
    33 */
       
    34 class CxeThumbnailManagerSymbian  : public QObject
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38 public:
       
    39 
       
    40     CxeThumbnailManagerSymbian();
       
    41     ~CxeThumbnailManagerSymbian();
       
    42 
       
    43 public slots:
       
    44 
       
    45     /**
       
    46      * Creates from given thumbnail.
       
    47      */
       
    48     virtual void createThumbnail(const QString &filename, const QImage &thumbnail);
       
    49 
       
    50     /**
       
    51      * Cancels thumbnail creation.
       
    52      */
       
    53     virtual void cancelThumbnail(const QString& filename);
       
    54 
       
    55 private slots:
       
    56 
       
    57     /**
       
    58      * slot that gets called when thumbnail manager has created a thumbnail
       
    59      */
       
    60     void thumbnailReady(QPixmap thumbnail, void * data, int id, int error);
       
    61 
       
    62 private:
       
    63     ThumbnailManager *mThumbnailManager;
       
    64     // file name, thumbnail id hash table
       
    65     QHash<QString, int> mThumbnailRequests;
       
    66 };
       
    67 
       
    68 #endif /* CXETHUMBNAILMANAGERSYMBIAN_H_ */