commonutilities/imagedecoderwrapper/src/glximagedecoderwrapper.cpp
changeset 23 74c9f037fd5d
child 33 1ee2af37811f
equal deleted inserted replaced
5:f7f0874bfe7d 23:74c9f037fd5d
       
     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:   ?Description
       
    15 *
       
    16 */
       
    17 #include "glximagedecoder.h"
       
    18 #include "glximagedecoderwrapper.h"
       
    19 
       
    20 // ======== MEMBER FUNCTIONS ========
       
    21 // ---------------------------------------------------------------------------
       
    22 // constructor.
       
    23 // ---------------------------------------------------------------------------
       
    24 //
       
    25 
       
    26 GlxImageDecoderWrapper::GlxImageDecoderWrapper()
       
    27 {
       
    28 	imageDecoder = CGlxImageDecoder::NewL(this);
       
    29 }
       
    30 
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // destructor.
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 GlxImageDecoderWrapper::~GlxImageDecoderWrapper()
       
    37 {
       
    38 	imageDecoder->Cancel();
       
    39 	delete imageDecoder;
       
    40 }
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // decodeImage.
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 void GlxImageDecoderWrapper::decodeImage(QString sourcePath)
       
    47 {
       
    48 	imageDecoder->DecodeImageL(sourcePath);
       
    49 }
       
    50 
       
    51 QPixmap GlxImageDecoderWrapper::getPixmap()
       
    52 {
       
    53 	return imageDecoder->GetPixmap();
       
    54 }
       
    55 
       
    56 void GlxImageDecoderWrapper::resetDecoder()
       
    57 {
       
    58 	imageDecoder->ResetDecoder();
       
    59 }
       
    60 
       
    61 void GlxImageDecoderWrapper::decodedImageAvailable()
       
    62 {
       
    63 	emit pixmapDecoded();
       
    64 }